From 757c219f100b8ced250c9b3c8763d5f102630cf6 Mon Sep 17 00:00:00 2001 From: xdavidwu Date: Thu, 21 Jan 2021 17:18:14 +0800 Subject: [PATCH] masthead: cleanup yet another div --- _includes/masthead.html | 54 ++++++------ _sass/minimal-mistakes/_masthead.scss | 100 ++++++++++++++++++++++ _sass/minimal-mistakes/_navigation.scss | 105 ------------------------ 3 files changed, 126 insertions(+), 133 deletions(-) diff --git a/_includes/masthead.html b/_includes/masthead.html index dc61968..433f234 100644 --- a/_includes/masthead.html +++ b/_includes/masthead.html @@ -1,31 +1,29 @@ {% capture logo_path %}{{ site.logo }}{% endcapture %} -
- -
+ + {% endif %} + + + diff --git a/_sass/minimal-mistakes/_masthead.scss b/_sass/minimal-mistakes/_masthead.scss index 52a92d7..7424c0e 100644 --- a/_sass/minimal-mistakes/_masthead.scss +++ b/_sass/minimal-mistakes/_masthead.scss @@ -41,6 +41,106 @@ } } +.greedy-nav { + display: flex; + align-items: center; + min-height: $nav-height; + + a { + display: block; + margin: 0 1rem; + text-decoration: none; + + &.site-logo { + margin-left: 0; + margin-right: 0.5rem; + } + + &.site-title { + margin-left: 0; + } + } + + &__toggle { + align-self: center; + height: $nav-toggle-height; + border: 0; + outline: none; + cursor: pointer; + } + + .visible-links { + display: flex; + justify-content: flex-end; + flex: 1; + overflow: hidden; + + li { + flex: none; + } + + a { + position: relative; + } + } + + .hidden-links { + position: absolute; + top: 100%; + right: 0; + margin-top: 15px; + padding: 5px; + border-width: 1px; + border-style: solid; + border-radius: $border-radius; + box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12); + + &.hidden { + display: none; + } + + a { + margin: 0; + padding: 10px 20px; + font-size: $type-size-5; + } + + &:before { + content: ""; + position: absolute; + top: -11px; + right: 10px; + width: 0; + border-style: solid; + border-width: 0 10px 10px; + display: block; + z-index: 0; + } + + &:after { + content: ""; + position: absolute; + top: -10px; + right: 10px; + width: 0; + border-style: solid; + border-width: 0 10px 10px; + display: block; + z-index: 1; + } + + li { + display: block; + border-bottom-width: 1px; + border-bottom-style: solid; + + &:last-child { + border-bottom: none; + } + } + } +} + .site-logo img { max-height: 2rem; } diff --git a/_sass/minimal-mistakes/_navigation.scss b/_sass/minimal-mistakes/_navigation.scss index a42680c..9bcbd14 100644 --- a/_sass/minimal-mistakes/_navigation.scss +++ b/_sass/minimal-mistakes/_navigation.scss @@ -149,111 +149,6 @@ border-top-style: solid; } -/* - Priority plus navigation - ========================================================================== */ - -.greedy-nav { - position: relative; - display: flex; - align-items: center; - min-height: $nav-height; - - a { - display: block; - margin: 0 1rem; - text-decoration: none; - - &.site-logo { - margin-left: 0; - margin-right: 0.5rem; - } - - &.site-title { - margin-left: 0; - } - } - - &__toggle { - align-self: center; - height: $nav-toggle-height; - border: 0; - outline: none; - cursor: pointer; - } - - .visible-links { - display: flex; - justify-content: flex-end; - flex: 1; - overflow: hidden; - - li { - flex: none; - } - - a { - position: relative; - } - } - - .hidden-links { - position: absolute; - top: 100%; - right: 0; - margin-top: 15px; - padding: 5px; - border-width: 1px; - border-style: solid; - border-radius: $border-radius; - box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12); - - &.hidden { - display: none; - } - - a { - margin: 0; - padding: 10px 20px; - font-size: $type-size-5; - } - - &:before { - content: ""; - position: absolute; - top: -11px; - right: 10px; - width: 0; - border-style: solid; - border-width: 0 10px 10px; - display: block; - z-index: 0; - } - - &:after { - content: ""; - position: absolute; - top: -10px; - right: 10px; - width: 0; - border-style: solid; - border-width: 0 10px 10px; - display: block; - z-index: 1; - } - - li { - display: block; - border-bottom-width: 1px; - border-bottom-style: solid; - - &:last-child { - border-bottom: none; - } - } - } -} - /* Navigation list ========================================================================== */ -- 2.45.2