more little layout tweaks

This commit is contained in:
wires 2025-04-01 13:04:51 -04:00
parent 4858f463ad
commit 4ccf9395a6
Signed by: wires
SSH key fingerprint: SHA256:9GtP+M3O2IivPDlw1UY872UPUuJH2gI0yG6ExBxaaiM
5 changed files with 39 additions and 39 deletions

View file

@ -70,11 +70,12 @@ p {
#main-nav ul { #main-nav ul {
padding: 0; padding: 0;
margin: 0 0 1em; margin: 0;
display: flex;
list-style: none;
} }
#main-nav li { #main-nav li {
display: inline-block;
margin-inline-end: 0.5em; margin-inline-end: 0.5em;
} }
@ -82,7 +83,8 @@ p {
font-family: sans-serif; font-family: sans-serif;
font-weight: bold; font-weight: bold;
font-size: 150%; font-size: 150%;
margin-bottom: 0.25rem; line-height: 1.3;
margin: 0;
} }
footer { footer {
@ -91,6 +93,7 @@ footer {
header h1 { header h1 {
margin: 0; margin: 0;
font-size: 2em;
} }
header { header {
@ -108,11 +111,11 @@ hr {
background: var(--overlay); background: var(--overlay);
} }
pre code { .chroma {
background: black; background: black;
border: 1px solid var(--overlay); border: 1px solid var(--overlay);
border-radius: 8px; border-radius: 8px;
padding: 1em; padding: 1rem;
display: block; display: block;
overflow-x: auto; overflow-x: auto;
} }

View file

@ -1,29 +1,14 @@
<!doctype html> <!doctype html>
<html lang="{{ .Site.Language.LanguageCode }}"> <html lang="{{ .Site.Language.LanguageCode }}">
<head> <head>
{{ partial "head.html" . }} {{ partial "head.html" . }} {{ range .AlternativeOutputFormats -}} {{ printf
<!-- this is here to make sure that if we can't load CSS the icons don't totally fuck up layout --> `
<style>
.icon svg {
width: 1.25em;
height: 1.25em;
}
</style>
{{ range .AlternativeOutputFormats -}} {{ printf `
<link rel="%s" type="%s" href="%s" title="%s" /> <link rel="%s" type="%s" href="%s" title="%s" />
` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}}
</head> </head>
<body> <body>
<a href="#main" class="skip">Skip to content</a> <a href="#main" class="skip">Skip to content</a>
<nav id="main-nav"> {{ partial "header.html" .Site }}
<div id="site-title">{{.Site.Title}}</div>
<ul>
{{ with .Site.Menus.main }} {{ range . }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }} {{ end }}
</ul>
</nav>
<main id="main">{{ block "main" . }}{{ end }}</main> <main id="main">{{ block "main" . }}{{ end }}</main>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</body> </body>

View file

@ -1,16 +1,18 @@
{{ define "main" }} {{ define "main" }}
<header> <article>
<header>
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<time datetime="{{ .Lastmod }}">{{ .Lastmod.Format "January 2, 2006" }}</time> <time datetime="{{ .Lastmod }}"
</header> >{{ .Lastmod.Format "January 2, 2006" }}</time
{{ if .Params.toc }} >
<aside id="toc"> </header>
<a class="skip" href="#post">Skip table of contents</a> {{ if .Params.toc }}
<h2 id="toc-title">Contents</h2> <aside id="toc">
{{ .TableOfContents }} <a class="skip" href="#post">Skip table of contents</a>
</aside> <h2 id="toc-title">Contents</h2>
<a id="post"></a> {{ .TableOfContents }}
{{ end }} </aside>
{{ .Content }} <a id="post"></a>
{{ partial "tags.html" . }} {{ end }} {{ .Content }} {{ partial "tags.html" . }}
</article>
{{ end }} {{ end }}

View file

@ -1,10 +1,10 @@
<footer> <footer>
Made with <a href="https://gohugo.io">Hugo</a>. All content is openly licensed Made with <a href="https://gohugo.io">Hugo</a>. All content is licensed under
via
<a <a
href="http://creativecommons.org/licenses/by-sa/4.0/" href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank" target="_blank"
rel="license noopener noreferrer" rel="license noopener noreferrer"
>CC BY-SA 4.0</a
> >
CC BY-SA 4.0
</a>
</footer> </footer>

View file

@ -0,0 +1,10 @@
<header>
<p id="site-title">{{.Title}}</p>
<nav id="main-nav">
<ul>
{{ with .Menus.main }}{{ range . }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}{{ end }}
</ul>
</nav>
</header>