From a83db21a77b81a335a19c2bb8901118158a1fc70 Mon Sep 17 00:00:00 2001 From: captainill Date: Mon, 22 Feb 2016 23:45:55 -0800 Subject: [PATCH] website: announcement banner for vault enterprise --- website/Gemfile.lock | 3 - .../assets/stylesheets/_announcement-bnr.scss | 63 +++++++++++++++++++ .../source/assets/stylesheets/_global.scss | 12 ++++ .../assets/stylesheets/application.scss | 1 + .../hashicorp-shared/_hashicorp-header.scss | 12 +++- .../hashicorp-shared/_hashicorp-utility.scss | 2 +- website/source/layouts/_announcement-bnr.erb | 18 ++++++ website/source/layouts/_header.erb | 1 + website/source/layouts/_sidebar.erb | 1 + website/source/layouts/layout.erb | 1 + .../source/layouts/svg/_svg-enterprise.erb | 38 +++++++++++ 11 files changed, 145 insertions(+), 7 deletions(-) create mode 100755 website/source/assets/stylesheets/_announcement-bnr.scss create mode 100644 website/source/layouts/_announcement-bnr.erb create mode 100644 website/source/layouts/svg/_svg-enterprise.erb diff --git a/website/Gemfile.lock b/website/Gemfile.lock index d37556ec0..e70514f6e 100644 --- a/website/Gemfile.lock +++ b/website/Gemfile.lock @@ -188,6 +188,3 @@ PLATFORMS DEPENDENCIES middleman-hashicorp! - -BUNDLED WITH - 1.10.6 diff --git a/website/source/assets/stylesheets/_announcement-bnr.scss b/website/source/assets/stylesheets/_announcement-bnr.scss new file mode 100755 index 000000000..3c8f7748f --- /dev/null +++ b/website/source/assets/stylesheets/_announcement-bnr.scss @@ -0,0 +1,63 @@ +// +// announcement bnr +// -------------------------------------------------- + +#announcement-bnr { + height: 40px; + flex-shrink: 0; + background-color: $black; + + a,p{ + font-size: 14px; + color: $white; + line-height: 40px; + margin-bottom: 0; + } + + .link-blue{ + margin-left: 5px; + color: $blue; + font-weight: 600; + } + + .enterprise-logo{ + position: relative; + top: 4px; + + &:hover{ + svg{ + rect{ + fill: $blue; + @include transition(all .1s ease-in); + } + } + } + + svg{ + width: 128px; + fill: $white; + margin-right: 4px; + margin-left: 1px; + + rect{ + @include transition(all .1s ease-in); + } + } + } +} + +@media (max-width: 768px) { + #announcement-bnr { + .tagline{ + display: none; + } + } +} + +@media (max-width: 320px) { + #announcement-bnr { + a,p{ + font-size: 12px; + } + } +} diff --git a/website/source/assets/stylesheets/_global.scss b/website/source/assets/stylesheets/_global.scss index 6fff1dceb..046aeb27f 100755 --- a/website/source/assets/stylesheets/_global.scss +++ b/website/source/assets/stylesheets/_global.scss @@ -92,3 +92,15 @@ pre { .center { text-align: center; } + +.hcaret{ + display: inline-block; + -moz-transform: translate(0, -1px) rotate(135deg); + -webkit-transform: translate(0, -1px) rotate(135deg); + transform: translate(0, -1px) rotate(135deg); + width: 7px; + height: 7px; + border-top: 1px solid $blue; + border-left: 1px solid $blue; + @include transition(all .1s ease-in); +} diff --git a/website/source/assets/stylesheets/application.scss b/website/source/assets/stylesheets/application.scss index 99d1aa95d..781f22f96 100755 --- a/website/source/assets/stylesheets/application.scss +++ b/website/source/assets/stylesheets/application.scss @@ -19,6 +19,7 @@ @import 'hashicorp-shared/_hashicorp-sidebar'; // Components +@import '_announcement-bnr'; @import '_header'; @import '_footer'; @import '_jumbotron'; diff --git a/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-header.scss b/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-header.scss index dd8d06dc3..cd92fe731 100755 --- a/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-header.scss +++ b/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-header.scss @@ -67,13 +67,19 @@ margin-right: 10px; } + &.github{ + a{ + margin-right: 0; + } + } + > a { padding-left: 12px !important; svg{ position: absolute; - left: -12px; + left: -8px; top: 50%; - margin-top: -7px; + margin-top: -8px; width: 14px; height: 14px; } @@ -82,7 +88,7 @@ } .main-links{ - margin-right: $nav-margin-right * 2; + margin-right: $nav-margin-right; } .main-links, diff --git a/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-utility.scss b/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-utility.scss index c3daed7fc..a8764ae30 100755 --- a/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-utility.scss +++ b/website/source/assets/stylesheets/hashicorp-shared/_hashicorp-utility.scss @@ -15,7 +15,7 @@ $header-height: 74px; $header-mobile-height: 60px; $by-hashicorp-width: 74px; $by-hashicorp-height: 16px; -$nav-margin-right: 12px; +$nav-margin-right: 8px; // Mixins @mixin hashi-a-style-core{ diff --git a/website/source/layouts/_announcement-bnr.erb b/website/source/layouts/_announcement-bnr.erb new file mode 100644 index 000000000..77bf4f0dc --- /dev/null +++ b/website/source/layouts/_announcement-bnr.erb @@ -0,0 +1,18 @@ +
+
+
+
+

+ Announcing + + Secure Infrastructure Automation. + + Find out more + +

+
+
+
+
diff --git a/website/source/layouts/_header.erb b/website/source/layouts/_header.erb index 78e9ee98b..88d6ae38e 100644 --- a/website/source/layouts/_header.erb +++ b/website/source/layouts/_header.erb @@ -28,6 +28,7 @@
  • Intro
  • Docs
  • Community
  • +
  • Enterprise
  • diff --git a/website/source/layouts/_sidebar.erb b/website/source/layouts/_sidebar.erb index 22ed37b0f..3698086a1 100644 --- a/website/source/layouts/_sidebar.erb +++ b/website/source/layouts/_sidebar.erb @@ -15,6 +15,7 @@
  • Intro
  • Docs
  • Community
  • +
  • Enterprise
  • diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index 1b44f531d..729e9a543 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -1,4 +1,5 @@ <%= partial "layouts/meta" %> +<%= partial "layouts/announcement-bnr" %> <%= partial "layouts/header" %> <%= partial "layouts/sidebar" %> diff --git a/website/source/layouts/svg/_svg-enterprise.erb b/website/source/layouts/svg/_svg-enterprise.erb new file mode 100644 index 000000000..ae8aaea04 --- /dev/null +++ b/website/source/layouts/svg/_svg-enterprise.erb @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +