From 18db9420e0828a20c951323a0e788e52e4ef701a Mon Sep 17 00:00:00 2001 From: Oli Evans Date: Tue, 21 Jul 2020 14:32:15 +0100 Subject: [PATCH] fix: hide checkbox inputs on mobile nav - Fix broken nav layout on small screens - Update baseof template with latest changes from book theme - Hide the in page contents menu on mobile. 2 hambergers is too many. Fixes #997 License: MIT Signed-off-by: Oli Evans --- assets/_custom.scss | 42 +++--------------------------------- layouts/_default/baseof.html | 10 ++++----- 2 files changed, 8 insertions(+), 44 deletions(-) diff --git a/assets/_custom.scss b/assets/_custom.scss index 0c1e0d953..dc26c203b 100644 --- a/assets/_custom.scss +++ b/assets/_custom.scss @@ -145,45 +145,9 @@ blockquote { } @media screen and (max-width: 56rem) { - .book-page { - margin-top: 50px; - } - .book-header { - display: block; - position: fixed; - width: 100%; - height: 50px; - padding-left: 12px; - padding-right: 12px; - line-height: 50px; - background-color: #090909; - z-index: 20; - border-bottom: 1px solid #232323; - margin-bottom: 0; - aside { - p { - font-size: 12px; - font-weight: 700; - } - i[class^=gg-] { - display: inline-block; - margin-left: 0; - margin-right: 0; - vertical-align: text-top; - font-size: 10px; - transform: scale(0.7); - } - } - } - .book-menu nav { - z-index: 21; - } - #toc-control:checked+aside { - line-height: 1.15; - background-color: #090909; - width: 100%; - height: auto; - position: absolute; + // hide in-page contents menu... 2 hamburgers is too much. + .book-header label[for="toc-control"] { + visibility: hidden; } } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c737c522a..4eeeacd8b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,16 +7,17 @@ - + +
-
- {{ template "header" . }} -
+
+ {{ template "header" . }} +
{{ partial "docs/inject/content-before" . }} {{ template "main" . }} @@ -52,7 +53,6 @@ {{ partial "docs/header" . }} {{ if default true (default .Site.Params.BookToC .Params.BookToC) }} -