From fd1b23919a9abbd8a3b3a8bbff8067615ff447f5 Mon Sep 17 00:00:00 2001 From: mama Date: Thu, 21 Dec 2017 16:44:15 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20message=20de=20mise=20=C3=A0=20j?= =?UTF-8?q?our=20du=20site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/TargetSelection.css | 2 +- source/components/pages/Home.css | 18 +++++++++++++++++- source/components/pages/Home.js | 23 ++++++++++++++++++----- source/containers/Layout.css | 5 ----- source/engine/generateQuestions.js | 1 + 5 files changed, 37 insertions(+), 12 deletions(-) diff --git a/source/components/TargetSelection.css b/source/components/TargetSelection.css index 59862364c..23dbe10dd 100644 --- a/source/components/TargetSelection.css +++ b/source/components/TargetSelection.css @@ -1,5 +1,5 @@ #targetSelection { - height: 40em; + height: 35em; display: flex; justify-content: space-around; align-items: center; diff --git a/source/components/pages/Home.css b/source/components/pages/Home.css index 8add3eabe..fe9efd1da 100644 --- a/source/components/pages/Home.css +++ b/source/components/pages/Home.css @@ -1,4 +1,20 @@ - +#updateMessage { + display: flex; + align-items: center; + max-width: 30em; + margin: 0 auto; +} +#updateMessage p { + color: #4b4b66; + font-size: 85%; + transition: 0.8s opacity; + transition-delay: 0.2s; +} +#updateMessage i { + color: #2975d1; + margin-right: 1em; + transition: 0.8s opacity; +} #home > #content { display: flex; diff --git a/source/components/pages/Home.js b/source/components/pages/Home.js index ffb0fbfe2..927e3d7d8 100644 --- a/source/components/pages/Home.js +++ b/source/components/pages/Home.js @@ -1,21 +1,34 @@ import React, { Component } from 'react' import './Pages.css' import './Home.css' -import ReactPiwik from 'Components/Tracker' //TODO réintégrer Piwik import TargetSelection from '../TargetSelection' - export default class Home extends Component { - + state = { + updateMessage: false + } + componentDidMount() { + setTimeout(() => this.setState({ showUpdateMessage: true }), 1000) + } render() { - + let opacityStyle = { opacity: this.state.showUpdateMessage ? 1 : 0 } return (
+
+