antidocs theme

This commit is contained in:
Nox Sluijtman 2024-02-11 01:09:03 +01:00
parent 53560c95d3
commit eb4af4bb88
13 changed files with 641 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{{ define "main" }}
<h1>404</h1>
Site brokey...
{{ end }}

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
{{- partial "head.html" . -}}
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} | {{ $.Site.Title }}{{ end }}</title>
</head>
<body>
{{- partial "header.html" . -}}
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</body>
</html>

View file

@ -0,0 +1,20 @@
{{ define "main" }}
{{ if .Content }}
<article>
{{ .Content -}}
</article>
{{ else }}
<h1>{{ .Title }}</h1>
{{ end }}
<div class="posts">
<table>
{{ range .Paginator.Pages }}
<tr>
<td><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></td>
<td>{{ .Params.Author }}</td>
<td class="post-tags"> {{ range .Params.tags }} #<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>&nbsp; {{ end }}</td>
</tr>
{{ end }}
</table>
</div>
{{ end }}

View file

@ -0,0 +1,39 @@
{{ define "main" }}
<div class="article-head">
<h1>
{{ .Title | markdownify }}
-
{{ if .Params.Author }}
{{ .Params.Author | markdownify }}
{{ end }}
</h1>
<span class="post-reading-time">~ {{ .ReadingTime }} min ({{ .WordCount }} {{ (.Params.WordCounter | default .Site.Params.WordCounter) | default "words" }})</span>
{{ if .Params.documentSource }}
<code><a href="{{ .Params.documentSource }}">markdown source</a></code>
{{ end }}
</div>
{{ if (.Params.Toc | default .Site.Params.Toc) }}
<h2>
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
</h2>
{{ .TableOfContents }}
{{ end }}
<article class="post-content">
{{- with .Content -}}
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}" class="anchor" ariaLabel="Anchor">§</a> ${3}` | safeHTML }}
{{- end -}}
</article>
{{ if .Params.sources }}
<hr/>
<h3 class="post-reading-time">{{ ( .Params.SourcesName | default .Site.Params.SourcesName) | default "sources" }}:</h3>
<ol>
{{ range .Params.sources }}
<li class="post-tags"><a href="{{ . }}">{{ . }}</a></li>
{{ end }}
</ol>
{{ end }}
{{ end }}

View file

@ -0,0 +1,21 @@
{{ define "main" }}
<div class="article-head">
<h1>{{ .Title }}</h1>
</div>
{{ if .Content }}
<article>
{{ .Content -}}
</article>
{{ end }}
<div class="posts">
<table>
{{ range .Paginator.Pages }}
<tr>
<td><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></td>
<td>{{ .Params.Author }}</td>
<td class="post-tags"> {{ range .Params.tags }} #<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>&nbsp; {{ end }}</td>
</tr>
{{ end }}
</table>
</div>
{{ end }}

View file

@ -0,0 +1,3 @@
<footer>
Contents of this page are lisenced under <pre><a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></pre>
</footer>

View file

@ -0,0 +1,5 @@
<link rel='stylesheet' type='text/css' href='/style.css' />
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">

View file

@ -0,0 +1,4 @@
<header>
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
{{- partial "menu.html" . -}}
</header>

View file

@ -0,0 +1,7 @@
<menu>
{{range $name, $taxonomy := .Site.Taxonomies.tags}}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
<a href={{ .RelPermalink }} title="All pages with tag <i>{{$name}}</i>">#{{$name}}</a>
{{end}}
{{end}}
</menu>