From 99f060cd42d79818d1fcfc878cdc4f751e5a12b0 Mon Sep 17 00:00:00 2001 From: captainill Date: Fri, 13 Nov 2015 21:00:42 -0800 Subject: [PATCH 01/14] less shared files --- website/www/source/javascripts/Sidebar.js | 50 +++ website/www/source/javascripts/lib/Base.js | 145 ++++++++ website/www/source/layouts/_mobile_nav.erb | 22 ++ website/www/source/layouts/layout.erb | 10 +- website/www/source/stylesheets/_mixins.less | 19 + .../www/source/stylesheets/_mobile-nav.less | 23 ++ .../hashicorp-shared/_hashicorp-header.less | 326 ++++++++++++++++++ .../_hashicorp-mobile-nav.less | 293 ++++++++++++++++ .../hashicorp-shared/_hashicorp-utility.less | 70 ++++ .../hashicorp-shared/_project-utility.less | 28 ++ website/www/source/stylesheets/vagrantup.less | 6 + website/www/source/svg/_svg-by-hashicorp.erb | 18 + website/www/source/svg/_svg-download.erb | 4 + website/www/source/svg/_svg-github.erb | 9 + .../www/source/svg/_svg-hashicorp-logo.erb | 7 + 15 files changed, 1028 insertions(+), 2 deletions(-) create mode 100644 website/www/source/javascripts/Sidebar.js create mode 100644 website/www/source/javascripts/lib/Base.js create mode 100644 website/www/source/layouts/_mobile_nav.erb create mode 100644 website/www/source/stylesheets/_mobile-nav.less create mode 100755 website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less create mode 100644 website/www/source/stylesheets/hashicorp-shared/_hashicorp-mobile-nav.less create mode 100755 website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less create mode 100755 website/www/source/stylesheets/hashicorp-shared/_project-utility.less create mode 100644 website/www/source/svg/_svg-by-hashicorp.erb create mode 100644 website/www/source/svg/_svg-download.erb create mode 100644 website/www/source/svg/_svg-github.erb create mode 100644 website/www/source/svg/_svg-hashicorp-logo.erb diff --git a/website/www/source/javascripts/Sidebar.js b/website/www/source/javascripts/Sidebar.js new file mode 100644 index 000000000..b36e508c4 --- /dev/null +++ b/website/www/source/javascripts/Sidebar.js @@ -0,0 +1,50 @@ +(function(){ + + Sidebar = Base.extend({ + + $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'); + + this.addEventListeners(); + }, + + 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'); + } + + return false; + }); + + _this.$overlay.on('click', function() { + $(this).removeClass('active'); + _this.$body.css('overflow', 'auto'); + _this.$sidebar.removeClass('open'); + }); + } + + }); + + window.Sidebar = Sidebar; + +})(); diff --git a/website/www/source/javascripts/lib/Base.js b/website/www/source/javascripts/lib/Base.js new file mode 100644 index 000000000..504e2beea --- /dev/null +++ b/website/www/source/javascripts/lib/Base.js @@ -0,0 +1,145 @@ +/* + Based on Base.js 1.1a (c) 2006-2010, Dean Edwards + Updated to pass JSHint and converted into a module by Kenneth Powers + License: http://www.opensource.org/licenses/mit-license.php +*/ +/*global define:true module:true*/ +/*jshint eqeqeq:true*/ +(function (name, global, definition) { + if (typeof module !== 'undefined') { + module.exports = definition(); + } else if (typeof define !== 'undefined' && typeof define.amd === 'object') { + define(definition); + } else { + global[name] = definition(); + } +})('Base', this, function () { + // Base Object + var Base = function () {}; + + // Implementation + Base.extend = function (_instance, _static) { // subclass + var extend = Base.prototype.extend; + // build the prototype + Base._prototyping = true; + var proto = new this(); + extend.call(proto, _instance); + proto.base = function () { + // call this method from any other method to invoke that method's ancestor + }; + delete Base._prototyping; + // create the wrapper for the constructor function + //var constructor = proto.constructor.valueOf(); //-dean + var constructor = proto.constructor; + var klass = proto.constructor = function () { + if (!Base._prototyping) { + if (this._constructing || this.constructor === klass) { // instantiation + this._constructing = true; + constructor.apply(this, arguments); + delete this._constructing; + } else if (arguments[0] !== null) { // casting + return (arguments[0].extend || extend).call(arguments[0], proto); + } + } + }; + // build the class interface + klass.ancestor = this; + klass.extend = this.extend; + klass.forEach = this.forEach; + klass.implement = this.implement; + klass.prototype = proto; + klass.toString = this.toString; + klass.valueOf = function (type) { + return (type === 'object') ? klass : constructor.valueOf(); + }; + extend.call(klass, _static); + // class initialization + if (typeof klass.init === 'function') klass.init(); + return klass; + }; + + Base.prototype = { + extend: function (source, value) { + if (arguments.length > 1) { // extending with a name/value pair + var ancestor = this[source]; + if (ancestor && (typeof value === 'function') && // overriding a method? + // the valueOf() comparison is to avoid circular references + (!ancestor.valueOf || ancestor.valueOf() !== value.valueOf()) && /\bbase\b/.test(value)) { + // get the underlying method + var method = value.valueOf(); + // override + value = function () { + var previous = this.base || Base.prototype.base; + this.base = ancestor; + var returnValue = method.apply(this, arguments); + this.base = previous; + return returnValue; + }; + // point to the underlying method + value.valueOf = function (type) { + return (type === 'object') ? value : method; + }; + value.toString = Base.toString; + } + this[source] = value; + } else if (source) { // extending with an object literal + var extend = Base.prototype.extend; + // if this object has a customized extend method then use it + if (!Base._prototyping && typeof this !== 'function') { + extend = this.extend || extend; + } + var proto = { + toSource: null + }; + // do the "toString" and other methods manually + var hidden = ['constructor', 'toString', 'valueOf']; + // if we are prototyping then include the constructor + for (var i = Base._prototyping ? 0 : 1; i < hidden.length; i++) { + var h = hidden[i]; + if (source[h] !== proto[h]) + extend.call(this, h, source[h]); + } + // copy each of the source object's properties to this object + for (var key in source) { + if (!proto[key]) extend.call(this, key, source[key]); + } + } + return this; + } + }; + + // initialize + Base = Base.extend({ + constructor: function () { + this.extend(arguments[0]); + } + }, { + ancestor: Object, + version: '1.1', + forEach: function (object, block, context) { + for (var key in object) { + if (this.prototype[key] === undefined) { + block.call(context, object[key], key, object); + } + } + }, + implement: function () { + for (var i = 0; i < arguments.length; i++) { + if (typeof arguments[i] === 'function') { + // if it's a function, call it + arguments[i](this.prototype); + } else { + // add the interface using the extend method + this.prototype.extend(arguments[i]); + } + } + return this; + }, + toString: function () { + return String(this.valueOf()); + } + }); + + // Return Base implementation + return Base; +}); diff --git a/website/www/source/layouts/_mobile_nav.erb b/website/www/source/layouts/_mobile_nav.erb new file mode 100644 index 000000000..142b6880f --- /dev/null +++ b/website/www/source/layouts/_mobile_nav.erb @@ -0,0 +1,22 @@ + + + + + diff --git a/website/www/source/layouts/layout.erb b/website/www/source/layouts/layout.erb index 4e6736743..78d525fe5 100644 --- a/website/www/source/layouts/layout.erb +++ b/website/www/source/layouts/layout.erb @@ -47,6 +47,8 @@ + <%= partial "layouts/mobile_nav" %> + <%= yield %> @@ -88,10 +90,15 @@ + <%= javascript_include_tag "lib/Base" %> + <%= javascript_include_tag "Sidebar" %> + @@ -129,4 +136,3 @@ - diff --git a/website/www/source/stylesheets/_mixins.less b/website/www/source/stylesheets/_mixins.less index e47f055da..fadf9bb3d 100644 --- a/website/www/source/stylesheets/_mixins.less +++ b/website/www/source/stylesheets/_mixins.less @@ -63,6 +63,25 @@ padding: @baseline 0; } +.transition(@transition) { + -webkit-transition: @transition; + -o-transition: @transition; + transition: @transition; +} + +.translate3d (@x, @y: 0, @z: 0) { + -webkit-transform: translate3d(@x, @y, @z); + -moz-transform: translate3d(@x, @y, @z); + -ms-transform: translate3d(@x, @y, @z); + -o-transform: translate3d(@x, @y, @z); +} + +.clearfix{ + zoom:1; + &:before, &:after{ content:""; display:table; } + &:after{ clear: both; } +} + .inner-bg-large { background-image: #c1b4d5; /* Old browsers */ background-image: url(/images/sidebar_background_inner.png), -moz-linear-gradient(45deg, #c1b4d5 0%, #98d3f8 100%); /* FF3.6+ */ diff --git a/website/www/source/stylesheets/_mobile-nav.less b/website/www/source/stylesheets/_mobile-nav.less new file mode 100644 index 000000000..debcb14f0 --- /dev/null +++ b/website/www/source/stylesheets/_mobile-nav.less @@ -0,0 +1,23 @@ +// +// Sidebar +// - Project Specific +// - Make sidebar edits here +// -------------------------------------------------- + +.sidebar { + .sidebar-nav { + // Links + //---------------- + li { + a { + color: $purple; + + svg{ + path{ + fill: $purple; + } + } + } + } + } +} diff --git a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less new file mode 100755 index 000000000..abb94012c --- /dev/null +++ b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less @@ -0,0 +1,326 @@ +// +// Hashicorp nav +// -------------------------------------------------- + +#header{ + position: relative; + margin-bottom: 0; +} + +.navigation { + color: black; + text-rendering: optimizeLegibility; + transition: all 1s ease; + + &.white{ + .navbar-brand { + .logo { + color: white; + } + } + + .main-links, + .external-links { + li > a { + &:hover{ + opacity: 1; + } + } + } + } + + .navbar-toggle{ + height: @header-height; + margin: 0; + border-radius: 0; + .icon-bar{ + border: 1px solid @black; + border-radius: 0; + } + } + + .external-links { + &.white{ + svg path{ + fill: @white; + } + } + + li { + position: relative; + + svg path{ + .transition( all 300ms ease-in ); + } + + &:hover{ + svg path{ + .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 { + &.white{ + li > a { + color: white; + } + } + li > a { + .hashi-a-style(); + margin: 0 10px; + padding-top: 1px; + line-height: @header-height; + .project-a-style(); + } + } + + .nav > li > a:hover, .nav > li > a:focus { + background-color: transparent; + .transition( all 300ms ease-in ); + } +} + +.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; + .transition(all 300ms ease-in); + + &:hover{ + .transition(all 300ms ease-in); + text-decoration: none; + } + } +} + +.navbar-toggle{ + &.white{ + .icon-bar{ + border: 1px solid white; + } + } +} + +.by-hashicorp{ + 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; + + &.white{ + color: white; + font-weight: 300; + svg{ + path, + polygon{ + fill: white; + } + line{ + stroke: white; + } + } + } + + &:focus, + &:hover{ + 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; + .transition(all 300ms ease-in); + + &:hover{ + .transition(all 300ms ease-in); + } + } + line{ + stroke: black; + .transition(all 300ms ease-in); + + &:hover{ + .transition(all 300ms ease-in); + } + } + } +} + +.hashicorp-project{ + display: inline-block; + height: 30px; + line-height: 30px; + text-decoration: none; + font-size: 14px; + color: @black; + font-weight: 600; + + &.white{ + color: white; + svg{ + path, + polygon{ + fill: white; + } + line{ + stroke: white; + } + } + } + + &:focus{ + text-decoration: none; + } + + &:hover{ + text-decoration: none; + svg{ + &.svg-by{ + line{ + stroke: @purple; + } + } + } + } + + span{ + margin-right: 4px; + font-family: @header-font-family; + font-weight: 500; + } + + span, + svg{ + display: inline-block; + } + + svg{ + &.svg-by{ + width: @by-hashicorp-width; + height: @by-hashicorp-height; + margin-bottom: -4px; + margin-left: -3px; + } + + &.svg-logo{ + width: 30px; + height: 30px; + margin-bottom: -10px; + margin-left: -1px; + } + + path, + line{ + fill: @black; + .transition(all 300ms ease-in); + + &:hover{ + .transition(all 300ms ease-in); + } + } + } +} + +@media (max-width: 992px) { + .navigation { + > .container{ + width: 100%; + } + } +} + +@media (max-width: 768px) { + .navigation { + .main-links{ + margin-right: 0; + } + } +} + +@media (max-width: 414px) { + #header { + .navbar-toggle{ + padding-top: 10px; + height: @header-mobile-height; + } + + .navbar-brand { + height: @header-mobile-height; + + .logo{ + height: @header-mobile-height; + line-height: @header-mobile-height; + } + .by-hashicorp{ + height: @header-mobile-height; + line-height: @header-mobile-height; + padding-top: 0; + } + } + .main-links, + .external-links { + li > a { + line-height: @header-mobile-height; + } + } + } +} diff --git a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-mobile-nav.less b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-mobile-nav.less new file mode 100644 index 000000000..39be1c2ee --- /dev/null +++ b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-mobile-nav.less @@ -0,0 +1,293 @@ +// +// Hashicorp Sidebar +// - Shared throughout projects +// - Edits should not be made here +// -------------------------------------------------- + +// Base variables +// -------------------------------------------------- +@screen-tablet: 768px; + +@gray-darker: #212121; // #212121 - text +@gray-secondary: #757575; // #757575 - secondary text, icons +@gray: #bdbdbd; // #bdbdbd - hint text +@gray-light: #e0e0e0; // #e0e0e0 - divider +@gray-lighter: #f5f5f5; // #f5f5f5 - background +@link-color: @gray-darker; +@link-bg: transparent; +@link-hover-color: @gray-lighter; +@link-hover-bg: @gray-lighter; +@link-active-color: @gray-darker; +@link-active-bg: @gray-light; +@link-disabled-color: @gray-light; +@link-disabled-bg: transparent; + +/* -- Sidebar style ------------------------------- */ + +// Sidebar variables +// -------------------------------------------------- +@zindex-sidebar-fixed: 1035; + +@sidebar-desktop-width: 280px; +@sidebar-width: 240px; + +@sidebar-padding: 16px; +@sidebar-divider: @sidebar-padding/2; + +@sidebar-icon-width: 40px; +@sidebar-icon-height: 20px; + +.sidebar-nav-base { + text-align: center; + + &: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; + } + + > .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 { + color: @link-active-color; + background-color: @link-active-bg; + } + } + } + } +} + +// +// Sidebar +// -------------------------------------------------- + +// Sidebar Elements +// +// Basic style of sidebar elements +.sidebar { + position: relative; + display: block; + min-height: 100%; + overflow-y: auto; + overflow-x: hidden; + border: none; + .transition(all 0.5s cubic-bezier(0.55, 0, 0.1, 1)); + .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; + margin-bottom: @sidebar-padding; + .transition(all .2s ease-in-out); + } + + .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; + + .sidebar-nav-base(); + + // Links + //---------------- + li { + position: relative; + list-style-type: none; + text-align: center; + + a { + position: relative; + cursor: pointer; + user-select: none; + .hashi-a-style-core(); + + svg{ + top: 2px; + width: 14px; + height: 14px; + margin-bottom: -2px; + margin-right: 4px; + } + } + } + } +} + +// Sidebar toggling +// +// Hide sidebar +.sidebar { + width: 0; + .translate3d(-@sidebar-desktop-width, 0, 0); + + &.open { + min-width: @sidebar-desktop-width; + width: @sidebar-desktop-width; + .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; +} +.sidebar-stacked { + 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); +} +.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); + + .translate3d(@sidebar-desktop-width, 0, 0); + &.open { + .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 .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-overlay { + 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); +} + +.sidebar-overlay.active { + opacity: 0.3; + visibility: visible; + -webkit-transition-delay: 0; + -moz-transition-delay: 0; + transition-delay: 0; +} diff --git a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less new file mode 100755 index 000000000..f94100b1b --- /dev/null +++ b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less @@ -0,0 +1,70 @@ +// +// Hashicorp Nav (header/footer) Utiliy Vars and Mixins +// +// Notes: +// - Include this in Application.scss before header and feature-footer +// - Open Sans Google (Semibold - 600) font needs to be included if not already +// -------------------------------------------------- + +// Variables +@font-family-open-sans: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; +@header-font-family: @font-family-open-sans; +@header-font-weight: 600; // semi-bold + +@header-height: 74px; +@header-mobile-height: 60px; +@by-hashicorp-width: 74px; +@by-hashicorp-height: 16px; +@nav-margin-right: 12px; + +// Mixins +.hashi-a-style-core{ + font-family: @header-font-family; + font-weight: @header-font-weight; + font-size: 14px; + //letter-spacing: 0.0625em; +} + +.hashi-a-style{ + margin: 0 15px; + padding: 0; + line-height: 22px; + .hashi-a-style-core(); + .transition( all 0.3s ease ); + + &:hover{ + .transition( all 0.3s ease ); + background-color: transparent; + } +} + +// +// ------------------------- +.anti-alias() { + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; +} + +.open-light() { + font-family: @font-family-open-sans; + font-weight: 300; +} + +.open() { + font-family: @font-family-open-sans; + font-weight: 400; +} + +.open-sb() { + font-family: @font-family-open-sans; + font-weight: 600; +} + +.open-bold() { + font-family: @font-family-open-sans; + font-weight: 700; +} + +.bez-1-transition{ + .transition( all 300ms ease-in-out ); +} diff --git a/website/www/source/stylesheets/hashicorp-shared/_project-utility.less b/website/www/source/stylesheets/hashicorp-shared/_project-utility.less new file mode 100755 index 000000000..f27a6baaa --- /dev/null +++ b/website/www/source/stylesheets/hashicorp-shared/_project-utility.less @@ -0,0 +1,28 @@ +// +// Mixins Specific to project +// - make edits to mixins here +// -------------------------------------------------- + +// Variables +@project-logo-width: 40px; +@project-logo-height: 40px; +@project-logo-pad-left: 0px; + +// Mixins +.project-a-style{ + font-weight: 300; + opacity: .75; + + &:hover{ + color: $white; + opacity: 1; + } +} + +.project-footer-a-style{ + line-height: 30px; + + &:hover{ + opacity: .5; + } +} diff --git a/website/www/source/stylesheets/vagrantup.less b/website/www/source/stylesheets/vagrantup.less index 09d06a9cd..be37466e9 100644 --- a/website/www/source/stylesheets/vagrantup.less +++ b/website/www/source/stylesheets/vagrantup.less @@ -8,6 +8,12 @@ v a g r a n t u p @import '_type'; @import '_mixins'; @import '_base'; + +@import 'hashicorp-shared/_hashicorp-utility'; +@import 'hashicorp-shared/_project-utility'; +@import 'hashicorp-shared/_hashicorp-header'; +@import 'hashicorp-shared/_hashicorp-mobile-nav'; + @import '_nav'; @import '_components'; @import '_modules'; diff --git a/website/www/source/svg/_svg-by-hashicorp.erb b/website/www/source/svg/_svg-by-hashicorp.erb new file mode 100644 index 000000000..d89929590 --- /dev/null +++ b/website/www/source/svg/_svg-by-hashicorp.erb @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/website/www/source/svg/_svg-download.erb b/website/www/source/svg/_svg-download.erb new file mode 100644 index 000000000..6d8441fea --- /dev/null +++ b/website/www/source/svg/_svg-download.erb @@ -0,0 +1,4 @@ + + + diff --git a/website/www/source/svg/_svg-github.erb b/website/www/source/svg/_svg-github.erb new file mode 100644 index 000000000..f0264d5aa --- /dev/null +++ b/website/www/source/svg/_svg-github.erb @@ -0,0 +1,9 @@ + + + + diff --git a/website/www/source/svg/_svg-hashicorp-logo.erb b/website/www/source/svg/_svg-hashicorp-logo.erb new file mode 100644 index 000000000..60663e140 --- /dev/null +++ b/website/www/source/svg/_svg-hashicorp-logo.erb @@ -0,0 +1,7 @@ + From 0701d2dee6868ee3915377bb9f4dfaeb286a6e42 Mon Sep 17 00:00:00 2001 From: captainill Date: Sat, 14 Nov 2015 00:18:37 -0800 Subject: [PATCH 02/14] header left logo --- website/www/Gemfile | 2 +- website/www/Gemfile.lock | 9 +- website/www/source/images/logo-header.png | Bin 0 -> 5010 bytes website/www/source/images/logo-header@2x.png | Bin 0 -> 8863 bytes website/www/source/javascripts/vagrantup.js | 4 +- website/www/source/layouts/layout.erb | 45 ++++--- .../{ => layouts}/svg/_svg-by-hashicorp.erb | 0 .../{ => layouts}/svg/_svg-download.erb | 0 .../source/{ => layouts}/svg/_svg-github.erb | 0 .../{ => layouts}/svg/_svg-hashicorp-logo.erb | 0 website/www/source/stylesheets/_header.less | 126 ++++++++++++++++++ website/www/source/stylesheets/_nav.less | 59 ++++++-- .../hashicorp-shared/_hashicorp-header.less | 13 +- .../hashicorp-shared/_hashicorp-utility.less | 21 ++- .../hashicorp-shared/_project-utility.less | 6 +- website/www/source/stylesheets/vagrantup.less | 3 +- 16 files changed, 249 insertions(+), 39 deletions(-) create mode 100644 website/www/source/images/logo-header.png create mode 100644 website/www/source/images/logo-header@2x.png rename website/www/source/{ => layouts}/svg/_svg-by-hashicorp.erb (100%) rename website/www/source/{ => layouts}/svg/_svg-download.erb (100%) rename website/www/source/{ => layouts}/svg/_svg-github.erb (100%) rename website/www/source/{ => layouts}/svg/_svg-hashicorp-logo.erb (100%) create mode 100644 website/www/source/stylesheets/_header.less diff --git a/website/www/Gemfile b/website/www/Gemfile index 074cfa13c..1d1b3a338 100644 --- a/website/www/Gemfile +++ b/website/www/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' ruby "2.2.2" gem "builder", "~> 3.2.2" -gem "less", "~> 2.2.2" +gem "less", "~> 2.6.0" gem "middleman", "~> 3.1.5" gem "middleman-blog", "~> 3.3.0" gem "middleman-minify-html", "~> 3.1.1" diff --git a/website/www/Gemfile.lock b/website/www/Gemfile.lock index 946a40701..9f7cbd874 100644 --- a/website/www/Gemfile.lock +++ b/website/www/Gemfile.lock @@ -34,8 +34,8 @@ GEM hike (1.2.3) i18n (0.6.11) kramdown (1.9.0) - less (2.2.2) - commonjs (~> 0.2.6) + less (2.6.0) + commonjs (~> 0.2.7) libv8 (3.16.14.13) listen (1.3.1) rb-fsevent (>= 0.9.3) @@ -123,7 +123,7 @@ PLATFORMS DEPENDENCIES builder (~> 3.2.2) highline (~> 1.6.15) - less (~> 2.2.2) + less (~> 2.6.0) middleman (~> 3.1.5) middleman-blog (~> 3.3.0) middleman-minify-html (~> 3.1.1) @@ -133,3 +133,6 @@ DEPENDENCIES redcarpet (~> 3.0.0) therubyracer (~> 0.12.0) thin (~> 1.5.0) + +BUNDLED WITH + 1.10.6 diff --git a/website/www/source/images/logo-header.png b/website/www/source/images/logo-header.png new file mode 100644 index 0000000000000000000000000000000000000000..a058de16f12580fbc7e20901f6569695851d18b3 GIT binary patch literal 5010 zcmV;D6K(8?P)Px|Oi4sRRCodHTnl(q$90~$cXy@LuB4TOWFd?s-oZ4*6HHGJVKkU(rw+h3g4 zq;~t+O-Mi(Kbn#>vQ6G55;ShU*cjJs9KP0$T?dMhUqFoe86=z!w|+p-14-x&dTXV9 z-06Sr?p^NPy>}l%Pz*bK%gmfPXCCLCd(N3NbH$iNI(YD)t-iiK*P{8dfm>Qy@-N$9 z>482y9O&%qydA&O9UUDb?d|Q4BX?cy*<<`$@H^Vo)fK?_Pvci~x#y4`@5X*Xyk)E-pT5g)?3_#&tq#K7#xa%p)sK zKc|4R1#{RJ2PfTh6>)$!wzhvQ%PxHnYs#})m(6BlZnv9J-qX`Vn)H{FB>jD1VPTsU zO)Bv2?(Q!uibC46GzGevh7slOZkaZ@DFvD|>Zgzc(nE*4Z>;SYHPxQbXe>KBo8{%@ zF^9vUEswPCJrJss(0p4P8yhpVhE(&mwzfs^JCC5RJ)limKu3ez`^)C6KmN(bxq(#2 zOyht0I3S(q8rxHGusi#~L)}9iL%~7)5;8I}82w0CO_F;sz#o3Lt>_JtwuGPsKR>?a z(Aly5K)fX(au@+BJn&X`#^B}?xsKO6Gk^Q?=d)UqrA^~~dO4s<-;Cb(rjs2Ze*f6uY z?jZ1&&CPf8J-Q@M%*u0Ex*OE*2j|7e3#~c4W6bUhjl*v{u*UYAP&xho)yx4+NVlNy zq_)u93~6-3jh>M&On2n~rn&;MER(Q`H=9P!ztG~!=<{*6h7Z~ObpeXtq6&|+?E-v>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2j7cd zWx`3yLEaVE1grj*d&IYq@ydyR-at_fcxCFJ4pE?PBIyjVmYj!_YET_sN3SnmevI73 z7kxAHo!n4V6}kKSUaX1Lvu6&p=0@i>TO!M4FcK6vnl$QrsW+xBoc^X+Ymr4L#y%Kc++F$p8pi43Pe zFJCbBhTQZDc>kty*lh1K4mU)~LstKuIK_mrdEBb)ot45$UNzklRPf(9gmsRL#u8r> z 0) $('nav').addClass("drop-shadow"); - if (top === 0) $('nav').removeClass("drop-shadow"); + if (top > 0) $('#header').addClass("drop-shadow"); + if (top === 0) $('header').removeClass("drop-shadow"); }); }); diff --git a/website/www/source/layouts/layout.erb b/website/www/source/layouts/layout.erb index 78d525fe5..5085bca2a 100644 --- a/website/www/source/layouts/layout.erb +++ b/website/www/source/layouts/layout.erb @@ -20,7 +20,7 @@ <%= javascript_include_tag "vagrantup" %> - + @@ -32,20 +32,35 @@
- - - + + <%= partial "layouts/mobile_nav" %> diff --git a/website/www/source/svg/_svg-by-hashicorp.erb b/website/www/source/layouts/svg/_svg-by-hashicorp.erb similarity index 100% rename from website/www/source/svg/_svg-by-hashicorp.erb rename to website/www/source/layouts/svg/_svg-by-hashicorp.erb diff --git a/website/www/source/svg/_svg-download.erb b/website/www/source/layouts/svg/_svg-download.erb similarity index 100% rename from website/www/source/svg/_svg-download.erb rename to website/www/source/layouts/svg/_svg-download.erb diff --git a/website/www/source/svg/_svg-github.erb b/website/www/source/layouts/svg/_svg-github.erb similarity index 100% rename from website/www/source/svg/_svg-github.erb rename to website/www/source/layouts/svg/_svg-github.erb diff --git a/website/www/source/svg/_svg-hashicorp-logo.erb b/website/www/source/layouts/svg/_svg-hashicorp-logo.erb similarity index 100% rename from website/www/source/svg/_svg-hashicorp-logo.erb rename to website/www/source/layouts/svg/_svg-hashicorp-logo.erb diff --git a/website/www/source/stylesheets/_header.less b/website/www/source/stylesheets/_header.less new file mode 100644 index 000000000..b83d9e6a6 --- /dev/null +++ b/website/www/source/stylesheets/_header.less @@ -0,0 +1,126 @@ +// +// Header +// - Project Specific +// - edits should be made here +// -------------------------------------------------- + +#header { + width: 100%; + // font-size: 15px; + text-transform: uppercase; + height: @header-height; + position: fixed; + top: 0; + left: 0; + background-color: @white; + z-index: 9999999999; + + &.docs { + background: @gray-background; + } + + .navbar-brand { + float: left; + .logo{ + padding-left: 36px; + font-size: 0; + line-height: 77px; + width: @project-logo-width; + padding-left: 0; + .img-retina('/images/logo-header.png', @project-logo-width, @project-logo-height, no-repeat); + background-position: 0 center; + + &:hover{ + opacity: .6; + } + } + + .by-hashicorp{ + color: @project-link-color; + + svg{ + path, + polygon{ + fill: @project-link-color; + } + line{ + stroke: @project-link-color; + } + } + + &:hover{ + color: black; + svg{ + path, + polygon{ + fill: black; + } + line{ + stroke: black; + } + } + } + + .svg-wrap{ + font-weight: 400; + } + } + } + + .buttons{ + margin-top: 2px; //baseline everything + + .navigation-links{ + float: right; + } + } + + .main-links, + .external-links { + li > a { + .project-a-style(); + } + } + + .main-links { + li > a { + color: white; + + &:hover{ + color: @project-link-color; + } + } + } +} + +@media (max-width: 768px) { + #header { + .navbar-brand { + + } + } +} + +@media (max-width: 414px) { + #header { + .navbar-brand { + .logo{ + padding-left: 37px; + font-size: 18px; + .img-retina('/images/logo-header.png', @project-logo-width * .75, @project-logo-height * .75, no-repeat); + //background-position: 0 45%; + } + } + } +} + + +@media (max-width: 320px) { + #header { + .navbar-brand { + .logo{ + font-size: 0 !important; //hide terraform text + } + } + } +} diff --git a/website/www/source/stylesheets/_nav.less b/website/www/source/stylesheets/_nav.less index 9c2d5c1bd..05d570861 100644 --- a/website/www/source/stylesheets/_nav.less +++ b/website/www/source/stylesheets/_nav.less @@ -17,14 +17,57 @@ nav { background: @gray-background; } - .vagrant-logo { - display: block; - text-indent: -999999px; - background: url(/images/logo_vagrant.png) no-repeat 0 0; - height: 70px; - width: 275px; - float: left; - margin: 10px 20px; + .logo { + font-size: 0; + .img-retina('/images/logo-header.png', @project-logo-width, @project-logo-height, no-repeat); + background-position: 0, center; + height: @project-logo-height; + width: @project-logo-width; + margin-left: 15px; + &:hover{ + opacity: .6; + } + } + + .by-hashicorp{ + &:hover{ + svg{ + line{ + opacity: .4; + } + } + } + } + + .by-hashicorp{ + color: @project-link-color; + + &:hover{ + color: black; + svg{ + path, + polygon{ + fill: black; + } + line{ + stroke: black; + } + } + } + + .svg-wrap{ + font-weight: 400; + } + + svg{ + path, + polygon{ + fill: @project-link-color; + } + line{ + stroke: @project-link-color; + } + } } .vagrant-docs-logo { diff --git a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less index abb94012c..53f561ab6 100755 --- a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less +++ b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-header.less @@ -2,11 +2,6 @@ // Hashicorp nav // -------------------------------------------------- -#header{ - position: relative; - margin-bottom: 0; -} - .navigation { color: black; text-rendering: optimizeLegibility; @@ -115,7 +110,6 @@ vertical-align:top; padding: 0; line-height: @header-height; - padding-left: @project-logo-width + @project-logo-pad-left; background-position: 0 center; .transition(all 300ms ease-in); @@ -145,7 +139,9 @@ font-family: @header-font-family; font-weight: 600; font-size: 0; + letter-spacing: 0; text-decoration: none; + text-transform: none; &.white{ color: white; @@ -166,8 +162,13 @@ text-decoration: none; } + &:hover{ + .transition(all 300ms ease-in); + } + .svg-wrap{ font-size: 13px; + .transition(all 300ms ease-in); } svg{ diff --git a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less index f94100b1b..8ecb75ee6 100755 --- a/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less +++ b/website/www/source/stylesheets/hashicorp-shared/_hashicorp-utility.less @@ -11,7 +11,7 @@ @header-font-family: @font-family-open-sans; @header-font-weight: 600; // semi-bold -@header-height: 74px; +@header-height: 80px; @header-mobile-height: 60px; @by-hashicorp-width: 74px; @by-hashicorp-height: 16px; @@ -38,6 +38,25 @@ } } +.img-retina(@image, @width, @height, @repeat: no-repeat) { + @filename : ~`/(.*)\.(jpg|jpeg|png|gif)/.exec(@{image})[1]`; + @extension : ~`/(.*)\.(jpg|jpeg|png|gif)/.exec(@{image})[2]`; + background-image: ~`"url(@{filename}.@{extension})"`; + background-repeat: @repeat; + + @media + only screen and (-webkit-min-device-pixel-ratio: 2), + only screen and ( min--moz-device-pixel-ratio: 2), + only screen and ( -o-min-device-pixel-ratio: 2/1), + only screen and ( min-device-pixel-ratio: 2), + only screen and ( min-resolution: 192dpi), + only screen and ( min-resolution: 2dppx) { + /* on retina, use image that's scaled by 2 */ + background-image: ~`"url(@{filename}@2x.@{extension})"`; + background-size: @width @height; + } +} + // // ------------------------- .anti-alias() { diff --git a/website/www/source/stylesheets/hashicorp-shared/_project-utility.less b/website/www/source/stylesheets/hashicorp-shared/_project-utility.less index f27a6baaa..03d7eca54 100755 --- a/website/www/source/stylesheets/hashicorp-shared/_project-utility.less +++ b/website/www/source/stylesheets/hashicorp-shared/_project-utility.less @@ -4,14 +4,16 @@ // -------------------------------------------------- // Variables -@project-logo-width: 40px; -@project-logo-height: 40px; +@project-logo-width: 169px; +@project-logo-height: 46px; @project-logo-pad-left: 0px; +@project-link-color: #8d9ba8; // Mixins .project-a-style{ font-weight: 300; opacity: .75; + color: @project-link-color; &:hover{ color: $white; diff --git a/website/www/source/stylesheets/vagrantup.less b/website/www/source/stylesheets/vagrantup.less index be37466e9..de14b3c71 100644 --- a/website/www/source/stylesheets/vagrantup.less +++ b/website/www/source/stylesheets/vagrantup.less @@ -14,7 +14,8 @@ v a g r a n t u p @import 'hashicorp-shared/_hashicorp-header'; @import 'hashicorp-shared/_hashicorp-mobile-nav'; -@import '_nav'; +// @import '_nav'; +@import '_header'; @import '_components'; @import '_modules'; @import '_sidebar'; From 38616ca7bca8c91892143af7af1192e744673368 Mon Sep 17 00:00:00 2001 From: captainill Date: Sat, 14 Nov 2015 00:59:33 -0800 Subject: [PATCH 03/14] add navbar toggle --- website/www/source/layouts/layout.erb | 9 ++++----- .../hashicorp-shared/_hashicorp-header.less | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/website/www/source/layouts/layout.erb b/website/www/source/layouts/layout.erb index 5085bca2a..983504e8c 100644 --- a/website/www/source/layouts/layout.erb +++ b/website/www/source/layouts/layout.erb @@ -33,7 +33,7 @@
-