summaryrefslogtreecommitdiff
path: root/client/src/lib/components
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-06-04 18:19:08 -0400
committerJules Laplace <julescarbon@gmail.com>2017-06-04 18:19:08 -0400
commit06e20cb460faa5c302511f6444c4017d5ebd07e0 (patch)
tree6b8aabe718445728b4afe22368b54f826e1a3985 /client/src/lib/components
parented91748ac4aa378bc43a1e9863dcae58ceb7f68e (diff)
more mobile hegemony
Diffstat (limited to 'client/src/lib/components')
-rw-r--r--client/src/lib/components/button.js10
-rw-r--r--client/src/lib/components/youtube.js2
2 files changed, 9 insertions, 3 deletions
diff --git a/client/src/lib/components/button.js b/client/src/lib/components/button.js
index ca8388b..edd75de 100644
--- a/client/src/lib/components/button.js
+++ b/client/src/lib/components/button.js
@@ -30,6 +30,12 @@ export default class Button extends Component {
}
}
+const isIphone = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))
+const isIpad = (navigator.userAgent.match(/iPad/i))
+const isAndroid = (navigator.userAgent.match(/Android/i))
+const isMobile = isIphone || isIpad || isAndroid
+const isDesktop = ! isMobile
+
const styles = StyleSheet.create({
text: {
color: '#000',
@@ -38,8 +44,8 @@ const styles = StyleSheet.create({
padding: 0,
},
button: {
- padding: 10,
- margin: 10,
+ padding: isMobile ? 5 : 10,
+ margin: isMobile ? 5 : 10,
borderRadius: 3,
backgroundColor: '#fff',
borderBottomColor: '#bbb',
diff --git a/client/src/lib/components/youtube.js b/client/src/lib/components/youtube.js
index a9ea740..75349e4 100644
--- a/client/src/lib/components/youtube.js
+++ b/client/src/lib/components/youtube.js
@@ -25,7 +25,7 @@ export default class Youtube extends Component {
this.player = new YT.Player(this.container, {
videoId: this.props.ytid,
width: "100%",
- height: isMobile ? 100 : 400,
+ height: isMobile ? 1 : 400,
playerVars: {
'autohide': 1,
'autoplay': 0,