From 14b8f0acb52cfe6eca4d74a583562939d3aa7a1a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 4 Jun 2017 15:55:37 -0400 Subject: safari timeline --- client/src/lib/app/index.js | 1 + client/src/lib/timeline/timelineFull.js | 1 + client/src/lib/views/information.js | 235 ++++++++++++++++++++++++-------- client/src/lib/views/livestream.js | 18 ++- 4 files changed, 198 insertions(+), 57 deletions(-) diff --git a/client/src/lib/app/index.js b/client/src/lib/app/index.js index d6e8e61..53e16f4 100644 --- a/client/src/lib/app/index.js +++ b/client/src/lib/app/index.js @@ -106,6 +106,7 @@ class App extends Component { )}/> ( { + s = s.replace(/\r/g,'').trim() + if (! s.length) return '' + if (s.match(/^

/i)) return s.toUpperCase() + return '

' + s + '

' + }).join('') + if (essay.id == 'notes-on-surveillance') { + essayBody += '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' + } + else { + essayBody += '\n\n\n\n\n' + } + this.setState({ essay, essayBody, essayModalVisible: true }) + } + hideEssay() { + this.setState({ essayModalVisible: false }) + } + showBios() { + this.setState({ biosVisible: true }) + } + hideBios() { + this.setState({ biosVisible: false }) } render() { const content = this.props.content + const essays = this.props.essays.map( (essay, i) => { + return ( + this.showEssay(essay)}> + + {essay.title} + {essay.byline} + + + ) + }) return ( - - {this.props.content.show} - - - - - {this.props.content.aiWeiWeiBio} - - - - {this.props.content.herzogBio} - - - {this.props.content.deMeuronBio} - - - + + {essays} + + this.showBios()}> + + Artist Biographies + Ai Weiwei, Jacques Herzog, Phillipe de Meuron + + + + + + + + + + + {this.props.content.aiWeiWeiBio} + + + + {this.props.content.herzogBio} + + + {this.props.content.deMeuronBio} + + + + + + + this.hideBios()} /> + + + + + + {this.state.essay.title.toUpperCase()} + {this.state.essay.byline} + + + + this.hideEssay()} /> + ); } } +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, + }, + + + bio: { + textAlign: 'left', + paddingRight: 10, + marginBottom: 20, + }, + face: { + width: 550, + height: 350, + marginBottom: 20, + }, + footer: { + marginBottom: 80, + }, + + essays: { + marginLeft: -55, + marginBottom: 20, + }, + essayContainer: { + padding: 10, + margin: 5, + }, + essayTitle: { + textDecorationColor: '#bbb', + textDecorationLine: 'underline', + }, + essayByline: { + fontSize: 12, + fontWeight: 'bold', + }, + essayHeader: { + paddingBottom: 0, + marginBottom: 0, + }, + essayBylineHeader: { + fontSize: 16, + fontWeight: 'bold', + marginBottom: 0, + }, + + modal: { + justifyContent: 'flex-start', + alignItems: 'center', + backgroundColor: 'rgb(0,0,0)', + margin: 0, + padding: 0, + }, + modalContainer: { + justifyContent: 'flex-start', + alignItems: 'center', + }, + modalBody: { + marginTop: 20, + width: '90%', + backgroundColor: 'black', + padding: 40, + marginBottom: 200, + }, + +}) + + + /* this.youtubePlayer = ref} @@ -75,40 +239,3 @@ export default class Information extends Component { 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: 450, - marginBottom: 20, - }, - footer: { - marginBottom: 80, - }, -}) diff --git a/client/src/lib/views/livestream.js b/client/src/lib/views/livestream.js index d3df460..ff06d0c 100644 --- a/client/src/lib/views/livestream.js +++ b/client/src/lib/views/livestream.js @@ -43,6 +43,8 @@ export default class Livestream extends Component { /> ) }).filter(button => !!button) + const first_buttons = buttons.slice(0, 3) + const second_buttons = buttons.slice(3) return ( @@ -51,7 +53,10 @@ export default class Livestream extends Component { - {buttons} + {first_buttons} + + + {second_buttons} {this.props.content.body} @@ -116,13 +121,20 @@ const styles = StyleSheet.create({ }, buttons: { width: '100%', - paddingTop: 20, + marginLeft: -25, + paddingTop: 30, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', }, + secondButtons: { + paddingTop: 0, + }, button: { - margin: 20, + marginTop: 0, + marginLeft: 10, + marginRight: 10, + marginBottom: 0, }, activeButtonText: { color: 'red', -- cgit v1.2.3-70-g09d2