From ceb48e104c3588c1cd5685a26fa2d772d2800056 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Sat, 3 Mar 2018 17:03:41 +1100 Subject: [PATCH] Added footer --- package.json | 1 + public/App.jsx | 2 + public/components/Footer.jsx | 47 +++++ public/components/navigation/Menu.jsx | 27 +++ public/components/pages/IndexPage.jsx | 16 +- public/components/pages/KitchenSinkPage.jsx | 160 ++++++++++++++++++ public/index.html | 3 +- public/styles/components/_app.scss | 6 +- public/styles/components/_footer.scss | 58 +++++++ public/styles/components/_menu.scss | 12 ++ public/styles/components/_page.scss | 1 + .../components/_section--style-body.scss | 1 + public/styles/components/_section.scss | 11 -- public/styles/elements/_a.scss | 5 + public/styles/elements/_table.scss | 10 ++ public/styles/index.scss | 6 +- public/styles/settings/colors.scss | 1 + 17 files changed, 352 insertions(+), 15 deletions(-) create mode 100644 public/components/Footer.jsx create mode 100644 public/components/navigation/Menu.jsx create mode 100644 public/components/pages/KitchenSinkPage.jsx create mode 100644 public/styles/components/_footer.scss create mode 100644 public/styles/components/_menu.scss create mode 100644 public/styles/elements/_table.scss diff --git a/package.json b/package.json index 97d5703..7f9376d 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "file-loader": "^1.1.9", "mysql-promise": "^4.1.0", "normalize.css": "^8.0.0", + "npm": "^5.7.1", "react": "^16.2.0", "react-dom": "^16.2.0", "three": "^0.90.0" diff --git a/public/App.jsx b/public/App.jsx index 73daa07..8757de4 100644 --- a/public/App.jsx +++ b/public/App.jsx @@ -12,6 +12,7 @@ import React from 'react'; import Header from './components/Header'; +import Footer from './components/Footer'; import IndexPage from './components/pages/IndexPage'; @@ -25,6 +26,7 @@ class App extends React.Component {
+
) } diff --git a/public/components/Footer.jsx b/public/components/Footer.jsx new file mode 100644 index 0000000..38c1e2a --- /dev/null +++ b/public/components/Footer.jsx @@ -0,0 +1,47 @@ +/* + * Header + * Header for page, contains navbar as well as other consistant top of page + * elements. + * + * Dependencies: + * styles/components/_header.scss + * + * Version: + * 1.0.0 - 2018/02/23 + */ + +import React from 'react'; + +const FooterLink = function(props) { + return ( + + + {props.children} + + + ) +} + +class Footer extends React.Component { + constructor(props) { + super(props); + } + + render() { + let year = new Date().getFullYear(); + return ( + + ) + } +} + +export default Footer; diff --git a/public/components/navigation/Menu.jsx b/public/components/navigation/Menu.jsx new file mode 100644 index 0000000..886615d --- /dev/null +++ b/public/components/navigation/Menu.jsx @@ -0,0 +1,27 @@ +/* + * Menu + * Simple expandable menu. + * + * Dependencies: + * styles/components/_menu.scss + * + * Version: + * 1.0.0 - 2018/03/01 + */ + +import React from 'react'; + +class Menu extends React.Component { + constructor(props) { + super(props); + } + + render() { + return ( + + ) + } +} + +export default Menu; diff --git a/public/components/pages/IndexPage.jsx b/public/components/pages/IndexPage.jsx index f0bb1c5..a37a98c 100644 --- a/public/components/pages/IndexPage.jsx +++ b/public/components/pages/IndexPage.jsx @@ -22,7 +22,21 @@ class IndexPage extends React.Component { - Lorem +

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

+

Lorem

) diff --git a/public/components/pages/KitchenSinkPage.jsx b/public/components/pages/KitchenSinkPage.jsx new file mode 100644 index 0000000..4f3be5c --- /dev/null +++ b/public/components/pages/KitchenSinkPage.jsx @@ -0,0 +1,160 @@ +import React from 'react'; + +import Page from './../Page'; +import Poly from './../sections/Poly'; +import BodySection from './../sections/BodySection'; + +class KitchenSinkPage extends React.Component { + constructor(props) { + super(props); + } + + render() { + return ( + + + + +

This is the primary heading and there should only be one of these per page

+

A small paragraph to emphasis and show important bits.

+
    +
  • This is a list item
  • +
  • So is this - there could be more
  • +
  • Make sure to style list items to: +
      +
    • Not forgetting child list items
    • +
    • Not forgetting child list items
    • +
    • Not forgetting child list items
    • +
    • Not forgetting child list items
    • +
  • +
  • A couple more
  • +
  • top level list items
  • +
+

Don't forget Ordered lists:

+
    +
  1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  2. +
  3. Aliquam tincidunt mauris eu risus. +
      +
    1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    2. +
    3. Aliquam tincidunt mauris eu risus.
    4. +
    +
  4. +
  5. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  6. +
  7. Aliquam tincidunt mauris eu risus.
  8. +
+ +

A sub heading which is not as important as the first, but is quite imporant overall

+

+ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Most Downloaded Movies on BitTorrent, 2011 +
RankMovieDownloadsGrosses
torrentfreak.com
1Fast Five9,260,000$626,137,675
2The Hangover II8,840,000$581,464,305
3Thor8,330,000$449,326,618
4Source Code7,910,000$123,278,618
5I Am Number Four7,670,000$144,500,437
6Sucker Punch7,200,000$89,792,502
7127 Hours6,910,000$60,738,797
8Rango6,480,000$245,155,348
9The King’s Speech6,250,000$414,211,549
10Harry Potter and the Deathly Hallows Part 26,030,000$1,328,111,219
+ +

A sub heading which is not as important as the second, but should be used with consideration

+

+ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. +

+ +
+

This is a properly formatted blockquote, btw. Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

+ +
+ +

A sub heading which is not as important as the second, but should be used with consideration

+

+ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. +

+
+

+ “Ooh - a blockquote! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.” +

+
+ +
+
+ ) + } +} + +export default KitchenSinkPage; diff --git a/public/index.html b/public/index.html index 12556e4..79d1032 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,7 @@ -
+
+
diff --git a/public/styles/components/_app.scss b/public/styles/components/_app.scss index 29966c7..80f64a0 100644 --- a/public/styles/components/_app.scss +++ b/public/styles/components/_app.scss @@ -7,9 +7,13 @@ * Version: * 1.0.0 - 2018/02/23 */ +.c-app__wrapper { + min-height: 100vh; + width: 100%; +} .c-app { width: 100%; - min-height: 100%; + height: 100%; overflow-x: hidden; position: relative; } diff --git a/public/styles/components/_footer.scss b/public/styles/components/_footer.scss new file mode 100644 index 0000000..c05ff71 --- /dev/null +++ b/public/styles/components/_footer.scss @@ -0,0 +1,58 @@ +/* + * Footer + * Styles for footer element + * + * Dependencies: + * styles/settings/responsive.scss + * styles/tools/_flex.scss + * styles/tools/_responsive.scss + * + * Version: + * 1.0.0 - 2018/03/03 + */ +$c-footer--text-color: black; +$c-footer--background-color: white; + +.c-footer { + margin-top: 5em; + width: 100%; + background: $c-footer--background-color; + @extend %t-flexbox; + @include t-flex-wrap(wrap); +} + +.c-footer__copyright { + color: $c-footer--text-color; +} + +.c-footer__copyright, +.c-footer__links { + width: 100%; + text-align: center; + padding: 1em; +} + +.c-footer__link { + display: block; +} + +@include t-media-query($s-small-up) { + .c-footer { + @include t-flex-wrap(nowrap); + } + + .c-footer__copyright { + text-align: left; + } + + .c-footer__links { + text-align: right; + } + + .c-footer__link { + display: inline; + + #{&}:before { + content: " | "; + } + } +} diff --git a/public/styles/components/_menu.scss b/public/styles/components/_menu.scss new file mode 100644 index 0000000..1a3790f --- /dev/null +++ b/public/styles/components/_menu.scss @@ -0,0 +1,12 @@ +/* + * Menu + * Styles for the menu + * + * Dependencies: + * + * Version: + * 1.0.0 - 2018/03/01 + */ +.c-menu { + position: relative; +} diff --git a/public/styles/components/_page.scss b/public/styles/components/_page.scss index 821f1f7..af5459c 100644 --- a/public/styles/components/_page.scss +++ b/public/styles/components/_page.scss @@ -8,4 +8,5 @@ * 1.0.0 - 2018/02/24 */ .c-page { + min-height: 100%; } diff --git a/public/styles/components/_section--style-body.scss b/public/styles/components/_section--style-body.scss index 53242c8..c375d39 100644 --- a/public/styles/components/_section--style-body.scss +++ b/public/styles/components/_section--style-body.scss @@ -12,6 +12,7 @@ */ .c-section--style-body { background: $s-color--background-default; + padding: 1em; } @include t-media-query($s-small-up) { diff --git a/public/styles/components/_section.scss b/public/styles/components/_section.scss index c93d310..31a8972 100644 --- a/public/styles/components/_section.scss +++ b/public/styles/components/_section.scss @@ -18,14 +18,3 @@ .c-section--full-width { max-width: none; } - -.c-section--style-body { - background: $s-color--background-default; -} - -@include t-media-query($s-small-up) { - .c-section--style-body { - margin-left: 4%; - @include t-box-shadow(-10px, 10px, 0px, rgba(0, 0, 0, 0.5)); - } -} diff --git a/public/styles/elements/_a.scss b/public/styles/elements/_a.scss index 346935c..f47a171 100644 --- a/public/styles/elements/_a.scss +++ b/public/styles/elements/_a.scss @@ -12,3 +12,8 @@ a { text-decoration: none; color: $s-color--links } + +a:hover { + text-decoration: underline; + color: $s-color--links-hover; +} diff --git a/public/styles/elements/_table.scss b/public/styles/elements/_table.scss new file mode 100644 index 0000000..f245f9c --- /dev/null +++ b/public/styles/elements/_table.scss @@ -0,0 +1,10 @@ +/* + * Table Element Styles + * Styles for body style section + * + * Version: + * 1.0.0 - 2018/03/02 + */ +table { + width: 100%; +} diff --git a/public/styles/index.scss b/public/styles/index.scss index 939609b..f23f5f7 100644 --- a/public/styles/index.scss +++ b/public/styles/index.scss @@ -4,7 +4,7 @@ * Copyright 2018 Dominic "YouWish" Masters * * Version: - * 0.0.1 - 2018/02/23 + * 0.0.1 - 2018/03/03 */ //Settings @@ -32,15 +32,19 @@ @import './elements/_button.scss'; @import './elements/_headings.scss'; @import './elements/_html.scss'; +@import './elements/_table.scss'; //Objects //Components @import './components/_app.scss'; +@import './components/_footer.scss'; @import './components/_header.scss'; +@import './components/_menu.scss'; @import './components/_navbar.scss'; @import './components/_page.scss'; @import './components/_section.scss'; +@import './components/_section--style-body.scss'; @import './components/_section--style-poly.scss'; //Utilities diff --git a/public/styles/settings/colors.scss b/public/styles/settings/colors.scss index 44cff02..8ea9395 100644 --- a/public/styles/settings/colors.scss +++ b/public/styles/settings/colors.scss @@ -11,6 +11,7 @@ //Fonts $s-color--text: black; $s-color--links: #FC78DE; +$s-color--links-hover: lighten($s-color--links, 20%); //Backgrounds $s-color--background-default: white;