diff options
Diffstat (limited to 'animism-align/frontend/app/views/viewer/nav')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/nav/eflux.chrome.js | 32 | ||||
| -rw-r--r-- | animism-align/frontend/app/views/viewer/nav/eflux.css | 44 |
2 files changed, 41 insertions, 35 deletions
diff --git a/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js b/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js index e58e2e1..bc7e4e7 100644 --- a/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js +++ b/animism-align/frontend/app/views/viewer/nav/eflux.chrome.js @@ -7,6 +7,7 @@ import { import { PlayButton } from './viewer.icons' import actions from 'app/actions' import { URLS } from 'app/constants' +import { isHandheld } from 'app/utils' const PLAY_MESSAGES = { not_started: 'Start the Exhibition', @@ -66,6 +67,7 @@ class EfluxChrome extends Component { if (navStyle) className += ' ' + navStyle if (navGradient) className += ' gradient' if (transcriptOpen) className += ' transcript-open' + if (isFullscreen) className += ' is-fullscreen' return ( <div className={className}> <div className="eflux-gradient" /> @@ -81,20 +83,9 @@ class EfluxChrome extends Component { <div className={growlOpen ? "growl-tooltip growl-message open" : "growl-tooltip growl-message"}> {growlMessage} </div> + {isFullscreen && fullscreenVisible && isHandheld && this.renderCloseButton()} <div className="eflux-nav"> - {isFullscreen && fullscreenVisible && - <div - className="fullscreen-close" - onMouseEnter={() => this.handleMouseEnter('close')} - onMouseLeave={() => this.handleMouseLeave('close')} - onClick={() => { - actions.viewer.toggleFullscreenVisible(false) - this.handleMouseLeave('close') - }} - > - {EfluxClose} - </div> - } + {isFullscreen && fullscreenVisible && !isHandheld && this.renderCloseButton()} <span onMouseEnter={() => this.handleMouseEnter('play')} onMouseLeave={() => this.handleMouseLeave('play')} @@ -143,6 +134,21 @@ class EfluxChrome extends Component { </div> ) } + renderCloseButton() { + return ( + <div + className="fullscreen-close" + onMouseEnter={() => this.handleMouseEnter('close')} + onMouseLeave={() => this.handleMouseLeave('close')} + onClick={() => { + actions.viewer.toggleFullscreenVisible(false) + this.handleMouseLeave('close') + }} + > + {EfluxClose} + </div> + ) + } } const mapStateToProps = state => ({ diff --git a/animism-align/frontend/app/views/viewer/nav/eflux.css b/animism-align/frontend/app/views/viewer/nav/eflux.css index cc5ce04..3c464ae 100644 --- a/animism-align/frontend/app/views/viewer/nav/eflux.css +++ b/animism-align/frontend/app/views/viewer/nav/eflux.css @@ -28,7 +28,7 @@ top: 20px; left: 28px; } -.eflux-logo svg { +.eflux-header .eflux-logo svg { /* width: 218.3px; height: 65px; @@ -43,9 +43,9 @@ top: 1rem; right: 1.75rem; } -.eflux-nav .fullscreen-close, -.eflux-nav .playToggle, -.eflux-nav .transcript-icon { +.eflux-header .fullscreen-close, +.eflux-header .playToggle, +.eflux-header .transcript-icon { display: flex; justify-content: center; align-items: center; @@ -57,30 +57,30 @@ margin-left: 1rem; cursor: pointer; } -.eflux-nav .fullscreen-close:hover, -.eflux-nav .playToggle:hover, -.eflux-nav .transcript-icon:hover { +.eflux-header .fullscreen-close:hover, +.eflux-header .playToggle:hover, +.eflux-header .transcript-icon:hover { background: #ddd; } -.eflux-nav svg { +.eflux-header svg { width: 2rem; height: 2rem; } -.eflux-nav .playToggle svg { +.eflux-header .playToggle svg { width: 2.5rem; height: 2.5rem; } -.eflux-nav .playToggle.paused svg { +.eflux-header .playToggle.paused svg { margin-left: 2px; } -.eflux-nav .fullscreen-close svg { +.eflux-header .fullscreen-close svg { width: 1rem; } -.eflux-nav svg path { +.eflux-header svg path { fill: #000; } -.eflux-nav svg line { +.eflux-header svg line { stroke: #000; } @@ -99,23 +99,23 @@ stroke: #fff; } -.black .eflux-nav .fullscreen-close, -.black .eflux-nav .playToggle, -.black .eflux-nav .transcript-icon { +.black .eflux-header .fullscreen-close, +.black .eflux-header .playToggle, +.black .eflux-header .transcript-icon { background: #222; } -.black .eflux-nav .fullscreen-close:hover, -.black .eflux-nav .playToggle:hover, -.black .eflux-nav .transcript-icon:hover { +.black .eflux-header .fullscreen-close:hover, +.black .eflux-header .playToggle:hover, +.black .eflux-header .transcript-icon:hover { background: #444; } -.black .eflux-nav svg path { +.black .eflux-header svg path { fill: #fff; } -.black .eflux-nav svg polygon { +.black .eflux-header svg polygon { fill: #fff; } -.black .eflux-nav svg line { +.black .eflux-header svg line { stroke: #fff; } |
