From 2a250f39a52d446d01f9c17e16ae9b9357d866d3 Mon Sep 17 00:00:00 2001 From: Mike Wickett Date: Tue, 28 Apr 2020 08:54:50 -0400 Subject: [PATCH] website: add alert banner --- .../source/assets/stylesheets/_alert-bar.scss | 29 +++++++++++++++++++ .../assets/stylesheets/application.scss | 1 + website/source/index.html.erb | 1 + website/source/layouts/_alert-bar.erb | 6 ++++ website/source/layouts/layout.erb | 4 +++ 5 files changed, 41 insertions(+) create mode 100644 website/source/assets/stylesheets/_alert-bar.scss create mode 100644 website/source/layouts/_alert-bar.erb diff --git a/website/source/assets/stylesheets/_alert-bar.scss b/website/source/assets/stylesheets/_alert-bar.scss new file mode 100644 index 0000000000..92fc3080b4 --- /dev/null +++ b/website/source/assets/stylesheets/_alert-bar.scss @@ -0,0 +1,29 @@ +.alert-bar { + color: white; + position: relative; + background: linear-gradient(90deg, #ca2171 1.56%, #8e134a 100%); + display: flex; + justify-content: center; + + & a { + text-decoration: none; + display: inline-flex; + color: white; + padding: 14px 15px; + + &:hover { + text-decoration: none; + } + + & p { + padding: 0; + margin: 0; + } + + & .link { + margin-left: 30px; + text-decoration: underline; + font-weight: 500; + } + } +} diff --git a/website/source/assets/stylesheets/application.scss b/website/source/assets/stylesheets/application.scss index 4ea8e1a210..0564d9044a 100644 --- a/website/source/assets/stylesheets/application.scss +++ b/website/source/assets/stylesheets/application.scss @@ -26,6 +26,7 @@ @import '_global'; // Components +@import '_alert-bar'; @import '_header'; @import '_footer'; @import '_inner'; diff --git a/website/source/index.html.erb b/website/source/index.html.erb index 88b518e036..7a41b3561a 100644 --- a/website/source/index.html.erb +++ b/website/source/index.html.erb @@ -2,6 +2,7 @@ description: |- Consul is a service networking solution to connect and secure services across any runtime platform and public or private cloud +show_alert_bar: true ---
diff --git a/website/source/layouts/_alert-bar.erb b/website/source/layouts/_alert-bar.erb new file mode 100644 index 0000000000..ba017fb764 --- /dev/null +++ b/website/source/layouts/_alert-bar.erb @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index 960b1689df..196ec693c1 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -47,6 +47,10 @@ + <% if current_page.data.show_alert_bar == true %> + <%= partial("layouts/_alert-bar") %> + <% end %> + <%= mega_nav :consul %>