├── .gitignore ├── .babelrc ├── dev ├── scss │ ├── themes │ │ └── default │ │ │ ├── _headings.scss │ │ │ ├── _blockquote.scss │ │ │ ├── _forms.scss │ │ │ ├── _panels.scss │ │ │ ├── _tables.scss │ │ │ ├── _text.scss │ │ │ ├── _notifications.scss │ │ │ ├── _breadcrumbs.scss │ │ │ ├── _pagination.scss │ │ │ ├── _media_objects.scss │ │ │ ├── _buttons.scss │ │ │ ├── _progress_bars.scss │ │ │ ├── _master.scss │ │ │ ├── _accordion.scss │ │ │ ├── _tabs.scss │ │ │ ├── charts │ │ │ └── _bar.scss │ │ │ ├── _pricing_tables.scss │ │ │ ├── _modal.scss │ │ │ ├── _variables.scss │ │ │ └── _navigation.scss │ ├── style.scss │ ├── _grid.scss │ └── _normalize.scss └── js │ ├── components │ ├── Homepage.js │ ├── Videos.js │ ├── Forum.js │ ├── Footer.js │ ├── Layout.js │ ├── Header.js │ └── Blog.js │ └── main.js ├── src └── index.html ├── webpack.config.js ├── README.md └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "es2015", 4 | "react" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_headings.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | h1, h2, h3, h4, h5, h6{ 4 | font-weight: 500; 5 | margin-bottom: 6px; 6 | } 7 | -------------------------------------------------------------------------------- /dev/js/components/Homepage.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default class Homepage extends React.Component { 4 | render() { 5 | return (

Homepage

); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /dev/js/components/Videos.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default class Videos extends React.Component { 4 | 5 | render() { 6 | return (

Videos

); 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /dev/js/components/Forum.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default class Forum extends React.Component { 4 | 5 | render() { 6 | return (

Forum

); 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /dev/js/components/Footer.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default class Footer extends React.Component { 4 | 5 | render() { 6 | return (

- footer here -

); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React Webpack 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_blockquote.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | blockquote{ 4 | border-left: 3px solid #eeeeee; 5 | margin: 0; 6 | padding-left: 15px; 7 | 8 | cite{ 9 | color: $default; 10 | display: block; 11 | font-size: 0.9em; 12 | font-style: normal; 13 | margin-top: 8px; 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /dev/scss/themes/default/_forms.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | form{ 4 | display: flex; 5 | flex-direction: column; 6 | 7 | .form-row{ 8 | display: flex; 9 | 10 | & > * { 11 | align-self: flex-start; 12 | margin-bottom: 1.2em; 13 | } 14 | 15 | label{ 16 | padding-right: 2em; 17 | width: 18%; 18 | } 19 | 20 | } 21 | 22 | } 23 | 24 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_panels.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | $panel-border: #bbbbbb; 4 | $panel-padding: 8px; 5 | 6 | .panel{ 7 | background-color: #f4f4f4; 8 | border: 1px solid $panel-border; 9 | margin-bottom: 15px; 10 | 11 | &-heading{ 12 | border-bottom: 1px solid $panel-border; 13 | font-weight: 700; 14 | padding: $panel-padding; 15 | } 16 | 17 | &-body{ 18 | padding: $panel-padding; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_tables.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | table { 4 | border-collapse: collapse; 5 | width: 100%; 6 | 7 | tr{ 8 | 9 | .table-cell{ 10 | border: 1px solid #ccc; 11 | padding: 4px 8px; 12 | text-align: left; 13 | } 14 | 15 | th { 16 | @extend .table-cell; 17 | background-color: #eee; 18 | font-weight: 500; 19 | } 20 | 21 | td { 22 | @extend .table-cell; 23 | } 24 | 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /dev/scss/themes/default/_text.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .text { 4 | font: $font-default; 5 | 6 | @each $name, $value in $theme-colors { 7 | &-#{$name} { 8 | color: $value; 9 | } 10 | } 11 | 12 | @each $name, $value in $theme-colors-light { 13 | &-#{$name} { 14 | color: $value; 15 | } 16 | } 17 | 18 | } 19 | 20 | .text { 21 | @each $name, $value in $font-weights { 22 | &-#{$name} { 23 | font-weight: $value; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /dev/js/components/Layout.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Footer from "./Footer"; 3 | import Header from "./Header"; 4 | require('../../scss/style.scss'); 5 | 6 | export default class Layout extends React.Component { 7 | 8 | render() { 9 | return ( 10 |
11 |
12 | {this.props.children} 13 |
15 | ); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_notifications.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .notification{ 4 | color: #FFFFFF; 5 | margin: 4px 0; 6 | padding: 8px 12px; 7 | } 8 | 9 | @each $name, $value in $theme-colors { 10 | .notification-#{$name} { 11 | @extend .notification; 12 | background-color: $value; 13 | } 14 | } 15 | 16 | @each $name, $value in $theme-colors-light { 17 | .notification-#{$name} { 18 | @extend .notification; 19 | background-color: $value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .breadcrumbs{ 4 | color: $default-light * 1.1; 5 | font-family: 'Open Sans', sans-serif; 6 | font-size: 0.9em; 7 | 8 | a{ 9 | color: $default; 10 | margin: 0 1px; 11 | 12 | &:first-child{ 13 | margin-left: 0; 14 | } 15 | 16 | &:last-child{ 17 | color: $secondary; 18 | font-weight: 600; 19 | } 20 | 21 | &:hover { 22 | color: $default-light; 23 | text-decoration: underline; 24 | } 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_pagination.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | $pagination-border: #bbbbbb; 4 | 5 | .pagination { 6 | border: 1px solid $pagination-border; 7 | border-right: none; 8 | display: inline-flex; 9 | margin: 0; 10 | list-style-type: none; 11 | padding: 0; 12 | 13 | li { 14 | display: inline-block; 15 | 16 | a { 17 | border-right: 1px solid $pagination-border; 18 | display: inline-block; 19 | padding: 8px 12px; 20 | 21 | &:hover, &.selected { 22 | background-color: #e6e6e6; 23 | } 24 | 25 | } 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_media_objects.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .media { 4 | align-items: flex-start; 5 | display: flex; 6 | 7 | .media-figure { 8 | margin-right: 0.8em; 9 | max-width: 30%; 10 | } 11 | 12 | .media-body { 13 | flex: 1; 14 | 15 | .title{ 16 | font-size: 1.1em; 17 | font-weight: 500; 18 | margin-bottom: 0.2em; 19 | } 20 | 21 | // Embedded media object 22 | .media{ 23 | padding-left: 0; 24 | 25 | .media-figure{ 26 | max-width: 20%; 27 | } 28 | 29 | .media-body > .title{ 30 | font-size: 1em; 31 | } 32 | } 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_buttons.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | @mixin button($bgColor) { 4 | background-color: $bgColor; 5 | border: none; 6 | color: #FFFFFF; 7 | font: $font-default; 8 | padding: 8px 12px; 9 | text-decoration: none; 10 | 11 | &:hover{ 12 | background-color: $bgColor * 0.8; 13 | cursor:pointer; 14 | } 15 | 16 | } 17 | 18 | .button { 19 | 20 | @each $name, $value in $theme-colors { 21 | &-#{$name} { 22 | @include button($value); 23 | } 24 | } 25 | 26 | @each $name, $value in $theme-colors-light { 27 | &-#{$name} { 28 | @include button($value); 29 | } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_progress_bars.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .progress-container { 4 | background-color: #DDDDDD; 5 | overflow: hidden; 6 | height: 1.2em; 7 | margin: 4px 0; 8 | 9 | .progress{ 10 | color: #FFF; 11 | font-size: 0.9em; 12 | height: 100%; 13 | line-height: 1.2em; 14 | padding: 0.1em 0; 15 | text-align: center; 16 | } 17 | 18 | @each $name, $value in $theme-colors { 19 | .progress-#{$name} { 20 | @extend .progress; 21 | background-color: $value; 22 | } 23 | } 24 | 25 | @each $name, $value in $theme-colors-light { 26 | .progress-#{$name} { 27 | @extend .progress; 28 | background-color: $value; 29 | } 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_master.scss: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900); 2 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600,700); 3 | @import "charts/bar"; 4 | @import "accordion"; 5 | @import "blockquote"; 6 | @import "breadcrumbs"; 7 | @import "buttons"; 8 | @import "headings"; 9 | @import "forms"; 10 | @import "media_objects"; 11 | @import "modal"; 12 | @import "navigation"; 13 | @import "notifications"; 14 | @import "pagination"; 15 | @import "panels"; 16 | @import "pricing_tables"; 17 | @import "progress_bars"; 18 | @import "tables"; 19 | @import "tabs"; 20 | @import "text"; 21 | 22 | body { 23 | font: $font-default; 24 | } 25 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_accordion.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | $accordion-border: #bbbbbb; 4 | $accordion-padding: 8px; 5 | 6 | .accordion { 7 | border: 1px solid $accordion-border; 8 | border-top: none; 9 | 10 | .item{ 11 | border-top: 1px solid $accordion-border; 12 | 13 | .title{ 14 | background-color: #f4f4f4; 15 | padding: $accordion-padding; 16 | 17 | &:hover{ 18 | background-color: #f4f4f4 * 0.9; 19 | cursor: pointer; 20 | } 21 | 22 | } 23 | 24 | .content{ 25 | padding: $accordion-padding; 26 | display: none; 27 | } 28 | 29 | .visible{ 30 | border-top: 1px solid $accordion-border; 31 | display: block; 32 | } 33 | 34 | &:last-child{ 35 | border-bottom: none; 36 | } 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /dev/scss/style.scss: -------------------------------------------------------------------------------- 1 | @import "normalize"; 2 | @import "grid"; 3 | @import "themes/default/master"; 4 | 5 | a, a:visited { 6 | color: $secondary; 7 | text-decoration: none; 8 | 9 | &:hover{ 10 | color: $secondary-light; 11 | } 12 | 13 | &.active{ 14 | background-color: $danger; 15 | } 16 | 17 | } 18 | 19 | .nav { 20 | 21 | a, a:visited { 22 | color: #ffffff; 23 | } 24 | 25 | } 26 | 27 | img { 28 | max-width: 100%; 29 | } 30 | 31 | hr { 32 | border-style: none; 33 | border-top: 1px solid ($default-light * 1.2); 34 | } 35 | 36 | p{ 37 | margin: 0 0 0.75em; 38 | } 39 | 40 | pre{ 41 | border: 1px solid ($default-light * 1.1) !important; 42 | padding: 6px 8px !important; 43 | } 44 | 45 | ul{ 46 | li{ 47 | list-style-type: disc; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /dev/js/components/Header.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {Link, IndexLink } from 'react-router'; 3 | 4 | export default class Header extends React.Component { 5 | 6 | render() { 7 | return ( 8 | 16 | ); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dev/js/main.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import {Router, Route, browserHistory, IndexRoute} from 'react-router'; 4 | import Layout from "./components/Layout"; 5 | import Blog from "./components/Blog"; 6 | import Forum from "./components/Forum"; 7 | import Homepage from "./components/Homepage"; 8 | import Videos from "./components/Videos"; 9 | 10 | ReactDOM.render(( 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ), document.getElementById('app')); 20 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_tabs.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .tab-nav{ 4 | background-color: $primary; 5 | display: flex; 6 | padding: 0; 7 | margin: 0; 8 | 9 | li { 10 | display: inline-block; 11 | list-style-type: none; 12 | 13 | a { 14 | border-right: 1px solid rgba(255, 255, 255, 0.05); 15 | color: #FFFFFF; 16 | display: inline-block; 17 | text-decoration: none; 18 | padding: 12px 20px; 19 | 20 | &:hover, &.active { 21 | background-color: $primary * 0.75; 22 | color: #FFFFFF; 23 | font-weight: normal; 24 | } 25 | } 26 | } 27 | 28 | } 29 | 30 | .tab-content{ 31 | border: 1px solid $default-light; 32 | border-top: none; 33 | 34 | padding: 12px 20px; 35 | 36 | & > div { 37 | display: none; 38 | 39 | &.visible{ 40 | display: block; 41 | } 42 | } 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var webpack = require('webpack'); 2 | 3 | module.exports = { 4 | 5 | entry: './dev/js/main.js', 6 | devServer: { 7 | inline: true, 8 | contentBase: './src', 9 | port: 3000 10 | }, 11 | module: { 12 | loaders : [ 13 | { 14 | test: /\.js$/, 15 | exclude: /(node_modules)/, 16 | loader: 'babel', 17 | query: { 18 | presets: ['react', 'es2015'] 19 | } 20 | }, 21 | { 22 | test: /\.scss/, 23 | loader: 'style-loader!css-loader!sass-loader' 24 | } 25 | ] 26 | }, 27 | devtool: 'cheap-module-eval-source-map', 28 | output: { 29 | path: 'src', 30 | filename: 'js/bundle.min.js' 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](http://i.imgur.com/vasUEBw.png) 2 | 3 | # Overview 4 | 5 | Source code and project files from thenewboston React-Router tutorial. 6 | 7 | ## Getting Started 8 | 9 | To get started, first install all the necessary dependencies. 10 | ``` 11 | > npm install 12 | ``` 13 | 14 | Run an initial webpack build 15 | ``` 16 | > webpack 17 | ``` 18 | 19 | Start the development server (changes will now update live in browser) 20 | ``` 21 | > npm run start 22 | ``` 23 | 24 | To view your project, go to: [http://localhost:3000/](http://localhost:3000/) 25 | 26 | ## Links 27 | 28 | - [Donate](https://www.patreon.com/thenewboston) 29 | - [thenewboston.com](https://thenewboston.com/) 30 | - [Facebook](https://www.facebook.com/TheNewBoston-464114846956315/) 31 | - [Twitter](https://twitter.com/bucky_roberts) 32 | - [Google+](https://plus.google.com/+BuckyRoberts) 33 | - [reddit](https://www.reddit.com/r/thenewboston/) 34 | -------------------------------------------------------------------------------- /dev/scss/themes/default/charts/_bar.scss: -------------------------------------------------------------------------------- 1 | @import "../variables"; 2 | 3 | $width: 130px; 4 | $row-height: 34px; 5 | $line-color: #e2e2e2; 6 | 7 | dl { 8 | display: flex; 9 | flex-direction: column; 10 | position: relative; 11 | 12 | .chart-row { 13 | background: repeating-linear-gradient(to right, $line-color, $line-color 1px, transparent 1px, transparent 5%); 14 | border-right: 1px solid $line-color; 15 | margin-left: $width + 20; 16 | padding: 2px 0; 17 | 18 | .label { 19 | align-items: center; 20 | display: flex; 21 | height: $row-height; 22 | justify-content: flex-end; 23 | left: 0; 24 | position: absolute; 25 | width: $width; 26 | } 27 | 28 | .bar{ 29 | background-color: $success; 30 | display: block; 31 | height: $row-height - 4; 32 | position: relative; 33 | 34 | &:hover, &:focus { 35 | background-color: $success * 0.8; 36 | cursor: pointer; 37 | } 38 | } 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_pricing_tables.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | $pricing-border: #bbb; 4 | 5 | .pricing-table { 6 | background-color: #f6f6f6; 7 | margin: 0 10px; 8 | 9 | & > * { 10 | padding: 10px; 11 | text-align: center; 12 | } 13 | 14 | .header{ 15 | background-color: $primary-light; 16 | 17 | .title{ 18 | color: white; 19 | display: block; 20 | font-size: 1.75em; 21 | font-weight: 300; 22 | } 23 | 24 | .sub-title { 25 | color: #ddd; 26 | display: block; 27 | font-weight: 300; 28 | } 29 | } 30 | 31 | .content, .footer { 32 | border-left: 1px solid $pricing-border; 33 | border-right: 1px solid $pricing-border; 34 | } 35 | 36 | .content { 37 | 38 | ul{ 39 | color: #444; 40 | line-height: 1.6em; 41 | margin: 0; 42 | padding: 0; 43 | 44 | li{ 45 | list-style-type: none; 46 | } 47 | } 48 | } 49 | 50 | .footer { 51 | border-bottom: 1px solid $pricing-border; 52 | border-top: 1px solid $pricing-border; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_modal.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | $modal-border: #cccccc; 4 | 5 | .modal { 6 | display: none; 7 | position: fixed; 8 | z-index: 1; 9 | left: 0; 10 | top: 0; 11 | width: 100%; 12 | height: 100%; 13 | overflow: auto; 14 | background-color: rgba(0, 0, 0, 0.4); 15 | 16 | .content { 17 | background-color: #fefefe; 18 | margin: 15% auto; 19 | border: 1px solid $modal-border; 20 | width: 80%; 21 | 22 | &-heading{ 23 | border-bottom: 1px solid $modal-border; 24 | display: flex; 25 | padding: 6px 10px 10px; 26 | 27 | .title{ 28 | font-weight: 700; 29 | padding-top: 10px; 30 | } 31 | 32 | .close { 33 | align-self: flex-end; 34 | border: 1px solid #dddddd; 35 | color: #bbbbbb; 36 | margin-left: auto; 37 | padding: 0 8px 2px 8px; 38 | 39 | &:hover, &:focus { 40 | background-color: #eee; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | 45 | } 46 | } 47 | 48 | &-body{ 49 | padding: 10px; 50 | } 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-router-lessons", 3 | "version": "1.0.1", 4 | "description": "Boilerplate for React webpack build.", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "webpack", 8 | "start": "webpack-dev-server" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/buckyroberts/React-Webpack.git" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/buckyroberts/React-Webpack/issues" 18 | }, 19 | "homepage": "https://github.com/buckyroberts/React-Webpack#readme", 20 | "dependencies": { 21 | "babel-core": "^6.10.4", 22 | "babel-loader": "^6.2.4", 23 | "babel-preset-es2015": "^6.9.0", 24 | "babel-preset-react": "^6.5.0", 25 | "css-loader": "^0.23.1", 26 | "node-sass": "^3.8.0", 27 | "react": "^15.1.0", 28 | "react-dom": "^15.1.0", 29 | "react-router": "^2.5.2", 30 | "sass-loader": "^3.2.2", 31 | "style-loader": "^0.13.1", 32 | "webpack": "^1.13.1", 33 | "webpack-dev-server": "^1.14.1" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_variables.scss: -------------------------------------------------------------------------------- 1 | $default: #7f8c8d; 2 | $danger: #c0392b; 3 | $info: #8e44ad; 4 | $primary: #2c3e50; 5 | $secondary: #2980b9; 6 | $success: #27ae60; 7 | $warning: #d35400; 8 | 9 | $default-light: #95a5a6; 10 | $danger-light: #e74c3c; 11 | $info-light: #9b59b6; 12 | $primary-light: #34495e; 13 | $secondary-light: #3498db; 14 | $success-light: #2ecc71; 15 | $warning-light: #e67e22; 16 | 17 | $theme-colors: 18 | (default, $default), 19 | (danger, $danger), 20 | (info, $info), 21 | (primary, $primary), 22 | (secondary, $secondary), 23 | (success, $success), 24 | (warning, $warning); 25 | 26 | $theme-colors-light: 27 | (default-light, $default-light), 28 | (danger-light, $danger-light), 29 | (info-light, $info-light), 30 | (primary-light, $primary-light), 31 | (secondary-light, $secondary-light), 32 | (success-light, $success-light), 33 | (warning-light, $warning-light); 34 | 35 | $font-default: 13px/1.4 'Roboto', sans-serif; 36 | 37 | $font-weights: 38 | (thin, 100), 39 | (light, 300), 40 | (normal, 400), 41 | (medium, 500), 42 | (bold, 700), 43 | (black, 900); -------------------------------------------------------------------------------- /dev/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | .demo-container{ 2 | background-color: #eee; 3 | border: 2px solid lightcoral; 4 | margin: 15px; 5 | } 6 | 7 | .demo-item{ 8 | background: deepskyblue; 9 | color: white; 10 | line-height: 50px; 11 | font-weight: 600; 12 | text-align: center; 13 | } 14 | 15 | // Default styling 16 | .container { 17 | display: flex; 18 | flex-wrap: wrap; 19 | 20 | .col-sm{ 21 | @for $i from 1 through 12 { 22 | &-#{$i} { 23 | width: 100%; 24 | } 25 | } 26 | } 27 | 28 | .col-md{ 29 | @for $i from 1 through 12 { 30 | &-#{$i} { 31 | width: 100%; 32 | } 33 | } 34 | } 35 | 36 | .col-lg{ 37 | @for $i from 1 through 12 { 38 | &-#{$i} { 39 | width: 100%; 40 | } 41 | } 42 | } 43 | 44 | } 45 | 46 | // Phones (small) 47 | @media (min-width: 0px) { 48 | .container{ 49 | .col-sm{ 50 | @for $i from 1 through 12 { 51 | &-#{$i} { 52 | width: $i / 12 * 100%; 53 | } 54 | } 55 | } 56 | } 57 | } 58 | 59 | // Tablets (medium) 60 | @media (min-width: 768px) { 61 | .container{ 62 | .col-md{ 63 | @for $i from 1 through 12 { 64 | &-#{$i} { 65 | width: $i / 12 * 100%; 66 | } 67 | } 68 | } 69 | } 70 | } 71 | 72 | // Desktops (large) 73 | @media (min-width: 1024px) { 74 | .container{ 75 | .col-lg{ 76 | @for $i from 1 through 12 { 77 | &-#{$i} { 78 | width: $i / 12 * 100%; 79 | } 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /dev/js/components/Blog.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {browserHistory} from 'react-router' 3 | 4 | export default class Blog extends React.Component { 5 | 6 | handleSubmit(e) { 7 | e.preventDefault(); 8 | const category = e.target.elements[0].value; 9 | const title = e.target.elements[1].value; 10 | const url = `/blog/${category}/${title}`; 11 | console.log(url); 12 | browserHistory.push(url); 13 | } 14 | 15 | render() { 16 | return ( 17 |
18 |

Category: {this.props.params.category}

19 |

Title: {this.props.params.title}

20 | 21 |
22 |
23 |
24 |
25 | 26 | 27 |
28 |
29 | 30 | 31 |
32 |
33 |
36 |
37 |
38 |
39 | 40 |
41 | ); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /dev/scss/themes/default/_navigation.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | $bgColor: $primary; 4 | 5 | .nav { 6 | background-color: $bgColor; 7 | padding: 0; 8 | margin: 0; 9 | 10 | li.item { 11 | list-style-type: none; 12 | } 13 | 14 | a { 15 | text-decoration: none; 16 | padding: 12px 20px; 17 | 18 | &:hover, &.active { 19 | background-color: $bgColor * 0.6; 20 | } 21 | } 22 | 23 | } 24 | 25 | .top-nav { 26 | @extend .nav; 27 | display: flex; 28 | 29 | li.item { 30 | border-right: 1px solid rgba(#ffffff, 0.1); 31 | display: inline-block; 32 | 33 | a { 34 | display: inline-block; 35 | 36 | img { 37 | max-width: 18px; 38 | margin: 3px 7px 6px 0; 39 | vertical-align: middle; 40 | } 41 | 42 | &.logo { 43 | font-weight: 500; 44 | .fa { 45 | margin-right: 6px; 46 | } 47 | } 48 | 49 | } 50 | 51 | // Drop down menu 52 | ul { 53 | background-color: $bgColor * 0.6; 54 | display: none; 55 | padding: 0; 56 | position: absolute; 57 | 58 | &.visible{ 59 | display: block; 60 | } 61 | 62 | li{ 63 | list-style-type: none; 64 | 65 | a { 66 | border-bottom: 1px solid rgba(#ffffff, 0.08); 67 | display: block; 68 | } 69 | 70 | } 71 | } 72 | 73 | } 74 | 75 | } 76 | 77 | .left-nav { 78 | @extend .nav; 79 | border-right: 1px solid rgba(#ffffff, 0.1); 80 | height: 100%; 81 | margin-top: 44px; 82 | width: 300px; 83 | position: fixed; 84 | top: 0; 85 | bottom: 0; 86 | left: 0; 87 | 88 | li.item { 89 | display: block; 90 | 91 | a { 92 | border-bottom: 1px solid rgba(#ffffff, 0.08); 93 | display: block; 94 | } 95 | 96 | // Drop down menu 97 | ul { 98 | background-color: rgba(0, 0, 0, 0.2); 99 | display: none; 100 | padding: 0; 101 | 102 | &.visible{ 103 | display: block; 104 | } 105 | 106 | li{ 107 | list-style-type: none; 108 | 109 | a { 110 | border-bottom: 1px solid rgba(#ffffff, 0.08); 111 | display: block; 112 | font-size: 0.95em; 113 | padding-left: 36px; 114 | } 115 | 116 | } 117 | } 118 | 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /dev/scss/_normalize.scss: -------------------------------------------------------------------------------- 1 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /** 4 | * 1. Change the default font family in all browsers (opinionated). 5 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 6 | */ 7 | 8 | html { 9 | font-family: sans-serif; /* 1 */ 10 | -ms-text-size-adjust: 100%; /* 2 */ 11 | -webkit-text-size-adjust: 100%; /* 2 */ 12 | } 13 | 14 | /** 15 | * Remove the margin in all browsers (opinionated). 16 | */ 17 | 18 | body { 19 | margin: 0; 20 | } 21 | 22 | /* HTML5 display definitions 23 | ========================================================================== */ 24 | 25 | /** 26 | * Add the correct display in IE 9-. 27 | * 1. Add the correct display in Edge, IE, and Firefox. 28 | * 2. Add the correct display in IE. 29 | */ 30 | 31 | article, 32 | aside, 33 | details, /* 1 */ 34 | figcaption, 35 | figure, 36 | footer, 37 | header, 38 | main, /* 2 */ 39 | menu, 40 | nav, 41 | section, 42 | summary { /* 1 */ 43 | display: block; 44 | } 45 | 46 | /** 47 | * Add the correct display in IE 9-. 48 | */ 49 | 50 | audio, 51 | canvas, 52 | progress, 53 | video { 54 | display: inline-block; 55 | } 56 | 57 | /** 58 | * Add the correct display in iOS 4-7. 59 | */ 60 | 61 | audio:not([controls]) { 62 | display: none; 63 | height: 0; 64 | } 65 | 66 | /** 67 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 68 | */ 69 | 70 | progress { 71 | vertical-align: baseline; 72 | } 73 | 74 | /** 75 | * Add the correct display in IE 10-. 76 | * 1. Add the correct display in IE. 77 | */ 78 | 79 | template, /* 1 */ 80 | [hidden] { 81 | display: none; 82 | } 83 | 84 | /* Links 85 | ========================================================================== */ 86 | 87 | /** 88 | * 1. Remove the gray background on active links in IE 10. 89 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 90 | */ 91 | 92 | a { 93 | background-color: transparent; /* 1 */ 94 | -webkit-text-decoration-skip: objects; /* 2 */ 95 | } 96 | 97 | /** 98 | * Remove the outline on focused links when they are also active or hovered 99 | * in all browsers (opinionated). 100 | */ 101 | 102 | a:active, 103 | a:hover { 104 | outline-width: 0; 105 | } 106 | 107 | /* Text-level semantics 108 | ========================================================================== */ 109 | 110 | /** 111 | * 1. Remove the bottom border in Firefox 39-. 112 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 113 | */ 114 | 115 | abbr[title] { 116 | border-bottom: none; /* 1 */ 117 | text-decoration: underline; /* 2 */ 118 | text-decoration: underline dotted; /* 2 */ 119 | } 120 | 121 | /** 122 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 123 | */ 124 | 125 | b, 126 | strong { 127 | font-weight: inherit; 128 | } 129 | 130 | /** 131 | * Add the correct font weight in Chrome, Edge, and Safari. 132 | */ 133 | 134 | b, 135 | strong { 136 | font-weight: bolder; 137 | } 138 | 139 | /** 140 | * Add the correct font style in Android 4.3-. 141 | */ 142 | 143 | dfn { 144 | font-style: italic; 145 | } 146 | 147 | /** 148 | * Correct the font size and margin on `h1` elements within `section` and 149 | * `article` contexts in Chrome, Firefox, and Safari. 150 | */ 151 | 152 | h1 { 153 | font-size: 2em; 154 | margin: 0.67em 0; 155 | } 156 | 157 | /** 158 | * Add the correct background and color in IE 9-. 159 | */ 160 | 161 | mark { 162 | background-color: #ff0; 163 | color: #000; 164 | } 165 | 166 | /** 167 | * Add the correct font size in all browsers. 168 | */ 169 | 170 | small { 171 | font-size: 80%; 172 | } 173 | 174 | /** 175 | * Prevent `sub` and `sup` elements from affecting the line height in 176 | * all browsers. 177 | */ 178 | 179 | sub, 180 | sup { 181 | font-size: 75%; 182 | line-height: 0; 183 | position: relative; 184 | vertical-align: baseline; 185 | } 186 | 187 | sub { 188 | bottom: -0.25em; 189 | } 190 | 191 | sup { 192 | top: -0.5em; 193 | } 194 | 195 | /* Embedded content 196 | ========================================================================== */ 197 | 198 | /** 199 | * Remove the border on images inside links in IE 10-. 200 | */ 201 | 202 | img { 203 | border-style: none; 204 | } 205 | 206 | /** 207 | * Hide the overflow in IE. 208 | */ 209 | 210 | svg:not(:root) { 211 | overflow: hidden; 212 | } 213 | 214 | /* Grouping content 215 | ========================================================================== */ 216 | 217 | /** 218 | * 1. Correct the inheritance and scaling of font size in all browsers. 219 | * 2. Correct the odd `em` font sizing in all browsers. 220 | */ 221 | 222 | code, 223 | kbd, 224 | pre, 225 | samp { 226 | font-family: monospace, monospace; /* 1 */ 227 | font-size: 1em; /* 2 */ 228 | } 229 | 230 | /** 231 | * Add the correct margin in IE 8. 232 | */ 233 | 234 | figure { 235 | margin: 1em 40px; 236 | } 237 | 238 | /** 239 | * 1. Add the correct box sizing in Firefox. 240 | * 2. Show the overflow in Edge and IE. 241 | */ 242 | 243 | hr { 244 | box-sizing: content-box; /* 1 */ 245 | height: 0; /* 1 */ 246 | overflow: visible; /* 2 */ 247 | } 248 | 249 | /* Forms 250 | ========================================================================== */ 251 | 252 | /** 253 | * 1. Change font properties to `inherit` in all browsers (opinionated). 254 | * 2. Remove the margin in Firefox and Safari. 255 | */ 256 | 257 | button, 258 | input, 259 | select, 260 | textarea { 261 | font: inherit; /* 1 */ 262 | margin: 0; /* 2 */ 263 | } 264 | 265 | /** 266 | * Restore the font weight unset by the previous rule. 267 | */ 268 | 269 | optgroup { 270 | font-weight: bold; 271 | } 272 | 273 | /** 274 | * Show the overflow in IE. 275 | * 1. Show the overflow in Edge. 276 | */ 277 | 278 | button, 279 | input { /* 1 */ 280 | overflow: visible; 281 | } 282 | 283 | /** 284 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 285 | * 1. Remove the inheritance of text transform in Firefox. 286 | */ 287 | 288 | button, 289 | select { /* 1 */ 290 | text-transform: none; 291 | } 292 | 293 | /** 294 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 295 | * controls in Android 4. 296 | * 2. Correct the inability to style clickable types in iOS and Safari. 297 | */ 298 | 299 | button, 300 | html [type="button"], /* 1 */ 301 | [type="reset"], 302 | [type="submit"] { 303 | -webkit-appearance: button; /* 2 */ 304 | } 305 | 306 | /** 307 | * Remove the inner border and padding in Firefox. 308 | */ 309 | 310 | button::-moz-focus-inner, 311 | [type="button"]::-moz-focus-inner, 312 | [type="reset"]::-moz-focus-inner, 313 | [type="submit"]::-moz-focus-inner { 314 | border-style: none; 315 | padding: 0; 316 | } 317 | 318 | /** 319 | * Restore the focus styles unset by the previous rule. 320 | */ 321 | 322 | button:-moz-focusring, 323 | [type="button"]:-moz-focusring, 324 | [type="reset"]:-moz-focusring, 325 | [type="submit"]:-moz-focusring { 326 | outline: 1px dotted ButtonText; 327 | } 328 | 329 | /** 330 | * Change the border, margin, and padding in all browsers (opinionated). 331 | */ 332 | 333 | fieldset { 334 | border: 1px solid #c0c0c0; 335 | margin: 0 2px; 336 | padding: 0.35em 0.625em 0.75em; 337 | } 338 | 339 | /** 340 | * 1. Correct the text wrapping in Edge and IE. 341 | * 2. Correct the color inheritance from `fieldset` elements in IE. 342 | * 3. Remove the padding so developers are not caught out when they zero out 343 | * `fieldset` elements in all browsers. 344 | */ 345 | 346 | legend { 347 | box-sizing: border-box; /* 1 */ 348 | color: inherit; /* 2 */ 349 | display: table; /* 1 */ 350 | max-width: 100%; /* 1 */ 351 | padding: 0; /* 3 */ 352 | white-space: normal; /* 1 */ 353 | } 354 | 355 | /** 356 | * Remove the default vertical scrollbar in IE. 357 | */ 358 | 359 | textarea { 360 | overflow: auto; 361 | } 362 | 363 | /** 364 | * 1. Add the correct box sizing in IE 10-. 365 | * 2. Remove the padding in IE 10-. 366 | */ 367 | 368 | [type="checkbox"], 369 | [type="radio"] { 370 | box-sizing: border-box; /* 1 */ 371 | padding: 0; /* 2 */ 372 | } 373 | 374 | /** 375 | * Correct the cursor style of increment and decrement buttons in Chrome. 376 | */ 377 | 378 | [type="number"]::-webkit-inner-spin-button, 379 | [type="number"]::-webkit-outer-spin-button { 380 | height: auto; 381 | } 382 | 383 | /** 384 | * 1. Correct the odd appearance in Chrome and Safari. 385 | * 2. Correct the outline style in Safari. 386 | */ 387 | 388 | [type="search"] { 389 | -webkit-appearance: textfield; /* 1 */ 390 | outline-offset: -2px; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 395 | */ 396 | 397 | [type="search"]::-webkit-search-cancel-button, 398 | [type="search"]::-webkit-search-decoration { 399 | -webkit-appearance: none; 400 | } 401 | 402 | /** 403 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 404 | */ 405 | 406 | ::-webkit-input-placeholder { 407 | color: inherit; 408 | opacity: 0.54; 409 | } 410 | 411 | /** 412 | * 1. Correct the inability to style clickable types in iOS and Safari. 413 | * 2. Change font properties to `inherit` in Safari. 414 | */ 415 | 416 | ::-webkit-file-upload-button { 417 | -webkit-appearance: button; /* 1 */ 418 | font: inherit; /* 2 */ 419 | } 420 | --------------------------------------------------------------------------------