From 483fdeac8f6f4f6d6ddca9d770bb37a405feaf41 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 24 Jul 2020 15:04:58 +0200 Subject: showing and hiding stuff --- .../frontend/app/views/viewer/sections/sections.css | 5 +++++ .../app/views/viewer/sections/viewer.sections.nav.js | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/sections') diff --git a/animism-align/frontend/app/views/viewer/sections/sections.css b/animism-align/frontend/app/views/viewer/sections/sections.css index e107d3f..a94b712 100644 --- a/animism-align/frontend/app/views/viewer/sections/sections.css +++ b/animism-align/frontend/app/views/viewer/sections/sections.css @@ -16,6 +16,11 @@ .nav-open .viewer-sections { transform: translateZ(0) translateY(0); } +.checklist-open .viewer-sections { + transform: translateZ(0) translateY(calc(3rem - 100vh)); + z-index: 20; +} + .viewer-sections .viewer-section { display: inline-flex; white-space: normal; diff --git a/animism-align/frontend/app/views/viewer/sections/viewer.sections.nav.js b/animism-align/frontend/app/views/viewer/sections/viewer.sections.nav.js index a619d81..439b905 100644 --- a/animism-align/frontend/app/views/viewer/sections/viewer.sections.nav.js +++ b/animism-align/frontend/app/views/viewer/sections/viewer.sections.nav.js @@ -6,13 +6,10 @@ import actions from 'app/actions' import { Arrow } from '../nav/viewer.icons' class ViewerSectionsNav extends Component { - componentDidMount() { - } - render() { - const { } = this.props + const { viewer } = this.props return ( -
+
@@ -21,13 +18,16 @@ class ViewerSectionsNav extends Component {
- - + actions.viewer.toggleSection('checklist')}> + {'Checklist'}
- actions.viewer.showSection('transcript')}> + { + actions.viewer.hideSection('checklist') + actions.viewer.toggleSection('transcript') + }}> {'Transcript'}
@@ -38,6 +38,7 @@ class ViewerSectionsNav extends Component { } const mapStateToProps = state => ({ + viewer: state.viewer, }) export default connect(mapStateToProps)(ViewerSectionsNav) -- cgit v1.2.3-70-g09d2