whitespace

This commit is contained in:
captainill 2015-11-06 21:01:14 -08:00
parent 7f53f82f0d
commit b33c3fcd0d
7 changed files with 509 additions and 509 deletions

View File

@ -1,50 +1,50 @@
(function(){
Sidebar = Base.extend({
Sidebar = Base.extend({
$body: null,
$overlay: null,
$sidebar: null,
$sidebarHeader: null,
$sidebarImg: null,
$toggleButton: null,
$body: null,
$overlay: null,
$sidebar: null,
$sidebarHeader: null,
$sidebarImg: null,
$toggleButton: null,
constructor: function(){
this.$body = $('body');
this.$overlay = $('.sidebar-overlay');
this.$sidebar = $('#sidebar');
this.$sidebarHeader = $('#sidebar .sidebar-header');
this.$toggleButton = $('.navbar-toggle');
this.sidebarImg = this.$sidebarHeader.css('background-image');
constructor: function(){
this.$body = $('body');
this.$overlay = $('.sidebar-overlay');
this.$sidebar = $('#sidebar');
this.$sidebarHeader = $('#sidebar .sidebar-header');
this.$toggleButton = $('.navbar-toggle');
this.sidebarImg = this.$sidebarHeader.css('background-image');
this.addEventListeners();
},
this.addEventListeners();
},
addEventListeners: function(){
var _this = this;
addEventListeners: function(){
var _this = this;
_this.$toggleButton.on('click', function() {
_this.$sidebar.toggleClass('open');
if ((_this.$sidebar.hasClass('sidebar-fixed-left') || _this.$sidebar.hasClass('sidebar-fixed-right')) && _this.$sidebar.hasClass('open')) {
_this.$overlay.addClass('active');
_this.$body.css('overflow', 'hidden');
} else {
_this.$overlay.removeClass('active');
_this.$body.css('overflow', 'auto');
}
_this.$toggleButton.on('click', function() {
_this.$sidebar.toggleClass('open');
if ((_this.$sidebar.hasClass('sidebar-fixed-left') || _this.$sidebar.hasClass('sidebar-fixed-right')) && _this.$sidebar.hasClass('open')) {
_this.$overlay.addClass('active');
_this.$body.css('overflow', 'hidden');
} else {
_this.$overlay.removeClass('active');
_this.$body.css('overflow', 'auto');
}
return false;
});
return false;
});
_this.$overlay.on('click', function() {
$(this).removeClass('active');
_this.$body.css('overflow', 'auto');
_this.$sidebar.removeClass('open');
});
}
_this.$overlay.on('click', function() {
$(this).removeClass('active');
_this.$body.css('overflow', 'auto');
_this.$sidebar.removeClass('open');
});
}
});
});
window.Sidebar = Sidebar;
window.Sidebar = Sidebar;
})();

View File

@ -5,79 +5,79 @@
// --------------------------------------------------
body.page-sub{
#header{
background-color: $purple;
#header{
background-color: $purple;
.navbar-brand {
.logo{
&:hover{
color: $black;
}
}
.by{
&:hover{
svg{
line{
stroke: $black;
}
}
}
}
.navbar-brand {
.logo{
&:hover{
color: $black;
}
}
.by{
&:hover{
svg{
line{
stroke: $black;
}
}
}
}
}
}
}
#header {
.navbar-brand {
.logo{
font-size: 20px;
text-transform: uppercase;
@include lato-light();
background: image-url('../images/logo-header.png') 0 0 no-repeat;
@include img-retina("../images/logo-header.png", "../images/logo-header@2x.png", $project-logo-width, $project-logo-height);
background-position: 0 45%;
.navbar-brand {
.logo{
font-size: 20px;
text-transform: uppercase;
@include lato-light();
background: image-url('../images/logo-header.png') 0 0 no-repeat;
@include img-retina("../images/logo-header.png", "../images/logo-header@2x.png", $project-logo-width, $project-logo-height);
background-position: 0 45%;
&:hover{
color: $purple;
}
}
.by{
color: $black;
&:hover{
svg{
line{
stroke: $purple;
}
}
}
}
&:hover{
color: $purple;
}
}
.buttons{
margin-top: 2px; //baseline everything
ul.navbar-nav{
li {
// &:hover{
// svg path{
// fill: $purple;
// }
// }
svg path{
fill: $white;
}
}
.by{
color: $black;
&:hover{
svg{
line{
stroke: $purple;
}
}
}
}
}
.main-links,
.external-links {
li > a {
@include project-a-style();
.buttons{
margin-top: 2px; //baseline everything
ul.navbar-nav{
li {
// &:hover{
// svg path{
// fill: $purple;
// }
// }
svg path{
fill: $white;
}
}
}
}
.main-links,
.external-links {
li > a {
@include project-a-style();
}
}
}
@media (max-width: 414px) {

View File

@ -5,19 +5,19 @@
// --------------------------------------------------
.sidebar {
.sidebar-nav {
// Links
//----------------
li {
a {
color: $black;
.sidebar-nav {
// Links
//----------------
li {
a {
color: $black;
svg{
path{
fill: $black;
}
}
}
svg{
path{
fill: $black;
}
}
}
}
}
}

View File

@ -5,195 +5,195 @@
// --------------------------------------------------
#header {
position: relative;
color: black;
text-rendering: optimizeLegibility;
margin-bottom: 0;
transition: all 1s ease;
&.white{
color: white;
.navbar-brand {
.logo {
color: white;
}
.by{
color: white;
font-weight: 300;
svg{
path,
polygon{
fill: white;
}
line{
stroke: white;
}
}
}
}
.main-links,
.external-links {
li > a {
&:hover{
opacity: 1;
}
}
}
.nav > li > a:hover, .nav > li > a:focus {
color: white;
}
.navbar-header{
.navbar-toggle{
.icon-bar{
border: 1px solid white;
}
}
}
}
.navbar-header{
.navbar-toggle{
height: $header-height;
margin: 0;
padding-right: 15px;
border-radius: 0;
.icon-bar{
border: 1px solid $black;
border-radius: 0;
}
}
}
position: relative;
color: black;
text-rendering: optimizeLegibility;
margin-bottom: 0;
transition: all 1s ease;
&.white{
color: white;
.navbar-brand {
display: block;
height: $header-height;
padding: 0;
margin: 0 10px 0 0 ;
.logo {
color: white;
}
.logo{
display: inline-block;
height: $header-height;
vertical-align:top;
padding: 0;
line-height: $header-height;
padding-left: $project-logo-width + $project-logo-pad-left;
background-position: 0 center;
@include transition(all 300ms ease-in);
&:hover{
@include transition(all 300ms ease-in);
text-decoration: none;
}
.by{
color: white;
font-weight: 300;
svg{
path,
polygon{
fill: white;
}
line{
stroke: white;
}
}
.by{
display: inline-block;
vertical-align:top;
height: $header-height;
margin-left: 3px;
padding-top: 2px;
color: black;
line-height: $header-height;
font-family: $header-font-family;
font-weight: 600;
font-size: 0;
text-decoration: none;
.svg-wrap{
font-size: 13px;
}
svg{
&.svg-by{
width: $by-hashicorp-width;
height: $by-hashicorp-height;
margin-bottom: -4px;
margin-left: 4px;
}
&.svg-logo{
width: 16px;
height: 16px;
margin-bottom: -3px;
margin-left: 4px;
}
path,
polygon{
fill: black;
@include transition(all 300ms ease-in);
&:hover{
@include transition(all 300ms ease-in);
}
}
line{
stroke: black;
@include transition(all 300ms ease-in);
&:hover{
@include transition(all 300ms ease-in);
}
}
}
}
}
.external-links {
li {
position: relative;
svg path{
@include transition( all 300ms ease-in );
}
&:hover{
svg path{
@include transition( all 300ms ease-in );
}
}
&.download{
margin-right: 10px;
}
>a {
padding-left: 12px !important;
svg{
position: absolute;
left: -12px;
top: 50%;
margin-top: -7px;
width: 14px;
height: 14px;
}
}
}
}
.main-links{
margin-right: $nav-margin-right * 2;
}
}
.main-links,
.external-links {
li > a {
@include hashi-a-style();
margin: 0 10px;
padding-top: 1px;
line-height: $header-height;
li > a {
&:hover{
opacity: 1;
}
}
}
.nav > li > a:hover, .nav > li > a:focus {
background-color: transparent;
color: $black;
@include transition( all 300ms ease-in );
color: white;
}
.navbar-header{
.navbar-toggle{
.icon-bar{
border: 1px solid white;
}
}
}
}
.navbar-header{
.navbar-toggle{
height: $header-height;
margin: 0;
padding-right: 15px;
border-radius: 0;
.icon-bar{
border: 1px solid $black;
border-radius: 0;
}
}
}
.navbar-brand {
display: block;
height: $header-height;
padding: 0;
margin: 0 10px 0 0 ;
.logo{
display: inline-block;
height: $header-height;
vertical-align:top;
padding: 0;
line-height: $header-height;
padding-left: $project-logo-width + $project-logo-pad-left;
background-position: 0 center;
@include transition(all 300ms ease-in);
&:hover{
@include transition(all 300ms ease-in);
text-decoration: none;
}
}
.by{
display: inline-block;
vertical-align:top;
height: $header-height;
margin-left: 3px;
padding-top: 2px;
color: black;
line-height: $header-height;
font-family: $header-font-family;
font-weight: 600;
font-size: 0;
text-decoration: none;
.svg-wrap{
font-size: 13px;
}
svg{
&.svg-by{
width: $by-hashicorp-width;
height: $by-hashicorp-height;
margin-bottom: -4px;
margin-left: 4px;
}
&.svg-logo{
width: 16px;
height: 16px;
margin-bottom: -3px;
margin-left: 4px;
}
path,
polygon{
fill: black;
@include transition(all 300ms ease-in);
&:hover{
@include transition(all 300ms ease-in);
}
}
line{
stroke: black;
@include transition(all 300ms ease-in);
&:hover{
@include transition(all 300ms ease-in);
}
}
}
}
}
.external-links {
li {
position: relative;
svg path{
@include transition( all 300ms ease-in );
}
&:hover{
svg path{
@include transition( all 300ms ease-in );
}
}
&.download{
margin-right: 10px;
}
> a {
padding-left: 12px !important;
svg{
position: absolute;
left: -12px;
top: 50%;
margin-top: -7px;
width: 14px;
height: 14px;
}
}
}
}
.main-links{
margin-right: $nav-margin-right * 2;
}
.main-links,
.external-links {
li > a {
@include hashi-a-style();
margin: 0 10px;
padding-top: 1px;
line-height: $header-height;
}
}
.nav > li > a:hover, .nav > li > a:focus {
background-color: transparent;
color: $black;
@include transition( all 300ms ease-in );
}
}
@media (max-width: 414px) {
@ -220,9 +220,9 @@
}
.main-links,
.external-links {
li > a {
line-height: $header-mobile-height;
}
li > a {
line-height: $header-mobile-height;
}
}
}
}

View File

@ -38,70 +38,70 @@ $sidebar-icon-width: 40px;
$sidebar-icon-height: 20px;
@mixin sidebar-nav-base {
text-align: center;
text-align: center;
&:last-child{
border-bottom: none;
}
&:last-child{
border-bottom: none;
}
li > a {
background-color: $link-bg;
}
li:hover > a {
background-color: $link-hover-bg;
}
li:focus > a, li > a:focus {
background-color: $link-bg;
}
li > a {
background-color: $link-bg;
}
li:hover > a {
background-color: $link-hover-bg;
}
li:focus > a, li > a:focus {
background-color: $link-bg;
}
> .open > a {
> .open > a {
&,
&:hover,
&:focus {
background-color: $link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
background-color: $link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
background-color: $link-disabled-bg;
}
}
// Dropdown menu items
> .dropdown {
// Remove background color from open dropdown
> .dropdown-menu {
background-color: $link-hover-bg;
> li > a {
&:focus {
background-color: $link-hover-bg;
}
&:hover {
background-color: $link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
background-color: $link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
background-color: $link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
background-color: $link-disabled-bg;
}
}
// Dropdown menu items
> .dropdown {
// Remove background color from open dropdown
> .dropdown-menu {
background-color: $link-hover-bg;
> li > a {
&:focus {
background-color: $link-hover-bg;
}
&:hover {
background-color: $link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: $link-active-color;
background-color: $link-active-bg;
}
}
color: $link-active-color;
background-color: $link-active-bg;
}
}
}
}
}
//
@ -112,182 +112,182 @@ $sidebar-icon-height: 20px;
//
// Basic style of sidebar elements
.sidebar {
position: relative;
display: block;
min-height: 100%;
overflow-y: auto;
overflow-x: hidden;
border: none;
@include transition(all 0.5s cubic-bezier(0.55, 0, 0.1, 1));
@include clearfix();
background-color: $white;
ul{
padding-left: 0;
list-style-type: none;
}
.sidebar-divider, .divider {
width: 80%;
height: 1px;
margin: 8px auto;
background-color: lighten($gray, 20%);
}
// Sidebar heading
//----------------
.sidebar-header {
position: relative;
display: block;
min-height: 100%;
overflow-y: auto;
overflow-x: hidden;
border: none;
@include transition(all 0.5s cubic-bezier(0.55, 0, 0.1, 1));
@include clearfix();
background-color: $white;
margin-bottom: $sidebar-padding;
@include transition(all .2s ease-in-out);
}
ul{
padding-left: 0;
list-style-type: none;
.sidebar-image {
padding-top: 24px;
img {
display: block;
margin: 0 auto;
}
}
.sidebar-divider, .divider {
width: 80%;
height: 1px;
margin: 8px auto;
background-color: lighten($gray, 20%);
// Sidebar icons
//----------------
.sidebar-icon {
display: inline-block;
height: $sidebar-icon-height;
margin-right: $sidebar-divider;
text-align: left;
font-size: $sidebar-icon-height;
vertical-align: middle;
&:before, &:after {
vertical-align: middle;
}
}
// Sidebar heading
.sidebar-nav {
margin: 0;
padding: 0;
@include sidebar-nav-base();
// Links
//----------------
.sidebar-header {
li {
position: relative;
list-style-type: none;
text-align: center;
a {
position: relative;
margin-bottom: $sidebar-padding;
@include transition(all .2s ease-in-out);
}
cursor: pointer;
user-select: none;
@include hashi-a-style-core();
.sidebar-image {
padding-top: 24px;
img {
display: block;
margin: 0 auto;
}
}
// Sidebar icons
//----------------
.sidebar-icon {
display: inline-block;
height: $sidebar-icon-height;
margin-right: $sidebar-divider;
text-align: left;
font-size: $sidebar-icon-height;
vertical-align: middle;
&:before, &:after {
vertical-align: middle;
}
}
.sidebar-nav {
margin: 0;
padding: 0;
@include sidebar-nav-base();
// Links
//----------------
li {
position: relative;
list-style-type: none;
text-align: center;
a {
position: relative;
cursor: pointer;
user-select: none;
@include hashi-a-style-core();
svg{
top: 2px;
width: 14px;
height: 14px;
margin-bottom: -2px;
margin-right: 4px;
}
}
svg{
top: 2px;
width: 14px;
height: 14px;
margin-bottom: -2px;
margin-right: 4px;
}
}
}
}
}
// Sidebar toggling
//
// Hide sidebar
.sidebar {
width: 0;
@include translate3d(-$sidebar-desktop-width, 0, 0);
width: 0;
@include translate3d(-$sidebar-desktop-width, 0, 0);
&.open {
min-width: $sidebar-desktop-width;
width: $sidebar-desktop-width;
@include translate3d(0, 0, 0);
}
&.open {
min-width: $sidebar-desktop-width;
width: $sidebar-desktop-width;
@include translate3d(0, 0, 0);
}
}
// Sidebar positions: fix the left/right sidebars
.sidebar-fixed-left,
.sidebar-fixed-right,
.sidebar-stacked {
position: fixed;
top: 0;
bottom: 0;
z-index: $zindex-sidebar-fixed;
position: fixed;
top: 0;
bottom: 0;
z-index: $zindex-sidebar-fixed;
}
.sidebar-stacked {
left: 0;
left: 0;
}
.sidebar-fixed-left {
left: 0;
box-shadow: 2px 0px 25px rgba(0,0,0,0.15);
-webkit-box-shadow: 2px 0px 25px rgba(0,0,0,0.15);
left: 0;
box-shadow: 2px 0px 25px rgba(0,0,0,0.15);
-webkit-box-shadow: 2px 0px 25px rgba(0,0,0,0.15);
}
.sidebar-fixed-right {
right: 0;
box-shadow: 0px 2px 25px rgba(0,0,0,0.15);
-webkit-box-shadow: 0px 2px 25px rgba(0,0,0,0.15);
right: 0;
box-shadow: 0px 2px 25px rgba(0,0,0,0.15);
-webkit-box-shadow: 0px 2px 25px rgba(0,0,0,0.15);
@include translate3d($sidebar-desktop-width, 0, 0);
&.open {
@include translate3d(0, 0, 0);
}
.icon-material-sidebar-arrow:before {
content: "\e614"; // icon-material-arrow-forward
}
@include translate3d($sidebar-desktop-width, 0, 0);
&.open {
@include translate3d(0, 0, 0);
}
.icon-material-sidebar-arrow:before {
content: "\e614"; // icon-material-arrow-forward
}
}
// Sidebar size
//
// Change size of sidebar and sidebar elements on small screens
@media (max-width: $screen-tablet) {
.sidebar.open {
min-width: $sidebar-width;
width: $sidebar-width;
}
.sidebar.open {
min-width: $sidebar-width;
width: $sidebar-width;
}
.sidebar .sidebar-header {
//height: $sidebar-width * 9/16; // 16:9 header dimension
}
.sidebar .sidebar-header {
//height: $sidebar-width * 9/16; // 16:9 header dimension
}
.sidebar .sidebar-image {
/* img {
width: $sidebar-width/4 - $sidebar-padding;
height: $sidebar-width/4 - $sidebar-padding;
} */
}
.sidebar .sidebar-image {
/* img {
width: $sidebar-width/4 - $sidebar-padding;
height: $sidebar-width/4 - $sidebar-padding;
} */
}
}
.sidebar-overlay {
visibility: hidden;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
background: $white;
z-index: $zindex-sidebar-fixed - 1;
visibility: hidden;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
background: $white;
z-index: $zindex-sidebar-fixed - 1;
-webkit-transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
-moz-transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
-webkit-transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
-moz-transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
transition: visibility 0 linear .4s,opacity .4s cubic-bezier(.4,0,.2,1);
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
}
.sidebar-overlay.active {
opacity: 0.3;
visibility: visible;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
transition-delay: 0;
opacity: 0.3;
visibility: visible;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
transition-delay: 0;
}

View File

@ -19,23 +19,23 @@ $nav-margin-right: 12px;
// Mixins
@mixin hashi-a-style-core{
font-family: $header-font-family;
font-weight: $header-font-weight;
font-size: 14px;
//letter-spacing: 0.0625em;
font-family: $header-font-family;
font-weight: $header-font-weight;
font-size: 14px;
//letter-spacing: 0.0625em;
}
@mixin hashi-a-style{
margin: 0 15px;
padding: 0;
line-height: 22px;
@include hashi-a-style-core();
@include transition( all 300ms ease-in );
margin: 0 15px;
padding: 0;
line-height: 22px;
@include hashi-a-style-core();
@include transition( all 300ms ease-in );
&:hover{
@include transition( all 300ms ease-in );
background-color: transparent;
}
&:hover{
@include transition( all 300ms ease-in );
background-color: transparent;
}
}
//general shared project mixins
@ -45,10 +45,10 @@ $nav-margin-right: 12px;
background-repeat: no-repeat;
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
/* on retina, use image that's scaled by 2 */
background-image: url($image);
background-size: $width $height;
@ -58,30 +58,30 @@ $nav-margin-right: 12px;
//
// -------------------------
@mixin anti-alias() {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
}
@mixin open-light() {
font-family: $font-family-open-sans;
font-weight: 300;
font-family: $font-family-open-sans;
font-weight: 300;
}
@mixin open() {
font-family: $font-family-open-sans;
font-weight: 400;
font-family: $font-family-open-sans;
font-weight: 400;
}
@mixin open-sb() {
font-family: $font-family-open-sans;
font-weight: 600;
font-family: $font-family-open-sans;
font-weight: 600;
}
@mixin open-bold() {
font-family: $font-family-open-sans;
font-weight: 700;
font-family: $font-family-open-sans;
font-weight: 700;
}
@mixin bez-1-transition{
@include transition( all 300ms ease-in-out );
@include transition( all 300ms ease-in-out );
}

View File

@ -10,11 +10,11 @@ $project-logo-pad-left: 8px;
// Mixins
@mixin project-a-style{
color: $white;
font-weight: 300;
opacity: .75;
color: $white;
font-weight: 300;
opacity: .75;
&:hover{
color: $white;
}
&:hover{
color: $white;
}
}