diff options
author | frosty <passedgoadngot200@disroot.org> | 2025-09-16 18:18:10 -0400 |
---|---|---|
committer | frosty <passedgoadngot200@disroot.org> | 2025-09-16 18:18:10 -0400 |
commit | 01a2f10cfa100996e18e52f245f0be2baf545a00 (patch) | |
tree | 3bbadf32a6511cb1d26e98f3496e1331f065b91c /layouts | |
download | www-01a2f10cfa100996e18e52f245f0be2baf545a00.tar.gz www-01a2f10cfa100996e18e52f245f0be2baf545a00.zip |
initial commit
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/_markup/render-heading.html | 6 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 19 | ||||
-rw-r--r-- | layouts/_default/home.html | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 | ||||
-rw-r--r-- | layouts/partials/all-posts.html | 7 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/header.html | 11 |
7 files changed, 54 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..7035d68 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,6 @@ +<h{{ .Level }} {{ if le .Level 3 }} id="{{ .Anchor | safeURL }}" {{ end }}> +{{ if le .Level 3 }} + <a href="#{{ .Anchor | safeURL }}">#</a> +{{ end }} +{{ .Text | safeHTML }} +</h{{ .Level }}> diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..d9b2212 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html lang="{{ .Site.Language }}"> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{{ if not .IsHome }}{{ .Title | title }} - {{ end }}{{ .Site.Title }}</title> + <link rel="stylesheet" type="text/css" href="/style.css"> + <link rel="icon" href="/favicon.ico"> +</head> +<body> + {{ partial "header.html" . }} + <main> + {{ block "main" . }} + {{ .Content }} + {{ end }} + {{ partial "footer.html" . }} + </main> +</body> +</html> diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..94674b6 --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ partial "all-posts.html" . }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..4cfd224 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,4 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ .Content }} +{{ end }} diff --git a/layouts/partials/all-posts.html b/layouts/partials/all-posts.html new file mode 100644 index 0000000..77d8a18 --- /dev/null +++ b/layouts/partials/all-posts.html @@ -0,0 +1,7 @@ +{{ range $index, $page := where .Site.RegularPages "Section" "blog" }} + <div class="blog-item"> + {{ $page.Date.Format "January 2, 2006" }} + <br> + <a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a> + </div> +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..83b6ab0 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,4 @@ +<hr> +<p>Thank you for taking interest in my website. The writing is under <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a> and <a href="https://git.mending.trade/www">the code</a> is under the <a href="https://unlicense.org/">Unlicense</a>. Be kind.</p> +<a href="https://www.gentoo.org/"><img src="/gentoo-button.png"/></a> +<a href="https://www.vim.org/"><img src="/vim-button.png"/></a> diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..dbc52c5 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,11 @@ +<header> + <img src="/avatar.png" width="64" height="64"/> + <div class="links"> + <span class="title"><a href="/">{{ .Site.Title }}</a></span> + <nav> + {{ range site.Menus.main }} + <a href="{{ .URL }}">{{ .Name }}</a> + {{ end }} + </nav> + </div> +</header> |