From 4c2aecd73d9bfc7c2da91c6c983fbec222b343ff Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Thu, 13 Sep 2018 22:13:53 +0100 Subject: [PATCH] Welcome/sidebar transitions --- app/package-lock.json | 26 +++++++++++++++++----- app/package.json | 1 + app/src/frontend/app.js | 43 ++++++++++++++++++++---------------- app/src/frontend/main.css | 41 ++++++++++++++++++++++++++++++++++ app/src/frontend/sidebar.css | 8 ------- app/src/frontend/welcome.css | 10 ++------- app/src/frontend/welcome.js | 2 +- 7 files changed, 90 insertions(+), 41 deletions(-) diff --git a/app/package-lock.json b/app/package-lock.json index 8ddc11b1..6177c4c4 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -3447,6 +3447,11 @@ "esutils": "^2.0.2" } }, + "dom-helpers": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", + "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" + }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -8320,11 +8325,6 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, - "path-to-regexp": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.4.0.tgz", - "integrity": "sha512-G6zHoVqC6GGTQkZwF4lkuEyMbVOjoBKAEybQUypI1WTkqinCOrq2x6U2+phkJ1XsEMTy4LjtwPI7HW+NVrRR2w==" - }, "path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -10212,6 +10212,11 @@ "resolved": "https://registry.npmjs.org/react-leaflet-universal/-/react-leaflet-universal-1.2.0.tgz", "integrity": "sha512-Wl0p9HonxGnyTly+gfiotj5f0Su/ZD7omZ5ko0ji3lEuJe4nsokbz9UcLt9CaR/C33Ha4OmzPn8I/XqwKJUs7g==" }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "react-router": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", @@ -10254,6 +10259,17 @@ "warning": "^4.0.1" } }, + "react-transition-group": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.4.0.tgz", + "integrity": "sha512-Xv5d55NkJUxUzLCImGSanK8Cl/30sgpOEMGc5m86t8+kZwrPxPCPcFqyx83kkr+5Lz5gs6djuvE5By+gce+VjA==", + "requires": { + "dom-helpers": "^3.3.1", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.2", + "react-lifecycles-compat": "^3.0.4" + } + }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", diff --git a/app/package.json b/app/package.json index 6ccb7b65..69607aec 100644 --- a/app/package.json +++ b/app/package.json @@ -25,6 +25,7 @@ "react-leaflet": "^1.0.1", "react-leaflet-universal": "^1.2.0", "react-router-dom": "4.3.1", + "react-transition-group": "^2.4.0", "serialize-javascript": "^1.5.0" }, "devDependencies": { diff --git a/app/src/frontend/app.js b/app/src/frontend/app.js index 8c5885d1..449b7cbd 100644 --- a/app/src/frontend/app.js +++ b/app/src/frontend/app.js @@ -1,5 +1,6 @@ import React, { Fragment } from 'react'; import { Route, Switch, Link } from 'react-router-dom'; +import { TransitionGroup, CSSTransition } from 'react-transition-group' import AboutPage from './about'; import BetaBanner from './beta-banner'; @@ -50,26 +51,30 @@ class App extends React.Component {
- ( + ( - - - - - - - - - - - - + + + + + + + + + + + + + + + + (

Welcome to Colouring London

Colour in, view and download data on London's buildings

+ className="btn btn-outline-dark btn-lg btn-block"> Start Colouring