gulp tasks and nunjucks templating

- reworked nearly all gulp tasks
- added html templating with nunjucks
- replaced some old html files
- started correction of scss and js files according to lint results
This commit is contained in:
Stephan Hagedorn 2017-10-02 00:02:06 +02:00
parent 6e4b8cf94b
commit b8733af03c
37 changed files with 3911 additions and 200 deletions

View file

@ -4,7 +4,8 @@
// Paragraph
p {
@extend %basic;
margin: $basic_space 0;
margin-top: $basic_space;
margin-bottom: $basic_space;
code {
padding: $tiny_space $half_space;
font-size: 1em;
@ -14,7 +15,9 @@ p {
// Address
address {
@extend %basic;
margin-top: $double_space;
margin-bottom: $double_space;
}
// Line
@ -124,7 +127,7 @@ ul {
color: $basic_font_color;
img {
margin-right: $basic_space;
padding-bottom: .2em;
padding-bottom: 0.2em;
vertical-align: text-bottom;
}
&:active,
@ -168,8 +171,8 @@ div {
.box__info {
padding: $double_space $basic_indent;
border-right: $basic_space solid rgba($echo_color, .6);
background-color: rgba($echo_color, .1) !important;
border-right: $basic_space solid rgba($echo_color, 0.6);
background-color: rgba($echo_color, 0.1) !important;
}
.box__main_indent {

View file

@ -59,7 +59,7 @@ tfoot {
}
tr:nth-child(even) td {
background-color: rgba($brightest_color, .1);
background-color: rgba($brightest_color, 0.1);
}
}

View file

@ -80,10 +80,6 @@ dfn {
}
address {
}
abbr {
}

View file

@ -149,17 +149,17 @@
.pos_full_view {
@extend %full_viewport;
background-color: rgba($alpha_color, .5);
background-color: rgba($alpha_color, 0.5);
}
.pos_full_page {
@extend %full_parent;
background-color: rgba($charlie_color, .25);
background-color: rgba($charlie_color, 0.25);
}
.hover_back_change {
background-color: darken($basic_back_color, 10%);
transition: background-color .2s ease-in-out;
transition: background-color 0.2s ease-in-out;
&:hover {
background-color: $basic_back_color;
@ -169,8 +169,8 @@
.hover_full_view_change {
@extend %full_viewport;
z-index: $z_heaven;
background-color: transparentize($darkest_color, .5);
transition: background-color .2s ease-in-out;
background-color: transparentize($darkest_color, 0.5);
transition: background-color 0.2s ease-in-out;
pointer-events: none;
}
@ -216,13 +216,13 @@
%default_button {
display: inline-block;
padding: $basic_padding;
background-color: transparentize($basic_link_color, .8);
background-color: transparentize($basic_link_color, 0.8);
border-radius: $basic_corner;
&:active,
&:focus,
&:hover {
background-color: rgba($basic_highlight_color, .1);
background-color: rgba($basic_highlight_color, 0.1);
color: $basic_highlight_color;
border-color: transparent;
}

View file

@ -103,13 +103,13 @@ $basic_action_color: $foxtrot_color !default;
$basic_border_color: $basic_front_color !default;
// default shadow colors
// $shadow_color: fade-out($medium_color, .5);
// $shadow_color: fade-out($medium_color, 0.5);
$basic_color_list: ();
@each $key, $value in $color_palette {
$map: ();
$map: map-merge($map, ($key: createColorMap($value, 15%, .5)) );
$map: map-merge($map, ($key: createColorMap($value, 15%, 0.5)) );
$basic_color_list: map-merge($basic_color_list, $map);
}

View file

@ -23,7 +23,8 @@
// Reset
// Use a file outside of hippie i.e. vendor/normalize.css
// -----------------------------------------------------------------------------
@import "../../vendor/normalizecss/normalize.css";
@import "../bower_components/normalize-css/normalize.css";
// @import "normalize-css/normalize.css";
// @import "vendor/YOUR-FILES.css";
@ -91,7 +92,7 @@
// Demonstration
@import "modules/demo/demo_module";
@import "modules/maintenance/maintenance_module";

View file

@ -13,6 +13,12 @@
margin-top: 0;
font-weight: bold;
}
@media (max-height: 512px) {
.pos_abs {
position: static !important;
}
}
}
.demo__header {
@ -27,18 +33,18 @@
}
.header__fancy {
background-color: transparentize($bravo_color, .4);
background-color: transparentize($bravo_color, 0.4);
nav {
a {
background-color: transparentize($alpha_color, .4);
background-color: transparentize($alpha_color, 0.4);
color: $alpha_color;
&:active,
&:focus,
&:hover {
background-color: rgba($brightest_color, .2);
background-color: rgba($brightest_color, 0.2);
color: $brightest_color;
}
}
@ -50,7 +56,7 @@
top: 0;
left: 0;
width: 100%;
background-color: transparentize($charlie_color, .4);
background-color: transparentize($charlie_color, 0.4);
nav {
@ -59,7 +65,7 @@
&:active,
&:focus,
&:hover {
background-color: rgba($brightest_color, .2);
background-color: rgba($brightest_color, 0.2);
color: $brightest_color;
}
}
@ -114,39 +120,39 @@
}
.query__phoneUp {
background-color: rgba($basic_front_color, .2);
background-color: rgba($basic_front_color, 0.2);
}
.query__phoneOnly {
@include forPhoneOnly { background-color: rgba($basic_front_color, .2); }
@include forPhoneOnly { background-color: rgba($basic_front_color, 0.2); }
}
.query__tabletPortaitOnly {
@include forTabletPortraitOnly { background-color: rgba($basic_front_color, .2); }
@include forTabletPortraitOnly { background-color: rgba($basic_front_color, 0.2); }
}
.query__tabletPortraitUp {
@include forTabletPortraitUp { background-color: rgba($basic_front_color, .2); }
@include forTabletPortraitUp { background-color: rgba($basic_front_color, 0.2); }
}
.query__tabletLandscapeOnly {
@include forTabletLandscapeOnly { background-color: rgba($basic_front_color, .2); }
@include forTabletLandscapeOnly { background-color: rgba($basic_front_color, 0.2); }
}
.query__tabletLandscapeUp {
@include forTabletLandscapeUp { background-color: rgba($basic_front_color, .2); }
@include forTabletLandscapeUp { background-color: rgba($basic_front_color, 0.2); }
}
.query__desktopOnly {
@include forDesktopOnly { background-color: rgba($basic_front_color, .2); }
@include forDesktopOnly { background-color: rgba($basic_front_color, 0.2); }
}
.query__desktopUp {
@include forDesktopUp { background-color: rgba($basic_front_color, .2); }
@include forDesktopUp { background-color: rgba($basic_front_color, 0.2); }
}
.query__bigDesktopUp {
@include forBigDesktopUp { background-color: rgba($basic_front_color, .2); }
@include forBigDesktopUp { background-color: rgba($basic_front_color, 0.2); }
}
.demo__query_example {
@ -180,7 +186,7 @@
content: '< 768px';
padding: $basic_padding;
border-radius: $basic_corner_radius;
background-color: rgba($basic_front_color, .2);
background-color: rgba($basic_front_color, 0.2);
}
}
@ -196,5 +202,5 @@
.hello {
flex: 0 1 auto;
padding: 1em 5em;
background-color: rgba(black, .25);
background-color: rgba(black, 0.25);
}

View file

@ -7,8 +7,8 @@
// ------------------------------------------------------------------------------
%wip {
border-right: $basic_space solid rgba(crimson, .8);
background-color: rgba(crimson, .1) !important;
border-right: $basic_space solid rgba(crimson, 0.8);
background-color: rgba(crimson, 0.1) !important;
}
.wip {
@extend %wip;

View file

@ -11,7 +11,7 @@
content: "";
display: block;
height: 48px;
background-color: rgba($delta_color, .1) !important;
background-color: rgba($delta_color, 0.1) !important;
}
}
%expose_before {
@ -19,7 +19,7 @@
content: "";
display: block;
height: 48px;
background-color: rgba($delta_color, .1) !important;
background-color: rgba($delta_color, 0.1) !important;
}
}
%expose {
@ -27,7 +27,7 @@
content: "";
display: block;
height: 48px;
background-color: rgba($delta_color, .1) !important;
background-color: rgba($delta_color, 0.1) !important;
}
}
%exp {
@ -85,7 +85,7 @@
display: table;
right: $double_space;
bottom: $double_space;
background-color: rgba($darkest_color, .4);
background-color: rgba($darkest_color, 0.4);
&:hover {
background-color: $brightest_color;
> .span__solo {
@ -94,7 +94,7 @@
}
.span__solo {
display: table-cell;
color: rgba($brightest_color, .8);
color: rgba($brightest_color, 0.8);
font-family: $monospace_font_family;
font-size: 1.4em;
text-align: center;
@ -110,6 +110,6 @@
right: 0;
bottom: 0;
left: 0;
background-color: rgba($delta_color, .1) !important;
@include vendor-prefix(transition, height .5s ease);
background-color: rgba($delta_color, 0.1) !important;
@include vendor-prefix(transition, height 0.5s ease);
}

View file

@ -0,0 +1,11 @@
#root {
@extend .sec__main_status;
position: relative;
height: 100%;
border-color: $foxtrot_color;
h1:first-of-type {
margin-top: 0;
font-weight: bold;
}
}

View file

@ -0,0 +1,3 @@
.up {
@include sprite($up);
}

View file

@ -0,0 +1,101 @@
// SCSS variables are information about icon's compiled state, stored under its original file name
//
// .icon-home {
// width: $icon-home-width;
// }
//
// The large array-like variables contain all information about a single icon
// $icon-home: x y offset_x offset_y width height total_width total_height image_path;
//
// At the bottom of this section, we provide information about the spritesheet itself
// $spritesheet: width height image $spritesheet-sprites;
$down-name: 'down';
$down-x: 32px;
$down-y: 0px;
$down-offset-x: -32px;
$down-offset-y: 0px;
$down-width: 32px;
$down-height: 32px;
$down-total-width: 64px;
$down-total-height: 64px;
$down-image: 'sprites.png';
$down: (32px, 0px, -32px, 0px, 32px, 32px, 64px, 64px, 'sprites.png', 'down', );
$up-name: 'up';
$up-x: 0px;
$up-y: 0px;
$up-offset-x: 0px;
$up-offset-y: 0px;
$up-width: 32px;
$up-height: 64px;
$up-total-width: 64px;
$up-total-height: 64px;
$up-image: 'sprites.png';
$up: (0px, 0px, 0px, 0px, 32px, 64px, 64px, 64px, 'sprites.png', 'up', );
$spritesheet-width: 64px;
$spritesheet-height: 64px;
$spritesheet-image: 'sprites.png';
$spritesheet-sprites: ($down, $up, );
$spritesheet: (64px, 64px, 'sprites.png', $spritesheet-sprites, );
// The provided mixins are intended to be used with the array-like variables
//
// .icon-home {
// @include sprite-width($icon-home);
// }
//
// .icon-email {
// @include sprite($icon-email);
// }
//
// Example usage in HTML:
//
// `display: block` sprite:
// <div class="icon-home"></div>
//
// To change `display` (e.g. `display: inline-block;`), we suggest using a common CSS class:
//
// // CSS
// .icon {
// display: inline-block;
// }
//
// // HTML
// <i class="icon icon-home"></i>
@mixin sprite-width($sprite) {
width: nth($sprite, 5);
}
@mixin sprite-height($sprite) {
height: nth($sprite, 6);
}
@mixin sprite-position($sprite) {
$sprite-offset-x: nth($sprite, 3);
$sprite-offset-y: nth($sprite, 4);
background-position: $sprite-offset-x $sprite-offset-y;
}
@mixin sprite-image($sprite) {
$sprite-image: nth($sprite, 9);
background-image: url(#{$sprite-image});
}
@mixin sprite($sprite) {
@include sprite-image($sprite);
@include sprite-position($sprite);
@include sprite-width($sprite);
@include sprite-height($sprite);
}
// The `sprites` mixin generates identical output to the CSS template
// but can be overridden inside of SCSS
//
// @include sprites($spritesheet-sprites);
@mixin sprites($sprites) {
@each $sprite in $sprites {
$sprite-name: nth($sprite, 10);
.#{$sprite-name} {
@include sprite($sprite);
}
}
}

View file

@ -154,7 +154,7 @@ nav {
&:active,
&:focus,
&:hover {
background-color: rgba($basic_font_color, .2);
background-color: rgba($basic_font_color, 0.2);
color: $basic_font_color;
}
}