From f1b10e223ef782a5a831bd344b47a97d843d4b7b Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Wed, 24 Oct 2018 09:06:18 +1100 Subject: [PATCH] Cleaned more code, still untested. --- public/components/App.jsx | 16 ++- .../_app.scss => components/App.scss} | 2 + public/components/footer/Footer.jsx | 4 +- public/components/footer/Footer.scss | 4 +- public/components/nav/menu/HamburgerMenu.scss | 6 +- public/components/nav/navbar/Navbar.jsx | 7 +- .../nav/navbar/Navbar.scss} | 14 ++- public/components/page/Page.jsx | 8 +- .../_page.scss => components/page/Page.scss} | 5 +- .../page/{ => boundary}/PageBoundary.jsx | 14 ++- .../page/boundary/PageBoundary.scss | 22 ++++ public/components/page/{ => route}/Routes.jsx | 68 ++++-------- public/components/section/Section.jsx | 31 +++--- .../section/Section.scss} | 2 + .../section/blog/FeaturedBlogSection.jsx | 66 ----------- .../components/section/body/BodySection.jsx | 5 +- .../section/body/BodySection.scss} | 2 + .../components/section/image/ImageSection.jsx | 3 + .../section/image/ImageSection.scss} | 4 +- .../section/layout/ClearSection.jsx | 3 + .../section/layout/ClearSection.scss} | 2 + .../section/layout/SplitSection.jsx | 24 ++-- .../section/layout/SplitSection.scss} | 12 +- .../components/section/video/VideoSection.jsx | 46 ++++---- .../section/video/VideoSection.scss} | 2 + public/styles/components/_hamburger-menu.scss | 104 ------------------ public/styles/components/_main.scss | 8 -- webpack.config.js | 12 +- 28 files changed, 183 insertions(+), 313 deletions(-) rename public/{styles/components/_app.scss => components/App.scss} (89%) rename public/{styles/components/_navbar.scss => components/nav/navbar/Navbar.scss} (90%) rename public/{styles/components/_page.scss => components/page/Page.scss} (89%) rename public/components/page/{ => boundary}/PageBoundary.jsx (83%) create mode 100644 public/components/page/boundary/PageBoundary.scss rename public/components/page/{ => route}/Routes.jsx (58%) rename public/{styles/components/_section.scss => components/section/Section.scss} (88%) delete mode 100644 public/components/section/blog/FeaturedBlogSection.jsx rename public/{styles/components/_body-section.scss => components/section/body/BodySection.scss} (92%) rename public/{styles/components/_image-section.scss => components/section/image/ImageSection.scss} (96%) rename public/{styles/components/_clear-section.scss => components/section/layout/ClearSection.scss} (91%) rename public/{styles/components/_split-section.scss => components/section/layout/SplitSection.scss} (73%) rename public/{styles/components/_video-section.scss => components/section/video/VideoSection.scss} (92%) delete mode 100644 public/styles/components/_hamburger-menu.scss delete mode 100644 public/styles/components/_main.scss diff --git a/public/components/App.jsx b/public/components/App.jsx index a603775..4571fc7 100644 --- a/public/components/App.jsx +++ b/public/components/App.jsx @@ -25,12 +25,15 @@ import React from 'react'; import { connect } from 'react-redux'; import { HashRouter, BrowserRouter } from 'react-router-dom'; -import Background from '@objects/background/Background'; +import Styles from './App.scss'; + import Header from './header/Header'; import Footer from './footer/Footer'; -import Routes, { RouteWrapper } from './page/Routes'; +import Routes, { RouteWrapper } from './page/route/Routes'; import Favicon from './Favicon'; +import Background from '@objects/background/Background'; + //Routes Definitions const AppRoutes = (props) => { return ( @@ -67,7 +70,7 @@ class App extends React.Component { let clazz = "c-app"; //Append any other clazzes there may be. - if(className) clazz += " " + className; + if(className) clazz += ` ${className}`; //For testing you can switch the router type let RouterType = BrowserRouter; @@ -75,10 +78,13 @@ class App extends React.Component { return ( -
+
- this.onEntering() } /> +
+ this.onEntering() } /> +
+
); diff --git a/public/styles/components/_app.scss b/public/components/App.scss similarity index 89% rename from public/styles/components/_app.scss rename to public/components/App.scss index 30787d6..f7fe3c8 100644 --- a/public/styles/components/_app.scss +++ b/public/components/App.scss @@ -8,6 +8,8 @@ * Version: * 1.0.0 - 2018/05/03 */ +@import '~@styles/global'; + .c-app { overflow-x: hidden;//Temporary until I find time to find the overflowing element } diff --git a/public/components/footer/Footer.jsx b/public/components/footer/Footer.jsx index 32813a3..4b41edc 100644 --- a/public/components/footer/Footer.jsx +++ b/public/components/footer/Footer.jsx @@ -34,7 +34,7 @@ import { PageBoundary } from '@components/page/Page'; const FooterLink = (props) => { let { title, className } = props; return ( - + { Language.get(`footer.links.${title}`) } ); @@ -51,7 +51,7 @@ class Footer extends React.Component { let { className } = this.props; return ( -