first commit

This commit is contained in:
2026-04-10 06:19:16 +00:00
commit 97ec7bbbfd
13 changed files with 1197 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
{{ $themeStyleDefault := "light.css" -}}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
{{- if isset .Site.Params "onionlocation" }}
<meta http-equiv="onion-location" content="{{ urls.JoinPath .Site.Params.OnionLocation .RelPermalink }}">
{{- end }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<link rel="stylesheet" href="{{ "css/styles.css" | relURL }}">
<link id="theme_css" rel="stylesheet" href="{{ "css/themes" | relURL }}/{{ .Site.Params.ThemeStyle | default $themeStyleDefault }}">
{{- if .Site.Params.ThemeStyleSwitcher }}
<script src="{{ "js/theme-switcher.js" | relURL }}"></script>
{{- end }}
</head>
<body>
<input class="show-hide-menu-input" style="display:none;" autocomplete="off" type="checkbox" id="toggle-1">
<label class="overlay" for="toggle-1"></label>
<div class="main">
<header class="header">
<div class="header-content">
<div class="title">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<div>
<div class="header-right">
{{- if .Site.Params.ThemeStyleSwitcher }}
<div id="change-theme-button" style="display:none;" class="clickable-header-label" onclick="toggle_theme()">
<img class="color-adapting-image" width="30" src="" alt="change theme button">
</div>
{{- end }}
<label id="show-hide-menu-label" class="clickable-header-label" for="toggle-1">
<img class="color-adapting-image" width="30" src="{{ "images/hamburger.svg" | relURL }}" alt="menu button">
</label>
</div>
{{- if .Site.Menus.main }}
<div class="dont-show">
<p>
Links:
</p>
</div>
<ul class="links">
{{- range .Site.Menus.main.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{- end }}
</ul>
{{- end }}
</div>
</div>
</header>
<main class="body">
<div class="body-content">
{{- block "main" . }}{{ end }}
</div>
</main>
</div>
{{- if .Site.Params.FooterText }}
<hr class="dont-show">
<footer class="footer">
<p>{{ .Site.Params.FooterText | markdownify }}</p>
</footer>
{{- end }}
</body>
</html>

View File

@@ -0,0 +1,45 @@
{{ define "title" }}{{ .Title }} &ndash; {{ .Site.Title }}{{ end }}
{{ define "main" }}
{{ .Content }}
<div class="title-header">
<h1>{{ .Title }}</h1>
</div>
{{- if gt (len .Sections) 0 }}
<h2>Categories</h2>
<ul class="section-list">
{{- range .Sections }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end }}
</ul>
<h2>All Posts</h2>
{{- end }}
{{- $cs := .CurrentSection }}
{{- with $cs }}
{{- range (where .Site.RegularPages "Section" .Section) }}
{{- if .IsDescendant $cs }}
<article class="all-list">
<div class="title-list">
<h3><a href="{{ .RelPermalink }}">{{ if .Draft }}<i>(Draft)</i> {{ end }}{{ .Title }}</a></h3>
<div class="title-list-date">
{{- if eq .Date.IsZero false }}
<time>{{ .Date.Format "Monday, January 2, 2006" }}</time>
{{- end }}
{{- if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}
(updated)
{{- end }}
</div>
</div>
<div class="body-list">
<p></p> {{/* Spacing is weird if we don't include this */}}
<p>
{{ .Summary }}
</p>
{{- if .Truncated }}
<a href="{{ .RelPermalink }}">Read More…</a>
{{- end }}
</div>
</article>
{{- end }}
{{- end }}
{{- end }}
{{ end }}

View File

@@ -0,0 +1,33 @@
{{ define "title" }}{{ .Title }} &ndash; {{ .Site.Title }}{{ end }}
{{ define "main" }}
<header class="title-header">
<h1>{{ if .Draft }}<i>(Draft)</i> {{ end }}{{ .Title }}</h1>
<div class="title-header-date">
{{- if eq .Date.IsZero false }}
<time>{{ .Date.Format "Monday, January 2, 2006" }}</time>
{{- end }}
{{- if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}
&mdash; last updated <time>{{ .Lastmod.Format "January 2, 2006" }}</time>
{{- end }}
</div>
{{ if or (.Params.toc) (and (ne .Params.toc false) (isset .Site.Params "tocwordthreshold") (ge .Site.Params.TocWordThreshold 0) (gt .WordCount .Site.Params.TocWordThreshold)) }}
{{/* If the front matter parameter is true, show the toc */}}
{{/* Elif the front matter parameter is false, don't show the toc */}}
{{/* Elif the front matter parameter is not set, show the toc if the site parameter is set, non-negative, and less than the word count */}}
<p></p>
<div class="table-of-contents">
<details open="open">
<summary>
<span class="table-of-contents-title">Table of Contents</span>
</summary>
{{ $toc := .TableOfContents -}}
{{/* Workaround for an extra layer of indentation (https://discourse.gohugo.io/t/2303) */}}
{{- $toc := replaceRE `<nav(.*)>(\s*)<ul>\s*<li>\s*<ul>` `<nav${1}>${2}<ul>` $toc -}}
{{- $toc := replaceRE `</ul>\s*</li>\s*</ul>(\s*)</nav>` `</ul>${1}</nav>` $toc -}}
{{- safeHTML $toc }}
</details>
</div>
{{ end }}
</header>
{{ .Content | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" (printf "${1}<aside class=\"heading-anchor\"><a href=\"#${2}\" aria-label=\"Anchor\"><img src=\"%s\" class=\"color-adapting-image\" height=\"20\"></a></aside>${3}" ("images/chain-link.svg" | relURL)) | safeHTML }}
{{ end }}