diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-02 11:40:02 -0400 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-02 11:40:02 -0400 |
| commit | dd70fa81a205304cb48bbc0494ad34c16d496ff2 (patch) | |
| tree | 5be0ffe9fbe4f26c93088f99eefbaf640268d0c4 | |
| parent | bac4e77f8905bf27b395f6690a8581885088c41c (diff) | |
buildddd
| -rw-r--r-- | client/src/lib/views/information.js | 2 | ||||
| -rw-r--r-- | client/src/lib/views/privacy.js | 81 | ||||
| -rw-r--r-- | index.js | 27 | ||||
| l---------[-rw-r--r--] | templates/index.liquid | 2 |
4 files changed, 88 insertions, 24 deletions
diff --git a/client/src/lib/views/information.js b/client/src/lib/views/information.js index c48eb7f..77d1af2 100644 --- a/client/src/lib/views/information.js +++ b/client/src/lib/views/information.js @@ -105,7 +105,7 @@ const styles = StyleSheet.create({ }, face: { width: '90vw', - height: 400, + height: 450, marginBottom: 20, }, footer: { diff --git a/client/src/lib/views/privacy.js b/client/src/lib/views/privacy.js index c2d0596..eb243a3 100644 --- a/client/src/lib/views/privacy.js +++ b/client/src/lib/views/privacy.js @@ -5,7 +5,6 @@ import { } from 'react-native'; import HTMLView from 'react-native-htmlview' -import htmlStyles from '../components/htmlStyles' import ScrollableContainer from '../components/scrollableContainer' import ClearText from '../components/text' @@ -14,20 +13,94 @@ export default class Privacy extends Component { super() } render() { - let body = '<p>' + this.props.content.body + '</p>' + let body = this.props.content.body return ( <ScrollableContainer heading='Privacy Policy'> <View style={styles.body}> - <HTMLView value={body} stylesheet={htmlStyles} onLinkPress={this.props.onLinkPress} /> + <HTMLView value={body} stylesheet={htmlStyles} renderNode={renderNode} onLinkPress={this.props.onLinkPress} /> </View> </ScrollableContainer> ) } } +function renderNode (node, index) { + if (node.name === 'hr') { + return ( <View key={index} style={styles.hr} /> ) + } + // console.warn(node.name) +} + const styles = StyleSheet.create({ body: { width: '90%', maxWidth: '650px', + paddingBottom: 200, + }, + hr: { + width: 50, + height: 2, + backgroundColor: '#fff', + marginBottom: 20, + }, +}) + +const htmlStyles = StyleSheet.create({ + p: { + color: 'white', + fontFamily: 'Futura-Medium', + textAlign: 'justify', + fontSize: 16, + lineHeight: 30, + margin: 0, + }, + li: { + color: 'white', + fontFamily: 'Futura-Medium', + textAlign: 'justify', + fontSize: 16, + lineHeight: 30, + margin: 0, + }, + b: { + fontFamily: 'Futura-MediumItalic', + color: 'white', + fontSize: 16, + lineHeight: 30, + }, + i: { + fontFamily: 'Futura-MediumItalic', + color: 'white', + fontSize: 16, + lineHeight: 30, + }, + a: { + color: 'white', + fontFamily: 'Futura-Medium', + textDecorationLine: 'underline', + fontSize: 16, + lineHeight: 30, + }, + h1: { + color: 'white', + fontFamily: 'Futura-Medium', + fontSize: 24, + lineHeight: 30, + margin: 0, + }, + h2: { + color: 'white', + fontFamily: 'Futura-Medium', + fontSize: 20, + lineHeight: 32, + margin: 0, + }, + h3: { + color: 'white', + fontFamily: 'Futura-Medium', + fontSize: 16, + lineHeight: 30, + fontWeight: 'bold', + margin: 0, }, -})
\ No newline at end of file +}) @@ -2,19 +2,6 @@ var okcms = require('okcms') var path = require('path') var isProduction = process.env.OK_PRODUCTION === 'true' -var viewConfig = { template: 'index', - data: [ - {type: 'timeline', query: '*'}, - {type: 'page', query: '*'}, - {type: 'stream', query: '*'}, - {type: 'drone', query: '*'}, - {type: 'about', query: '*'}, - ] -} - -var photoConfig = { - template: 'photo', -} var app = okcms.createApp({ @@ -92,11 +79,15 @@ var app = okcms.createApp({ ], views: { - '/': viewConfig, - '/timeline': viewConfig, - '/timeline/:id': viewConfig, - '/page/:id': viewConfig, - '/photo/:id': photoConfig, + '/': { template: 'index' }, + '/information/': { template: 'index' }, + '/drones/': { template: 'index' }, + '/livestream/': { template: 'index' }, + '/contact/': { template: 'index' }, + '/timeline/': { template: 'index' }, + '/timeline/:id': { template: 'index' }, + '/page/:id': { template: 'index' }, + '/photo/:id': { template: 'photo' }, }, services: { diff --git a/templates/index.liquid b/templates/index.liquid index fc8ac6a..10692f0 100644..120000 --- a/templates/index.liquid +++ b/templates/index.liquid @@ -1 +1 @@ -Hansel and Gretel +../public/index.html
\ No newline at end of file |
