diff --git a/.babelrc b/.babelrc
new file mode 100755
index 0000000..5739731
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,4 @@
+{
+ "presets": ["env", "stage-2"],
+ "comments": false,
+}
diff --git a/.editorconfig b/.editorconfig
new file mode 100755
index 0000000..4bd3bd8
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,12 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.eslintignore b/.eslintignore
new file mode 100755
index 0000000..927ee99
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,2 @@
+js/**/*.js
+node_modules/**/*.js
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100755
index 0000000..bb764df
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,39 @@
+module.exports = {
+ "root": true,
+ "parserOptions": {
+ "parser": "babel-eslint",
+ "ecmaVersion": 2017,
+ "sourceType": "module"
+ },
+ "env": {
+ "browser": true,
+ "node": true,
+ "es6": true
+ },
+ "globals": {
+ "window": true,
+ "location": true
+ },
+ "extends": [
+ "airbnb-base",
+ ],
+ // custom rules here
+ "rules": {
+ // don"t require .vue extension when importing
+ "import/extensions": ["error", "always", {
+ "js": "never",
+ "vue": "js",
+ "mjs": "never"
+ }],
+ "no-param-reassign": ["error", {
+ "props": true,
+ "ignorePropertyModificationsFor": [
+ "event", // for e.returnvalue
+ "response", // for Express responses
+ "item", // for item usually within each loops
+ ]
+ }],
+ // allow debugger during development
+ "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0
+ }
+}
diff --git a/.gitattributes b/.gitattributes
old mode 100644
new mode 100755
diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
index c681168..4dfe913
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,9 @@
+.DS_Store
npm-debug.log
.sass-cache
node_modules
-bower_components
assets/sass/vendor
-tests
package-lock.json
*.map
**/*.map
+yarn.lock
diff --git a/.gitmodules b/.gitmodules
old mode 100644
new mode 100755
index 180aa8f..2b2cb88
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
-[submodule "assets/sass/vendor/simple-grid"]
- path = assets/sass/vendor/simple-grid
+[submodule "assets/styles/vendor/simple-grid"]
+ path = assets/styles/vendor/simple-grid
url = https://github.com/benchmarkstudios/simple-grid.git
diff --git a/CHANGELOG.md b/CHANGELOG.md
old mode 100644
new mode 100755
index e3b5a62..42b09d7
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,24 +1,3 @@
# barebones changelog
-## 2.0.6
-* Add package-lock.json to gitignore for npm 5+
-
-## 2.0.5
-* Use filetime() for asset revisions as it's more compatible and easier to support.
-
-## 2.0.4
-* Better static asset revisioning using randomly generated hash when running gulp tasks.
-
-## 2.0.3
-* update get_post_thumbnail_url function and add ability to get specific size.
-
-## 2.0.2
-* Add dependencies that were missing while using yarn
-
-## 2.0.1
-* Comment out example "add_image_size" as it can be easily forgotten which leaves you with extra unused image size.
-* Add CHANGELOG.MD to track changes
-* Tidy up formatting using PHP-CS-Fixer (mostly spacing)
-* Update README.MD dependencies
-
-## 2.0.0
-* Refreshed tooling using Elixir with lots of improvements
+## 3.0
+* Refreshed simplified tooling, new feaatures and improvements
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 95c9e9b..0239ca6
--- a/README.md
+++ b/README.md
@@ -5,17 +5,18 @@ A lightweight and skeletal WordPress boilerplate theme for HTML5 and beyond. The
## Features
* Reset, normalisation and base font/form styles
-* Sass Boilerplate - semantically named files, organised by folders, all compiled into a single file
+* Scss Boilerplate - semantically named files, organised by folders, all compiled into a single file
* Semantic use of HTML5 elements, includes Google HTML5 shiv
* WAI-ARIA role ready
-* Comes pre-bundled with cached CDN version of jQuery
* jQuery plugin agnostic
-* Laravel Elixir to define/customize and run basic Gulp tasks
* Basic template files
* Customised functions.php adding theme support for high customisation
* Minimised HTTP requests for high Web Performance
* Localised strings for multiple language support
-* Sass compiling and watching, css minification and live reload support
+* Scss compiling and watching, css minification support
+* Rollup.js for js for smallest possible bundles
+* Image optimisation using imagemin.
+* Base mobile nav out of the box
## Installation
@@ -31,38 +32,49 @@ To include all its optional submodules ([Simple Grid](https://github.com/benchma
#### Dependencies
-* [Node.js](http://nodejs.org)
-* [Gulp](http://gulpjs.com)
-* [Gulp Imagemin](https://github.com/sindresorhus/gulp-imagemin)
-* [Laravel Elixir](https://github.com/laravel/elixir)
+Install Dependencies:
+```
+ npm install
+```
-### Using Gulp and Laravel Elixir
+.. or with yarn:
+```
+ yarn
+```
+
+### Using Gulp
Install Gulp as a global NPM package, if you don't have it already on your machine:
npm install --global gulp
-Install Laravel Elixir:
+Install Dependencies, you have haven't done yet:
npm install
-Edit your gulpfile.js adding the required tasks (check the [Laravel Elixir](http://laravel.com/docs/master/elixir) documentation for further information).
-
Then run:
- gulp
+| Tasks | |
+|----------------|--------------------------------------------------------------------|
+| `gulp` | *to compile* (All tasks) |
+| `gulp watch` | *to watch* |
+| `gulp images` | *to optimise images* |
+| `gulp styles` | *to compile styles* |
+| `gulp scripts` | *to compile scripts* |
+| `gulp build` | *to create a build (minification, removes map files and comments)* |
-*to compile*
+This will execute all the Gulp tasks on the gulpfile.babel.js.
- gulp watch
+### Configuration for Gulp
-*to watch*
+Some of the configuration can be done in `config.barebones.js` file, such as base source and public paths, along with scripts file paths for multiple bundles.
- gulp --production
+Of course, feel free to modify gulpfile itself.
-*to minify*
+### Images
-This will execute all the Gulp tasks on the gulpfile.js.
+Drop all your images into assets/images. When running gulp tasks, they will be automatically
+optimised and output files will available in img folder in the root of the theme.
## WordPress Support
@@ -75,3 +87,23 @@ Compatible with WordPress 3.2 and above, but always use the latest version.
* Safari 4.0+
* Chrome 14.0+
* Opera 10.0+
+
+## Tips & Tricks
+
+### SVG Fallbacks
+
+Most likely if you need to support IE8
+
+*CSS*
+```
+...
+background-size: 120px 15px;
+background-image: url(/img/fallback.png);
+background-image: linear-gradient(transparent, transparent), url(/img/image.svg);
+...
+```
+
+*HTML*
+```
+
+```
diff --git a/assets/icons/error.png b/assets/icons/error.png
new file mode 100755
index 0000000..45f441f
Binary files /dev/null and b/assets/icons/error.png differ
diff --git a/assets/icons/success.png b/assets/icons/success.png
new file mode 100755
index 0000000..952072b
Binary files /dev/null and b/assets/icons/success.png differ
diff --git a/assets/images/.gitkeep b/assets/images/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/assets/images/logo.png b/assets/images/logo.png
new file mode 100755
index 0000000..029011f
Binary files /dev/null and b/assets/images/logo.png differ
diff --git a/assets/images/logo.svg b/assets/images/logo.svg
new file mode 100755
index 0000000..6575236
--- /dev/null
+++ b/assets/images/logo.svg
@@ -0,0 +1,36 @@
+
+
+
diff --git a/assets/sass/barebones.scss b/assets/sass/barebones.scss
deleted file mode 100755
index dc5a5d2..0000000
--- a/assets/sass/barebones.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
-Theme Name: Barebones
-Theme URI: http://github.com/benchmarkstudios/barebones
-Author: Benchmark
-*/
-
-@charset 'UTF-8';
-
-// 1. Configuration
-@import
- 'config/variables',
- 'config/mixins';
-
-// 2. Vendors
-@import
- 'vendor/simple-grid/simple-grid';
-
-// 3. Utilities
-@import
- 'utils/reset',
- 'utils/a11y',
- 'utils/responsive',
- 'utils/helpers';
-
-// 4. Base stuff
-@import
- 'base/base',
- 'base/fonts',
- 'base/images',
- 'base/forms',
- 'base/lists',
- 'base/typography';
-
-// 5. Layout-related sections
-@import
- 'layout/main',
- 'layout/header',
- 'layout/footer';
-
-// 6. Components
-@import
- 'components/buttons',
- 'components/nav',
- 'components/alerts';
-
-// 7. Page-specific styles
-@import
- 'pages/home';
diff --git a/assets/sass/base/_forms.scss b/assets/sass/base/_forms.scss
deleted file mode 100644
index 5f9e5e5..0000000
--- a/assets/sass/base/_forms.scss
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Blanket input styles for normalisation
- */
-
-*:focus {
- outline: 0;
-}
-
-input,
-select,
-textarea {
- background-color: $base-background-colour;
- border: solid 1px $base-colour;
- border-radius: 0;
- color: $base-colour;
- line-height: ($base-spacing-unit * 1.5);
- height: ($base-spacing-unit * 1.5);
- padding: 0 ($base-spacing-unit / 2);
- width: 100%;
-}
-
-input[type="checkbox"],
-input[type="radio"] {
- background: transparent;
- border: 0;
- line-height: normal;
- height: auto;
- width: auto;
-}
-
-input[type="file"] {
- line-height: normal;
- height: auto;
- padding: ($base-spacing-unit / 4) ($base-spacing-unit / 2);
-}
-
-input[type="submit"] {
- -webkit-border-radius: 0;
- border-radius: 0;
-}
-
-input[disabled] {
- background-color: whitesmoke;
- cursor: not-allowed;
-}
-
-select {
- line-height: normal;
- padding: 0;
- padding-left: ($base-spacing-unit / 2);
-}
-
-textarea {
- min-height: ($base-spacing-unit * 4);
- overflow: auto;
- vertical-align: top;
- resize: vertical;
-}
-
-
-/**
- * Form utility classes
- */
-
-.form--inline {
- .form__group {
- display: inline-block;
- }
-}
-
-.checkbox,
-.radio {
- display: block;
- padding-left: $base-spacing-unit;
- &.inline {
- display: inline-block;
- }
- > input {
- float: left;
- margin-left: -($base-spacing-unit);
- margin-top: 4px;
- }
-}
-
-.form__group {
- display: block;
- margin-bottom: $base-spacing-unit;
-}
-
-.form__label {
- display: block;
- margin-bottom: ($base-spacing-unit / 2);
-}
-
-
-/**
- * Input Group
- *
- * Allows for prepend/append of elements
- * (such as icons) on an input.
- */
-
-.input-group {
- position: relative;
- > input {
- padding: 0 ($base-spacing-unit * 2);
- }
- .input-group__addon {
- line-height: ($base-spacing-unit * 1.5);
- height: ($base-spacing-unit * 1.5);
- position: absolute;
- text-align: center;
- top: 0;
- width: ($base-spacing-unit * 1.5);
- &:first-child {
- left: 0;
- }
- &:last-child {
- right: 0;
- }
- }
-}
diff --git a/assets/sass/base/_typography.scss b/assets/sass/base/_typography.scss
deleted file mode 100644
index a3845e1..0000000
--- a/assets/sass/base/_typography.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-weight: bold;
-}
-
-small {
- font-size: .75em;
-}
\ No newline at end of file
diff --git a/assets/sass/components/_nav.scss b/assets/sass/components/_nav.scss
deleted file mode 100755
index 52e267f..0000000
--- a/assets/sass/components/_nav.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-.nav {
- list-style: none;
- margin: 0;
- > li {
- display: inline-block;
- margin-right: $base-spacing-unit;
- &:last-child {
- margin-right: 0;
- }
- > a {
- display: block;
- }
- }
-}
\ No newline at end of file
diff --git a/assets/sass/config/_mixins.scss b/assets/sass/config/_mixins.scss
deleted file mode 100755
index ccc0f26..0000000
--- a/assets/sass/config/_mixins.scss
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Media query to respond to a minimum size (mobile first)
- */
-
-@mixin resp-min($size) {
- @media screen and (min-width: $size) {
- @content;
- }
-}
-
-
-/*
- * Media query to respond to a maximum size
- */
-
-@mixin resp-max($size) {
- @media screen and (max-width: $size) {
- @content;
- }
-}
-
-
-/*
- * Output font size in px/rem
- */
-
-@mixin font-size($px) {
- font-size: $px + px;
- font-size: #{$px / 16}rem;
-}
-
-
-/*
- * Placeholder mixin for
- */
-
-@mixin placeholder {
- $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input";
- @each $placeholder in $placeholders {
- &:#{$placeholder}-placeholder {
- @content;
- }
- }
-}
-
-
-/**
- * Clearfix
- */
-
-@mixin clearfix {
- &:before,
- &:after{
- content: " ";
- display: table;
- }
- &:after{
- clear: both;
- }
-}
-
-
-
-/**
- * Positioning
- */
-
-@mixin center($horizontal: true, $vertical: true) {
- position: absolute;
- @if ($horizontal and $vertical) {
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- @else if ($horizontal) {
- left: 50%;
- transform: translateX(-50%);
- }
- @else if ($vertical) {
- top: 50%;
- transform: translateY(-50%);
- }
-}
diff --git a/assets/sass/layout/_header.scss b/assets/sass/layout/_header.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/assets/sass/utils/_a11y.scss b/assets/sass/utils/_a11y.scss
deleted file mode 100644
index c626587..0000000
--- a/assets/sass/utils/_a11y.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-.sr-only {
- font-size: 0;
- height: 0;
- overflow: hidden;
- position: absolute;
- width: 0;
-}
diff --git a/assets/sass/utils/_reset.scss b/assets/sass/utils/_reset.scss
deleted file mode 100644
index 5714796..0000000
--- a/assets/sass/utils/_reset.scss
+++ /dev/null
@@ -1,42 +0,0 @@
-* {
- background-color: transparent;
- border: 0;
- box-sizing: border-box;
- font: inherit;
- margin: 0;
- padding: 0;
-}
-
-html {
- background-color: white;
- font-size: 100%;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
- text-rendering: optimizeLegibility;
-}
-
-input,
-select,
-textarea,
-button {
- color: inherit;
- display: inline-block;
- &[disabled] {
- cursor: not-allowed;
- }
-}
-
-button {
- cursor: pointer;
-}
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
- th,
- td {
- text-align: left;
- }
-}
\ No newline at end of file
diff --git a/assets/sass/vendor/simple-grid b/assets/sass/vendor/simple-grid
deleted file mode 160000
index 4aee262..0000000
--- a/assets/sass/vendor/simple-grid
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4aee2627e323b19a70045a84adafc9f4fee44a6f
diff --git a/assets/scripts/script.js b/assets/scripts/script.js
deleted file mode 100644
index 57ce6f4..0000000
--- a/assets/scripts/script.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// var $ = require('jquery');
-
-(function() {
-
-
-
-})($);
diff --git a/assets/scripts/scripts.js b/assets/scripts/scripts.js
new file mode 100755
index 0000000..d3e6416
--- /dev/null
+++ b/assets/scripts/scripts.js
@@ -0,0 +1,15 @@
+import $ from 'jquery';
+
+/**
+ * Mobile navigation toggle
+ * @param {mixed} event
+ */
+
+const toggleMenu = (event) => {
+ event.preventDefault();
+ $('.js-menu-toggle, .nav--header').toggleClass('open');
+ $('.header').toggleClass('menu-open');
+};
+
+$('.js-menu-toggle').on('click', toggleMenu);
+
diff --git a/assets/sass/base/_base.scss b/assets/styles/base/_base.scss
old mode 100644
new mode 100755
similarity index 79%
rename from assets/sass/base/_base.scss
rename to assets/styles/base/_base.scss
index 86487fb..5acad70
--- a/assets/sass/base/_base.scss
+++ b/assets/styles/base/_base.scss
@@ -1,27 +1,28 @@
body {
color: $base-colour;
font-family: $base-font-family;
- @include font-size($base-font-size);
line-height: $base-line-height;
- -webkit-text-size-adjust: none;
+ text-size-adjust: none;
+ @include font-size($base-font-size);
}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-p,
-hr,
-ul,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+hr,
+ul,
ol,
-dl,
-address {
+dl {
margin-bottom: $base-spacing-unit;
+ &:last-child {
+ margin-bottom: 0;
+ }
}
-
/**
* Basic styles for links
*/
@@ -35,20 +36,19 @@ a {
}
}
-a[href^="tel"]{
+a[href^="tel"] {
+ font-size: inherit;
+ font-family: inherit;
color: inherit;
text-decoration: none;
- font-family: inherit;
- font-size: inherit;
font-style: inherit;
}
-
/**
- * Rulers
+ * Rules
*/
hr {
- background-color: $base-colour;
height: 1px;
-}
\ No newline at end of file
+ background-color: $base-colour;
+}
diff --git a/assets/sass/base/_fonts.scss b/assets/styles/base/_fonts.scss
old mode 100644
new mode 100755
similarity index 94%
rename from assets/sass/base/_fonts.scss
rename to assets/styles/base/_fonts.scss
index f5e3b71..52f90a3
--- a/assets/sass/base/_fonts.scss
+++ b/assets/styles/base/_fonts.scss
@@ -1,3 +1,3 @@
/**
* This file contains all @font-face declarations, if any.
- */
\ No newline at end of file
+ */
diff --git a/assets/styles/base/_forms.scss b/assets/styles/base/_forms.scss
new file mode 100755
index 0000000..0207b7f
--- /dev/null
+++ b/assets/styles/base/_forms.scss
@@ -0,0 +1,76 @@
+*:focus {
+ outline: 0;
+}
+
+input,
+select,
+textarea {
+ background-color: $base-background-colour;
+ border: solid 1px $base-colour;
+ border-radius: 0;
+ color: $base-colour;
+ line-height: $base-spacing-unit * 1.5;
+ height: $base-spacing-unit * 1.5;
+ padding: 0 #{$base-spacing-unit / 2};
+ width: 100%;
+}
+
+input[type="checkbox"],
+input[type="radio"] {
+ background: transparent;
+ border: 0;
+ line-height: normal;
+ height: auto;
+ width: auto;
+}
+
+input[type="file"] {
+ line-height: normal;
+ height: auto;
+ padding: #{$base-spacing-unit / 4} #{$base-spacing-unit / 2};
+}
+
+input[type="submit"] {
+ border-radius: 0;
+}
+
+input[disabled] {
+ background-color: whitesmoke;
+ cursor: not-allowed;
+}
+
+select {
+ line-height: normal;
+ padding: 0;
+ padding-left: $base-spacing-unit / 2;
+}
+
+textarea {
+ min-height: $base-spacing-unit * 4;
+ overflow: auto;
+ vertical-align: top;
+ resize: vertical;
+}
+
+
+
+/**
+ * Form utility classes
+ */
+
+.form--inline {
+ .form__group {
+ display: inline-block;
+ }
+}
+
+.form {
+ .form__group {
+ display: block;
+ margin-bottom: $base-spacing-unit;
+ .form__label {
+ display: block;
+ margin-bottom: ($base-spacing-unit / 2);
+ }
+ }
+}
\ No newline at end of file
diff --git a/assets/sass/base/_images.scss b/assets/styles/base/_images.scss
old mode 100644
new mode 100755
similarity index 100%
rename from assets/sass/base/_images.scss
rename to assets/styles/base/_images.scss
diff --git a/assets/sass/base/_lists.scss b/assets/styles/base/_lists.scss
old mode 100644
new mode 100755
similarity index 90%
rename from assets/sass/base/_lists.scss
rename to assets/styles/base/_lists.scss
index 79d9d8f..d473793
--- a/assets/sass/base/_lists.scss
+++ b/assets/styles/base/_lists.scss
@@ -1,16 +1,16 @@
-ul,
+ul,
ol {
margin-left: $base-spacing-unit;
}
li {
- > ul,
+ > ul,
> ol {
margin-bottom: 0;
}
}
.list--unstyled {
- list-style: none;
margin-left: 0;
-}
\ No newline at end of file
+ list-style: none;
+}
diff --git a/assets/styles/base/_typography.scss b/assets/styles/base/_typography.scss
new file mode 100755
index 0000000..bb011b4
--- /dev/null
+++ b/assets/styles/base/_typography.scss
@@ -0,0 +1,17 @@
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+strong {
+ font-weight: bold;
+}
+
+em {
+ font-style: italic;
+}
+
+small {
+ font-size: .75em;
+}
diff --git a/assets/sass/components/_alerts.scss b/assets/styles/components/_alerts.scss
old mode 100644
new mode 100755
similarity index 99%
rename from assets/sass/components/_alerts.scss
rename to assets/styles/components/_alerts.scss
index 5974ab1..cfc753d
--- a/assets/sass/components/_alerts.scss
+++ b/assets/styles/components/_alerts.scss
@@ -2,25 +2,31 @@
padding: $base-spacing-unit;
margin-bottom: $base-spacing-unit;
border: 1px solid transparent;
+
> p,
> ul {
margin-bottom: 0;
}
+
> p + p {
margin-top: $base-spacing-unit;
}
+
&.alert--success {
color: $success-colour;
border-color: $success-colour;
}
+
&.alert--info {
color: $info-colour;
border-color: $info-colour;
}
+
&.alert--warning {
color: $warning-colour;
border-color: $warning-colour;
}
+
&.alert--danger {
color: $danger-colour;
border-color: $danger-colour;
diff --git a/assets/sass/components/_buttons.scss b/assets/styles/components/_buttons.scss
old mode 100644
new mode 100755
similarity index 88%
rename from assets/sass/components/_buttons.scss
rename to assets/styles/components/_buttons.scss
index 3bcb7a7..c62fddf
--- a/assets/sass/components/_buttons.scss
+++ b/assets/styles/components/_buttons.scss
@@ -3,7 +3,7 @@
color: $base-background-colour;
border: 1px solid transparent;
display: inline-block;
- padding: ($base-spacing-unit / 4) $base-spacing-unit;
+ padding: #{$base-spacing-unit / 4} $base-spacing-unit;
text-align: center;
white-space: nowrap;
vertical-align: middle;
@@ -12,16 +12,19 @@
user-select: none;
width: auto;
transition: all .5s;
+
&::-moz-focus-inner {
border: 0;
padding: 0;
}
+
&:hover {
text-decoration: none;
background-color: $base-background-colour;
color: $brand-colour;
- border: 1px solid $brand-colour;
+ border-color: $brand-colour;
}
+
&.is-disabled,
&:disabled {
pointer-events: none;
@@ -33,16 +36,18 @@
background-color: $base-background-colour;
color: $brand-colour;
border: 1px solid $brand-colour;
+
&:hover {
background-color: $brand-colour;
color: $base-background-colour;
- border: 1px solid transparent;
+ border-color: transparent;
}
}
.btn--block {
display: block;
width: 100%;
+
+ .btn--block {
margin-top: $base-spacing-unit / 4;
}
diff --git a/assets/styles/components/_nav.scss b/assets/styles/components/_nav.scss
new file mode 100755
index 0000000..cd28a6f
--- /dev/null
+++ b/assets/styles/components/_nav.scss
@@ -0,0 +1,107 @@
+/**
+ * Hamburger menu
+ */
+
+.nav-burger {
+ position: fixed;
+ top: $base-spacing-unit;
+ right: $base-spacing-unit;
+ z-index: 550;
+ transition: all $animation-speed $animation;
+}
+
+.nav-burger__line {
+ width: 35px;
+ height: 3px;
+ background-color: $brand-colour;
+ display: none;
+ margin: 8px auto;
+ transition: all $animation-speed $animation;
+
+ @include resp-max($breakpoint-md) {
+ display: block;
+ }
+
+ .nav-burger.open & {
+ &:nth-child(2) {
+ opacity: 0;
+ }
+
+ &:nth-child(1) {
+ transform: translateY(11px) rotate(45deg);
+ }
+
+ &:nth-child(3) {
+ transform: translateY(-11px) rotate(-45deg);
+ }
+ }
+}
+
+
+/**
+ * Navs
+ */
+
+.nav {
+ list-style: none;
+ margin: 0;
+
+ > li {
+ display: inline-block;
+ margin-right: $base-spacing-unit;
+
+ &:last-child {
+ margin-right: 0;
+ }
+ > a {
+ display: block;
+ }
+ }
+}
+
+.nav--header {
+
+ // mobile nav
+ @include resp-max($breakpoint-md) {
+ position: fixed;
+ top: 0;
+ left: 0;
+ visibility: hidden;
+ width: 0;
+ height: 100%;
+ margin: 0;
+ transition: opacity 500ms ease;
+ transition: opacity .35s ease, visibility .35s ease, width .35s ease;
+ text-align: center;
+ opacity: 0;
+ background: $base-background-colour;
+ -webkit-overflow-scrolling: touch;
+
+ &.open {
+ z-index: 500;
+ visibility: visible;
+ width: 100%;
+ opacity: 1;
+
+ ul {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ overflow: auto;
+ width: 100%;
+ max-height: 100%;
+ margin: 0;
+ padding: 0;
+ user-select: none;
+ transform: translateY(-50%);
+ -webkit-touch-callout: none;
+ -webkit-overflow-scrolling: touch;
+
+ > li {
+ width: 100%;
+ margin: 0;
+ }
+ }
+ }
+ }
+}
diff --git a/assets/styles/config/_mixins.scss b/assets/styles/config/_mixins.scss
new file mode 100755
index 0000000..b595d16
--- /dev/null
+++ b/assets/styles/config/_mixins.scss
@@ -0,0 +1,60 @@
+/*
+ * Media query to respond to a minimum size (mobile first)
+ */
+
+ @mixin resp-min($size) {
+ @media screen and (min-width: $size) {
+ @content;
+ }
+}
+
+
+/*
+ * Media query to respond to a maximum size
+ */
+
+@mixin resp-max($size) {
+ @media screen and (max-width: $size) {
+ @content;
+ }
+}
+
+
+/*
+ * Output font size in px/rem
+ */
+
+@mixin font-size($px) {
+ font-size: $px + px;
+ font-size: #{$px / 16}rem;
+}
+
+
+/*
+ * Placeholder mixin for
+ */
+
+@mixin placeholder {
+ $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input";
+ @each $placeholder in $placeholders {
+ &:#{$placeholder}-placeholder {
+ @content;
+ }
+ }
+}
+
+
+/**
+ * Clearfix
+ */
+@mixin clearfix {
+ &:before,
+ &:after {
+ content: " ";
+ display: table;
+ }
+
+ &:after {
+ clear: both;
+ }
+}
diff --git a/assets/sass/config/_variables.scss b/assets/styles/config/_variables.scss
similarity index 93%
rename from assets/sass/config/_variables.scss
rename to assets/styles/config/_variables.scss
index de08df6..0800afd 100755
--- a/assets/sass/config/_variables.scss
+++ b/assets/styles/config/_variables.scss
@@ -55,3 +55,9 @@ $grid-gutter: $base-spacing-unit;
*/
$border-radius: 3px;
+
+/**
+ * Animations
+ */
+$animation-speed: 250ms;
+$animation: ease-in-out;
diff --git a/assets/sass/layout/_footer.scss b/assets/styles/layout/_footer.scss
old mode 100644
new mode 100755
similarity index 100%
rename from assets/sass/layout/_footer.scss
rename to assets/styles/layout/_footer.scss
diff --git a/assets/styles/layout/_header.scss b/assets/styles/layout/_header.scss
new file mode 100755
index 0000000..8b13789
--- /dev/null
+++ b/assets/styles/layout/_header.scss
@@ -0,0 +1 @@
+
diff --git a/assets/sass/layout/_main.scss b/assets/styles/layout/_main.scss
old mode 100644
new mode 100755
similarity index 100%
rename from assets/sass/layout/_main.scss
rename to assets/styles/layout/_main.scss
diff --git a/assets/sass/pages/_home.scss b/assets/styles/pages/_home.scss
old mode 100644
new mode 100755
similarity index 100%
rename from assets/sass/pages/_home.scss
rename to assets/styles/pages/_home.scss
diff --git a/assets/styles/styles.scss b/assets/styles/styles.scss
new file mode 100755
index 0000000..c251ed4
--- /dev/null
+++ b/assets/styles/styles.scss
@@ -0,0 +1,34 @@
+@charset 'UTF-8';
+
+// 1. Configuration
+@import 'config/variables';
+@import 'config/mixins';
+
+// 2. Vendors
+@import 'vendor/simple-grid/simple-grid';
+
+// 3. Utilities
+@import 'utils/reset';
+@import 'utils/responsive';
+@import 'utils/helpers';
+
+// 4. Base stuff
+@import 'base/base';
+@import 'base/fonts';
+@import 'base/images';
+@import 'base/forms';
+@import 'base/lists';
+@import 'base/typography';
+
+// 5. Layout-related sections
+@import 'layout/main';
+@import 'layout/header';
+@import 'layout/footer';
+
+// 6 .Components
+@import 'components/buttons';
+@import 'components/nav';
+@import 'components/alerts';
+
+// 7. Page-specific styles
+@import 'pages/home';
diff --git a/assets/sass/utils/_helpers.scss b/assets/styles/utils/_helpers.scss
old mode 100644
new mode 100755
similarity index 76%
rename from assets/sass/utils/_helpers.scss
rename to assets/styles/utils/_helpers.scss
index 0961469..0b00cb1
--- a/assets/sass/utils/_helpers.scss
+++ b/assets/styles/utils/_helpers.scss
@@ -1,10 +1,11 @@
/**
- * Clearing and floating
- */
+* Clearing and floating
+*/
.alignleft,
.float-left {
float: left;
+
img & {
margin-right: $base-spacing-unit;
}
@@ -13,8 +14,9 @@
.alignright,
.float-right {
float: right;
+
img & {
- margin-left : $base-spacing-unit;
+ margin-left: $base-spacing-unit;
}
}
@@ -25,20 +27,20 @@
left: auto;
right: auto;
}
+
img & {
margin-bottom: $base-spacing-unit;
}
}
.clearfix {
- @include clearfix();
+ @include clearfix;
}
-
/**
- * Text aligments
- */
+* Text aligments
+*/
.align-text-left {
text-align: left;
@@ -59,6 +61,7 @@
.visible-on-mobile {
display: none !important;
+
@include resp-max($breakpoint-sm) {
display: block !important;
}
@@ -66,9 +69,11 @@
.visible-on-tablet {
display: none !important;
+
@include resp-max($breakpoint-md) {
display: block !important;
}
+
@include resp-max($breakpoint-sm) {
display: none !important;
}
@@ -79,3 +84,19 @@
display: none !important;
}
}
+
+
+/**
+ * Accessibility
+ */
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
+}
\ No newline at end of file
diff --git a/assets/styles/utils/_reset.scss b/assets/styles/utils/_reset.scss
new file mode 100755
index 0000000..f3a83a0
--- /dev/null
+++ b/assets/styles/utils/_reset.scss
@@ -0,0 +1,44 @@
+* {
+ background-color: transparent;
+ border: 0;
+ box-sizing: border-box;
+ font: inherit;
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ background-color: white;
+ font-size: 100%;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ -ms-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+ text-rendering: optimizeLegibility;
+}
+
+input,
+select,
+textarea,
+button {
+ color: inherit;
+ display: inline-block;
+
+ &[disabled] {
+ cursor: not-allowed;
+ }
+}
+
+button {
+ cursor: pointer;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+
+ th,
+ td {
+ text-align: left;
+ }
+}
diff --git a/assets/sass/utils/_responsive.scss b/assets/styles/utils/_responsive.scss
old mode 100644
new mode 100755
similarity index 99%
rename from assets/sass/utils/_responsive.scss
rename to assets/styles/utils/_responsive.scss
index 2e3b870..2af938e
--- a/assets/sass/utils/_responsive.scss
+++ b/assets/styles/utils/_responsive.scss
@@ -1,5 +1,4 @@
@each $breakpoint in $breakpoints {
-
$key : nth($breakpoint, 1);
$value : nth($breakpoint, 2);
@@ -14,5 +13,4 @@
display: none !important;
}
}
-
-}
\ No newline at end of file
+}
diff --git a/assets/styles/vendor/simple-grid/.gitattributes b/assets/styles/vendor/simple-grid/.gitattributes
new file mode 100755
index 0000000..e394296
--- /dev/null
+++ b/assets/styles/vendor/simple-grid/.gitattributes
@@ -0,0 +1 @@
+README export-ignore
diff --git a/assets/styles/vendor/simple-grid/README.md b/assets/styles/vendor/simple-grid/README.md
new file mode 100755
index 0000000..82eef37
--- /dev/null
+++ b/assets/styles/vendor/simple-grid/README.md
@@ -0,0 +1,122 @@
+# Just a simple grid
+
+Based on existing grid systems, such as [Twitter Bootstrap Grid System](http://getbootstrap.com/css/#grid) and [csswizardry-grids](http://csswizardry.com/csswizardry-grids/), this is a fluid, flexible and responsive grid that can be scaled up to an arbitrary size, within the `$max-width` of your main `.container`. You also can easily and infinitly nest columns and rows, so you can build out complicated layouts without creating a lot of new custom elements. This is a grid system generated by Sass and it is based on [BEM syntax](http://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/).
+
+## Setup
+
+The only thing you need to do to start building your grid is to adjust the number of `$grid-columns`, the desired `$gutter` and the main container `$max-width`.
+
+## How it works
+
+Grid systems, as you may know, are used for creating page layouts through a series of rows and columns that will host your content:
+
+* Your `.row` element(s) must be placed within a `.container`, with a fixed `$max-width` for proper alignment. This elements will split up your page horizontally and will contain groups of `.col`.
+* Your content should be placed within the `.col` blocks, and only `.col` may be immediate children of `.row`.
+* You can nest `.row` and `.col` how many times you need, since you follow the previous standard.
+* Your `.col` width is defined by specifying the number of a single grid columns, in your total `$grid-columns`. For example, a `.col--*-4` will represent a width of 4 columns in your `$grid-columns` total.
+* To control your responsive grid, there are available three class prefixes: `.col--sm-*` for small devices, `.col-md-*` for medium devices and `.col--lg-*` for large devices. All together, in your `.col` element, it will make your grid respond to each one of your default media queries.
+* Finaly, you have the option to move columns to the right using `.col--*-offset-*` classes. These classes increase the left margin of a column by the number of columns you want. For example, `.col--*-offset-4` will push `.col-*-4` over four columns.
+
+
+## Markup
+
+### Basic usage
+Simple column set - `
Col 1
+Col 2
+Col 3
+Col 4
+Col 5
+Col 6
+Col 7
+Col 8
+Col 9 with offset 0
+Col 10 with offset 4
+Col 11 with offset 3
+Col 12 with offset 6
+Col 13 with offset 3
+Col 14
+Nested col 14.1
+Nested col 14.2
+Col 15
+Col 16
+