Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a banner for nightly and older versions, linking to stable #49

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/css/banner.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.banner-nightly {
background-color: #fa0;
}

.banner-outdated {
background: #f80;
}
13 changes: 7 additions & 6 deletions src/css/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ body {
padding-top: var(--navbar-height);
}

.header {
position: fixed;
top: 0;
width: 100%;
z-index: var(--z-index-navbar);
}

.navbar {
background: var(--navbar-background);
color: var(--navbar-font-color);
font-size: calc(16 / var(--rem-base) * 1rem);
height: var(--navbar-height);
position: fixed;
top: 0;
width: 100%;
z-index: var(--z-index-navbar);
}

.navbar a {
Expand Down Expand Up @@ -176,11 +179,9 @@ body {

.navbar-sub {
display: block;
position: relative;
background-color: var(--color-brand-primary);
padding: 5px 15px 5px 0;
transition: all 0.5s;
height: 42px;
/* overflow: hidden; */
}

Expand Down
1 change: 1 addition & 0 deletions src/css/site.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "typeface-roboto-mono.css";
@import "typeface-titillium-web.css";
@import "vars.css";
@import "banner.css";
@import "base.css";
@import "body.css";
@import "search.css";
Expand Down
2 changes: 2 additions & 0 deletions src/css/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
--panel-background: var(--color-smoke-30);
--panel-border-color: var(--color-smoke-90);
--scrollbar-thumb-color: var(--color-gray-10);
/* banners */
/* navbar */
--navbar-background: var(--color-jet-70);
--navbar-font-color: var(--color-white);
Expand Down Expand Up @@ -120,6 +121,7 @@
--footer-font-color: var(--color-white);
--footer-link-font-color: var(--color-smoke-70);
/* dimensions and positioning */
--banner-height: calc(45 / var(--rem-base) * 1rem);
--navbar-height: calc(73 / var(--rem-base) * 1rem);
--toolbar-height: calc(45 / var(--rem-base) * 1rem);
--drawer-height: var(--toolbar-height);
Expand Down
12 changes: 12 additions & 0 deletions src/partials/banner-outdated-version.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{#if (eq page.version "nightly")}}
<div class="banner-nightly">
These are the docs for a nightly preview version of the Stackable Data Platform. Latest stable release is XY.Z
</div>
{{else}}
{{#unless (eq page.version page.component.latest.version)}}
<div class="banner-outdated">
These are the docs for an older version of the Stackable Data Platform (XY.Z). Latest stable release is XY.Z
</div>
{{/unless}}
{{/if}}
</div>
1 change: 1 addition & 0 deletions src/partials/header-content.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<header class="header">
{{> banner-outdated-version}}
<nav class="navbar">
<div class="container">
<div class="navbar-brand">
Expand Down