From 3e72bfa56c860826429a842f6c128d78d4a930db Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 1 Jun 2017 19:47:08 -0400 Subject: react-native-web port of fmf app --- client/src/lib/views/information.js | 114 ++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 client/src/lib/views/information.js (limited to 'client/src/lib/views/information.js') diff --git a/client/src/lib/views/information.js b/client/src/lib/views/information.js new file mode 100644 index 0000000..c48eb7f --- /dev/null +++ b/client/src/lib/views/information.js @@ -0,0 +1,114 @@ +import React, { Component } from 'react'; +import { + StyleSheet, + Image, +} from 'react-native'; + +import ScrollableContainer from '../components/scrollableContainer' +import ClearText from '../components/text' + +export default class Information extends Component { + constructor(props) { + super() + } + render() { + const content = this.props.content + return ( + + + {this.props.content.show} + + + + + {this.props.content.aiWeiWeiBio} + + + + {this.props.content.herzogBio} + + + {this.props.content.deMeuronBio} + + + + + ); + } +} + +/* + this.youtubePlayer = ref} + videoId={content.video.token} + play={false} + hidden={false} + fullscreen={false} + loop={true} + controls={1} + showFullscreenButton={true} + showinfo={false} + modestbranding={true} + rel={false} + iv_load_policy={3} + + onReady={(e)=>{this.setState({isReady: true})}} + onChangeState={(e)=>{ + if (e.state == 'playing') { + this.props.onVideoPlay() + } + else { + this.props.onVideoPause() + } + }} + onChangeFullscreen={(e)=>{ + if (e.isFullscreen) { + this.props.onVideoPlay() + } + else { + this.props.onVideoPause() + } + }} + onError={(e)=>{this.setState({error: e.error})}} + onProgress={(e)=>{this.setState({currentTime: e.currentTime, duration: Math.round(e.duration)})}} + + style={styles.video} + /> +*/ + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'flex-start', + alignItems: 'flex-start', + }, + bodyStyle: { + marginRight: 10, + }, + video: { + alignSelf: 'stretch', + height: 400, + width: '100%', + backgroundColor: 'black', + marginVertical: 10 + }, + body: { + textAlign: 'left', + paddingRight: 10, + width: '90%', + marginBottom: 20, + maxWidth: 600, + }, + hero: { + width: '90%', + height: 300, + }, + face: { + width: '90vw', + height: 400, + marginBottom: 20, + }, + footer: { + marginBottom: 80, + }, +}) -- cgit v1.2.3-70-g09d2 From dd70fa81a205304cb48bbc0494ad34c16d496ff2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Jun 2017 11:40:02 -0400 Subject: buildddd --- client/src/lib/views/information.js | 2 +- client/src/lib/views/privacy.js | 81 +++++++++++++++++++++++++++++++++++-- index.js | 27 +++++-------- templates/index.liquid | 2 +- 4 files changed, 88 insertions(+), 24 deletions(-) mode change 100644 => 120000 templates/index.liquid (limited to 'client/src/lib/views/information.js') 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 = '

' + this.props.content.body + '

' + let body = this.props.content.body return ( - + ) } } +function renderNode (node, index) { + if (node.name === 'hr') { + return ( ) + } + // 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 +}) diff --git a/index.js b/index.js index e03b1e2..f56a486 100644 --- a/index.js +++ b/index.js @@ -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 deleted file mode 100644 index fc8ac6a..0000000 --- a/templates/index.liquid +++ /dev/null @@ -1 +0,0 @@ -Hansel and Gretel diff --git a/templates/index.liquid b/templates/index.liquid new file mode 120000 index 0000000..10692f0 --- /dev/null +++ b/templates/index.liquid @@ -0,0 +1 @@ +../public/index.html \ No newline at end of file -- cgit v1.2.3-70-g09d2