diff --git a/assets/scss/_promo-banner.scss b/assets/scss/_promo-banner.scss new file mode 100644 index 00000000..3d38a5ee --- /dev/null +++ b/assets/scss/_promo-banner.scss @@ -0,0 +1,27 @@ +.promo { + &-banner { + width: 100%; + height: 0; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 0.15s; + &.active { + height: 50px; + } + } +} + +.close { + &-banner { + right: 0; + top: 0; + bottom: 0; + display: flex; + align-items: center; + width: 20px; + height: 100%; + margin-right: 20px; + justify-content: center; + cursor: pointer; + } +} diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index 5ef489f4..cb200cf4 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -1,4 +1,5 @@ @import 'success-stories'; +@import 'promo-banner'; @import 'slick-theme'; @import 'slick'; @import 'docs'; diff --git a/config.toml b/config.toml index 22f19ed4..dffbc7d9 100644 --- a/config.toml +++ b/config.toml @@ -133,6 +133,15 @@ algolia_docsearch = false # Enable Lunr.js offline search offlineSearch = true +# Promo Banner variables +[params.promoBanner] + show = true + text = "Spinnaker Summit is co-located with KubeCon this year! Join us on Oct 23-24 in Detroit." + ctaLink = "http://go.armory.io/ss22" + ctaText = "Register" + label = "UPCOMING EVENT" + + # User interface configuration [params.ui] # Enable to show the side bar menu in its compact state. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d3bea967..f354e71f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,10 +4,11 @@ {{ partial "head.html" . }} - +
+ + {{ partial "promo-banner.html" . }} {{ partial "navbar.html" . }} - {{ if .IsHome }}{{ partial "hero-homepage.html" .}}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1c129c00..3a53ca3c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,3 +1,5 @@ + + {{ hugo.Generator }} diff --git a/layouts/partials/hooks/body-end.html b/layouts/partials/hooks/body-end.html index 42ae370b..1e53bdef 100644 --- a/layouts/partials/hooks/body-end.html +++ b/layouts/partials/hooks/body-end.html @@ -19,4 +19,6 @@ } }) -{{ end }} +{{ end }} {{ if .Site.Params.promoBanner.show }} + +{{end}} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 60bd096f..b158c541 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,7 +1,9 @@ {{ $cover := .HasShortcode "blocks/cover" }} -