summaryrefslogtreecommitdiff
path: root/client/src/lib/components/footer.js
blob: ffd157dccee4a1a0bb212f53a4231430d7dfe3b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import React, { Component } from 'react'
import {
  Image,
  StyleSheet,
  TouchableOpacity,
  Text,
  View,
} from 'react-native'
import { Link } from 'react-router-dom'

export default class ClearText extends Component {
  render() {
    return (
      <View style={styles.footer}>
        <Link to='/page/privacy'>
          <View style={styles.footerItem}>
            <Text style={styles.footerText}>Privacy</Text>
          </View>
        </Link>
        <View style={styles.footerItem}>
          <TouchableOpacity onPress={() => this.props.onLinkPress('http://armoryonpark.org/')}>
            <Image source={require('../../img/armory.png')} resizeMode='contain' style={styles.footerLogo} />
          </TouchableOpacity>
        </View>
        <Link to='/page/credits'>
          <View style={styles.footerItem}>
            <Text style={styles.footerText}>Credits</Text>
          </View>
        </Link>
      </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({
  footer: {
    position: 'fixed',
    bottom: 0,
    left: 0,
    width: '100%',
    height: isMobile ? 40 : 70,
    backgroundColor: 'black',
    paddingTop: isMobile ? 5 : 20,
    paddingBottom: isMobile ? 5 : 20,
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center',
  },
  footerLogo: {
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    maxWidth: 140,
    maxHeight: 40,
    width: 260,
    height: 39,
  },
  footerItem: {
    height: 35,
    flex: 1,
    alignItems: 'center',
  },
  footerText: {
    fontFamily: '"Futura-Medium", sans-serif',
    color: 'white',
    fontSize: 10,
    flex: 1,
    padding: 10,
    marginTop: 4,
  }
})