diff options
Diffstat (limited to 'client/src/lib/components')
| -rw-r--r-- | client/src/lib/components/footer.js | 6 | ||||
| -rw-r--r-- | client/src/lib/components/header.js | 7 | ||||
| -rw-r--r-- | client/src/lib/components/youtube.js | 8 |
3 files changed, 14 insertions, 7 deletions
diff --git a/client/src/lib/components/footer.js b/client/src/lib/components/footer.js index ffd157d..f630ed8 100644 --- a/client/src/lib/components/footer.js +++ b/client/src/lib/components/footer.js @@ -56,8 +56,8 @@ const styles = StyleSheet.create({ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', - maxWidth: 140, - maxHeight: 40, + maxWidth: isMobile ? 100 : 140, + maxHeight: isMobile ? 30 : 40, width: 260, height: 39, }, @@ -72,6 +72,6 @@ const styles = StyleSheet.create({ fontSize: 10, flex: 1, padding: 10, - marginTop: 4, + marginTop: isMobile ? 0 : 4, } }) diff --git a/client/src/lib/components/header.js b/client/src/lib/components/header.js index dc95d6d..3d41c4f 100644 --- a/client/src/lib/components/header.js +++ b/client/src/lib/components/header.js @@ -34,9 +34,9 @@ const styles = StyleSheet.create({ header: { width: '100%', backgroundColor: 'black', - paddingTop: isMobile ? 5 : 10, + paddingTop: isMobile ? 20 : 10, paddingBottom: isMobile ? 5 : 10, - height: isMobile ? 30 : 100, + height: isMobile ? 40 : 100, flexDirection: 'row', justifyContent: 'space-around', alignItems: 'center', @@ -45,7 +45,8 @@ const styles = StyleSheet.create({ logo: { flex: 2, marginTop: 0, - height: isMobile ? 30 : 55, + height: isMobile ? 32 : 55, marginBottom: isMobile ? 5 : 10, }, + }) diff --git a/client/src/lib/components/youtube.js b/client/src/lib/components/youtube.js index ab5f8aa..a9ea740 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: 400, + height: isMobile ? 100 : 400, playerVars: { 'autohide': 1, 'autoplay': 0, @@ -83,6 +83,12 @@ export default class Youtube 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 + let YT_READY = false global.onYouTubeIframeAPIReady = function(){ |
