diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2021-03-31 23:11:37 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2021-03-31 23:11:37 +0200 |
| commit | 8c733583739517ff453d561f3b8fc5ca0d334819 (patch) | |
| tree | 13c1a483bf83f389aaca7cad0077ecba49038227 | |
| parent | 6d76b41fa9f1eae186606b42e20ebfa5cbd438b1 (diff) | |
fix navigation... need to go to start page first
| -rw-r--r-- | frontend/site/projects/museum/app.js | 7 | ||||
| -rw-r--r-- | frontend/site/projects/museum/views/home.css | 3 | ||||
| -rw-r--r-- | frontend/site/viewer/viewer.container.js | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/frontend/site/projects/museum/app.js b/frontend/site/projects/museum/app.js index caa8c3c..4c51590 100644 --- a/frontend/site/projects/museum/app.js +++ b/frontend/site/projects/museum/app.js @@ -18,8 +18,11 @@ export default class App extends Component { <ConnectedRouter history={this.props.history}> <div className='app'> <Route path={'/last-museum/:page_name'} component={ViewerContainer} exact /> - <Route path={'/last-museum/'} component={ViewerContainer} exact /> - <Route path={'/last-museum/'} component={Home} exact /> + <Route path={'/last-museum/start'} component={Home} exact /> + <Route exact key='root' path='/last-museum/' render={() => { + setTimeout(() => this.props.history.push('/last-museum/start'), 10) + return null + }} /> </div> </ConnectedRouter> ) diff --git a/frontend/site/projects/museum/views/home.css b/frontend/site/projects/museum/views/home.css index 84f157d..7cfa5a0 100644 --- a/frontend/site/projects/museum/views/home.css +++ b/frontend/site/projects/museum/views/home.css @@ -20,6 +20,7 @@ color: #FF790D; text-shadow: 0px 0px 5px #FF790D; opacity: 1; + white-space: nowrap; transition: opacity 0.2s; font-size: 2.2vh; width: 100vw; @@ -31,6 +32,7 @@ font-weight: 900; font-style: italic; color: #FF790D; + white-space: nowrap; text-shadow: 0px 0px 10px #FF790D; font-size: 49vh; position: absolute; @@ -45,6 +47,7 @@ color: #FF790D; text-shadow: 0px 0px 5px #FF790D; opacity: 1; + white-space: nowrap; transition: opacity 0.2s; width: 50vw; font-size: 3vh; diff --git a/frontend/site/viewer/viewer.container.js b/frontend/site/viewer/viewer.container.js index 8c2715e..24534f6 100644 --- a/frontend/site/viewer/viewer.container.js +++ b/frontend/site/viewer/viewer.container.js @@ -37,6 +37,7 @@ class ViewerContainer extends Component { if (this.props.graph !== prevProps.graph || this.props.location.pathname !== prevProps.location.pathname) { this.load() } + console.log(this.props.location.pathname, prevProps.location.pathname, this.props.interactive) if (this.props.interactive && (this.props.interactive !== prevProps.interactive)) { this.setState({ roadblock: false }) this.props.audio.player.playPage(this.state.page) @@ -57,8 +58,9 @@ class ViewerContainer extends Component { // this.setState({ unloaded: true }) // return // } - console.log(this.props.interactive) + // console.log(this.props.interactive) const page = pages[page_path] || pages[home_page] + console.log("show page", page.id) if (!this.props.interactive && hasAutoplay(page)) { this.setState({ page, popups: {}, hidden: {}, roadblock: true, unloaded: false }) } else { |
