🎨 Le menu est maintenant visible tout le temps

En mode iFrame, le logo est remplace par le mode plein ecran
pull/191/head
Mael 2018-04-30 15:10:01 +02:00
parent 2f675ca9d1
commit 467f289970
2 changed files with 24 additions and 34 deletions

View File

@ -22,41 +22,31 @@ export class Header extends Component {
this.setState({ mobileNavVisible: !this.state.mobileNavVisible })
render() {
let { location } = this.props
let appMode = ['/simu', '/règle'].find(t => location.pathname.includes(t))
if (this.props.iframe)
return screenfull.enabled ? (
<div
id="iframeFullscreen"
onClick={() => screenfull.toggle()}
className={appMode ? 'absolute' : ''}>
{!appMode && (
<span>
<Trans>Mode plein écran</Trans>
</span>
)}
<i
className="fa fa-arrows-alt"
aria-hidden="true"
style={{ color: this.props.textColourOnWhite }}
/>
</div>
) : null
let displayHeader = !appMode
if (!displayHeader) return null
return (
<div id="header">
<Link id="brand" to="/">
<img
id="logo"
src={require('Images/logo/logo-simulateur.svg')}
alt="Un service de l'État français"
/>
<h1>Simulateur d'embauche</h1>
</Link>
{!this.props.iframe && (
<Link id="brand" to="/">
<img
id="logo"
src={require('Images/logo/logo-simulateur.svg')}
alt="Un service de l'État français"
/>
<h1>Simulateur d'embauche</h1>
</Link>
)}
{this.props.iframe &&
screenfull.enabled && (
<div id="iframeFullscreen" onClick={() => screenfull.toggle()}>
<span>
<Trans>Plein écran</Trans>
</span>
<i
className="fa fa-arrows-alt"
aria-hidden="true"
style={{ color: this.props.textColourOnWhite }}
/>
</div>
)}
<div id="headerRight">
<nav className={this.state.mobileNavVisible ? 'visible' : ''}>
<Links toggle={this.togglemobileNavVisible} />

View File

@ -19,7 +19,7 @@ unsatisfied: Awaiting your answers…
Échap: Esc
Entrée: Enter
À propos: About (fr)
Mode plein écran: Full screen
Plein écran: Fullscreen
first: Your first estimate is now available!
lastQ: One last question!
questionsLeft: Fewer than <1>{{nbQuestions}}</1> questions to go…