summaryrefslogtreecommitdiff
path: root/client/src/lib/components/header.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/lib/components/header.js')
-rw-r--r--client/src/lib/components/header.js51
1 files changed, 51 insertions, 0 deletions
diff --git a/client/src/lib/components/header.js b/client/src/lib/components/header.js
new file mode 100644
index 0000000..dc95d6d
--- /dev/null
+++ b/client/src/lib/components/header.js
@@ -0,0 +1,51 @@
+import React, { Component } from 'react'
+import {
+ Image,
+ StyleSheet,
+ TouchableOpacity,
+ Text,
+ View,
+} from 'react-native'
+import { Link } from 'react-router-dom'
+
+import Nav from '../views/nav'
+
+export default class ClearText extends Component {
+ render() {
+ return (
+ <View style={styles.header}>
+ <Nav location={this.props.location} min={0} max={3} />
+ <Link to='/'>
+ <Image source={require('../../img/logo.png')} resizeMode='contain' style={styles.logo} />
+ </Link>
+ <Nav location={this.props.location} min={3} max={6} />
+ </View>
+ )
+ }
+}
+
+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({
+ header: {
+ width: '100%',
+ backgroundColor: 'black',
+ paddingTop: isMobile ? 5 : 10,
+ paddingBottom: isMobile ? 5 : 10,
+ height: isMobile ? 30 : 100,
+ flexDirection: 'row',
+ justifyContent: 'space-around',
+ alignItems: 'center',
+ },
+
+ logo: {
+ flex: 2,
+ marginTop: 0,
+ height: isMobile ? 30 : 55,
+ marginBottom: isMobile ? 5 : 10,
+ },
+})