From fbfbb51dd764bfeba86b4c2c847d09ff0c541dfc Mon Sep 17 00:00:00 2001 From: lostinlight Date: Sat, 3 Nov 2018 20:47:04 +0300 Subject: [PATCH] Make no-javascript warning non-scrolling, less obtrusive --- themes/starter/layout/layout.ejs | 10 ++++++---- .../source/assets/scss/partials/_layout.scss | 20 +++++++++++++------ .../source/assets/scss/partials/_z-index.scss | 3 +-- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/themes/starter/layout/layout.ejs b/themes/starter/layout/layout.ejs index 9c53d08..e846e37 100644 --- a/themes/starter/layout/layout.ejs +++ b/themes/starter/layout/layout.ejs @@ -16,13 +16,15 @@ <%- partial('_partial/head') %>
- - <%- partial('_partial/navbar', null, {cache: !config.relative_link}) %> <%- partial('_partial/sidebar') %> -
<%- body %>
+
+ + <%- body %> +

<%=page.title%>

diff --git a/themes/starter/source/assets/scss/partials/_layout.scss b/themes/starter/source/assets/scss/partials/_layout.scss index 07b67d0..550b257 100644 --- a/themes/starter/source/assets/scss/partials/_layout.scss +++ b/themes/starter/source/assets/scss/partials/_layout.scss @@ -350,15 +350,14 @@ dfn { .no-js { position: absolute; - top: 6em; + top: .3em; left: 50%; transform: translateX(-50%); - width: 70%; background: $white; color: $black; - padding: .4em 1em; + padding: .4em 1.3em; text-align: center; - z-index: $zIndex--5; + z-index: $zIndex--3; } @media screen and (max-width: $mq-large) { @@ -424,10 +423,19 @@ dfn { .section-hero span:last-child { display: none; } + + .no-js { + width: 100%; + line-height: 1.3; + } } @media screen and (max-width: $mq-xsmall) { - body { font-size: 90%; } + body { + font-size: 90%; + } - .no-js {left: 0; transform: translate(0, 0); width: 100%; padding: .6em 14% .6em 2em;} + .no-js { + display: none; + } } diff --git a/themes/starter/source/assets/scss/partials/_z-index.scss b/themes/starter/source/assets/scss/partials/_z-index.scss index 9b38a90..72a1656 100644 --- a/themes/starter/source/assets/scss/partials/_z-index.scss +++ b/themes/starter/source/assets/scss/partials/_z-index.scss @@ -3,6 +3,5 @@ $zIndex--1: 1; // footer $zIndex--2: 2; // .main__container:after -$zIndex--3: 3; // .grid +$zIndex--3: 3; // .grid, no-js $zIndex--4: 4; // navbar, trigger, aside -$zIndex--5: 5; // no-js