From 6159874b40d1b11fe730847b4099e373f8ec3ba9 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Fri, 19 Jun 2020 20:42:00 +0800 Subject: [PATCH] Add noscript-warning --- layout/_macro/sidebar.njk | 2 -- layout/_scripts/noscript.njk | 3 +++ source/css/_common/components/components.styl | 14 ++++++++++++++ source/css/_schemes/Mist/_header.styl | 4 ---- source/css/_schemes/Pisces/_layout.styl | 10 ---------- source/css/_variables/Mist.styl | 1 + 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/layout/_macro/sidebar.njk b/layout/_macro/sidebar.njk index 991dd71..3122a8e 100644 --- a/layout/_macro/sidebar.njk +++ b/layout/_macro/sidebar.njk @@ -7,7 +7,6 @@
diff --git a/layout/_scripts/noscript.njk b/layout/_scripts/noscript.njk index ec5ec96..1917b00 100644 --- a/layout/_scripts/noscript.njk +++ b/layout/_scripts/noscript.njk @@ -1,5 +1,7 @@ diff --git a/source/css/_common/components/components.styl b/source/css/_common/components/components.styl index 0a9a06d..f1c8dc4 100644 --- a/source/css/_common/components/components.styl +++ b/source/css/_common/components/components.styl @@ -6,6 +6,20 @@ if (hexo-config('back2top.enable')) { @import (hexo-config('back2top.sidebar') ? 'back-to-top-sidebar' : 'back-to-top'); } +#noscript-warning { + background-color: lighten($red, 20%); + color: #fff; + font-family: sans-serif; + font-size: 1rem; + font-weight: bold; + left: 0; + position: fixed; + text-align: center; + top: 0; + width: 100%; + z-index: $zindex-5; +} + @import 'reading-progress' if (hexo-config('reading_progress.enable')); @import 'post'; diff --git a/source/css/_schemes/Mist/_header.styl b/source/css/_schemes/Mist/_header.styl index 3f869e7..9795376 100644 --- a/source/css/_schemes/Mist/_header.styl +++ b/source/css/_schemes/Mist/_header.styl @@ -1,9 +1,5 @@ // Header // -------------------------------------------------- -.header { - background: var(--content-bg-color); -} - .header-inner { align-items: center; display: flex; diff --git a/source/css/_schemes/Pisces/_layout.styl b/source/css/_schemes/Pisces/_layout.styl index abe030d..c5f4209 100644 --- a/source/css/_schemes/Pisces/_layout.styl +++ b/source/css/_schemes/Pisces/_layout.styl @@ -2,22 +2,12 @@ // Make sure that .header and .main-inner are the same height // Required for .sidebar `position: sticky;` align-self: stretch; - width: $sidebar-desktop; - - +desktop-large() { - width: $sidebar-desktop; - } - - +tablet-mobile() { - width: auto; - } } .header-inner { background: var(--content-bg-color); border-radius: $border-radius-inner; box-shadow: $box-shadow-inner; - top: 0; width: $sidebar-desktop; +desktop-large() { diff --git a/source/css/_variables/Mist.styl b/source/css/_variables/Mist.styl index 63d3973..a6b3c81 100644 --- a/source/css/_variables/Mist.styl +++ b/source/css/_variables/Mist.styl @@ -7,6 +7,7 @@ $link-decoration-color = $grey-light; $content-bg-color = $whitesmoke; $menu-item-bg-color = $grey-lighter; +$head-bg = var(--content-bg-color); $brand-color = $black-deep; $brand-hover-color = $brand-color;