Compare commits

..

No commits in common. "0ddf0bdf42c5c14c64bc7f0800d4615da3509eef" and "c0426f191a8c54f7af27ae042df069ca491b848a" have entirely different histories.

3 changed files with 64 additions and 92 deletions

View File

@ -173,17 +173,13 @@ html {
body { body {
background-color: var(--background-0); background-color: var(--background-0);
color: var(--text-0); color: var(--text-0);
overflow-wrap: break-word;
margin: 0;
}
.center-body {
margin: 20px; margin: 20px;
max-width: 720px; max-width: 720px;
overflow-wrap: break-word;
} }
@media (min-width: 760px) { @media (min-width: 760px) {
.center-body { body {
margin: 20px auto; margin: 20px auto;
} }
} }
@ -312,7 +308,12 @@ h1 svg.icon {
/* }}} */ /* }}} */
/* Heading formatting (article section titles) {{{ */ /* Heading formatting (website title and article section headers) {{{ */
.header {
margin: 16px 0;
font-size: 1.5em;
}
/* this is also used i.e. in page-title */ /* this is also used i.e. in page-title */
.heading-link { .heading-link {
@ -327,36 +328,26 @@ h1 svg.icon {
/* }}} */ /* }}} */
/* Top bar formatting {{{ */ /* Navbar 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 { .navbar {
display: flex; display: flex;
flex-wrap: wrap; flex-grow: 1;
overflow: auto;
background-color: var(--background-1);
border-radius: 8px;
margin-top: 5px;
padding: 4px;
} }
.navbar-item { .navbar-item {
padding: 12px 16px; padding: 8px 12px;
border-radius: 12px;
white-space: nowrap; white-space: nowrap;
} }
.navbar-item:hover { .navbar-item:hover {
background-color: var(--background-2); background-color: var(--background-3);
text-decoration: none; text-decoration: none;
} }
@ -955,7 +946,7 @@ aside.quote {
/* Print compatibility {{{ */ /* Print compatibility {{{ */
@media print { @media print {
.top > .navbar, .top,
.section-header-link, .section-header-link,
.post-meta-edit-history, .post-meta-edit-history,
.prevnext, .prevnext,
@ -970,20 +961,8 @@ aside.quote {
color-adjust: exact !important; color-adjust: exact !important;
} }
.top { body {
background-color: unset;
}
.top > .header {
margin-left: 0;
margin-right: 0;
}
.center-body {
max-width: 100%; max-width: 100%;
margin: 8px 0;
}
.breadcrumb {
margin: 8px 0;
} }
table, table,

View File

@ -8,42 +8,38 @@
{{ partial "top.html" . }} {{ partial "top.html" . }}
<div class="center-body"> {{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
{{ if not .IsHome }} <main>
{{ partial "breadcrumb.html" . }} {{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }} {{ end }}
</main>
<main> {{ if or .Site.Copyright .Site.Params.footer }}
{{ block "main" . }} <footer>
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) {{ with .Site.Copyright }}
<p>{{ . | safeHTML }}</p>
{{ end }} {{ end }}
</main>
{{ if or .Site.Copyright .Site.Params.footer }} {{ with .Site.Params.footer }}
<footer> {{ . | $.RenderString (dict "display" "block") }}
{{ with .Site.Copyright }} {{ end }}
<p>{{ . | safeHTML }}</p> </footer>
{{ end }} {{ end }}
{{ with .Site.Params.footer }} <a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
{{ . | $.RenderString (dict "display" "block") }} {{ partial "icon.html" "chevron-up" }}
{{ end }} </a>
</footer> <noscript>
{{ end }} <style>
#back-to-top {
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}"> display: block;
{{ partial "icon.html" "chevron-up" }} }
</a> </style>
<noscript> </noscript>
<style>
#back-to-top {
display: block;
}
</style>
</noscript>
</div>
</body> </body>
</html> </html>

View File

@ -1,24 +1,21 @@
<div class="top"> <header class="header">
<header class="header"> <a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}">
<a class="heading-link" href="{{ .Site.Home.Permalink | absLangURL }}"> {{ .Site.Title | markdownify }}
{{ .Site.Title | markdownify }} </a>
</a> </header>
</header>
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}"> <nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
{{ with .Site.Home }} {{ with .Site.Home }}
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a> <a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
{{ end }} {{ end }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ $isActive := false }} {{ $isActive := false }}
{{/* https://discourse.gohugo.io/t/ismenucurrent-not-working-with-using-sectionpagesmenu/46687/2?u=bbaovanc */}} {{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
{{ if or ($.HasMenuCurrent .Menu .) (eq .Page $) }} {{ $isActive = true }}
{{ $isActive = true }}
{{ end }}
<a class="navbar-item{{ if $isActive }} active{{ end }}"
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
href="{{ .URL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</nav> <a class="navbar-item{{ if $isActive }} active{{ end }}"
</div> {{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>