From f94307cdbf2d940cb6076e4a74aabde60f247ca1 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sun, 15 Oct 2023 01:22:04 -0500 Subject: [PATCH] Redesign navbar to be full width --- assets/css/bobastyle.css | 47 ++++++++++++++++++------------ layouts/_default/baseof.html | 56 +++++++++++++++++++----------------- layouts/partials/top.html | 42 ++++++++++++++------------- 3 files changed, 80 insertions(+), 65 deletions(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index e972a49..f1b46e1 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -173,13 +173,17 @@ html { body { background-color: var(--background-0); color: var(--text-0); + overflow-wrap: break-word; + margin: 0; +} + +.center-body { margin: 20px; max-width: 720px; - overflow-wrap: break-word; } @media (min-width: 760px) { - body { + .center-body { margin: 20px auto; } } @@ -308,12 +312,7 @@ h1 svg.icon { /* }}} */ -/* Heading formatting (website title and article section headers) {{{ */ - -.header { - margin: 16px 0; - font-size: 1.5em; -} +/* Heading formatting (article section titles) {{{ */ /* this is also used i.e. in page-title */ .heading-link { @@ -328,26 +327,36 @@ h1 svg.icon { /* }}} */ -/* Navbar formatting {{{ */ +/* Top bar formatting {{{ */ + +.top { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + background-color: var(--background-1); +} + +.header { + flex-grow: 1; + margin: 8px 16px; + font-size: 1.25em; + display: flex; + align-items: center; +} .navbar { display: flex; - flex-grow: 1; - overflow: auto; - background-color: var(--background-1); - border-radius: 8px; - margin-top: 5px; - padding: 4px; + flex-wrap: wrap; } .navbar-item { - padding: 8px 12px; - border-radius: 12px; + padding: 12px 16px; white-space: nowrap; } .navbar-item:hover { - background-color: var(--background-3); + background-color: var(--background-teal-2); text-decoration: none; } @@ -946,7 +955,7 @@ aside.quote { /* Print compatibility {{{ */ @media print { - .top, + .top > .navbar, .section-header-link, .post-meta-edit-history, .prevnext, diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3630c40..a1344f0 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,38 +8,42 @@ {{ partial "top.html" . }} - {{ if not .IsHome }} - {{ partial "breadcrumb.html" . }} - {{ end }} +
-
- {{ block "main" . }} - THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) + {{ if not .IsHome }} + {{ partial "breadcrumb.html" . }} {{ end }} -
- {{ if or .Site.Copyright .Site.Params.footer }} -
- {{ with .Site.Copyright }} -

{{ . | safeHTML }}

+
+ {{ block "main" . }} + THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) {{ end }} +
- {{ with .Site.Params.footer }} - {{ . | $.RenderString (dict "display" "block") }} - {{ end }} -
- {{ end }} + {{ if or .Site.Copyright .Site.Params.footer }} +
+ {{ with .Site.Copyright }} +

{{ . | safeHTML }}

+ {{ end }} - - {{ partial "icon.html" "chevron-up" }} - - + {{ with .Site.Params.footer }} + {{ . | $.RenderString (dict "display" "block") }} + {{ end }} +
+ {{ end }} + + + {{ partial "icon.html" "chevron-up" }} + + + +
diff --git a/layouts/partials/top.html b/layouts/partials/top.html index 53070f3..6f274f9 100644 --- a/layouts/partials/top.html +++ b/layouts/partials/top.html @@ -1,22 +1,24 @@ -
- - {{ .Site.Title | markdownify }} - -
+
+
+ + {{ .Site.Title | markdownify }} + +
- +