antidocs theme
This commit is contained in:
parent
53560c95d3
commit
eb4af4bb88
13 changed files with 641 additions and 0 deletions
4
antidocs/layouts/404.html
Normal file
4
antidocs/layouts/404.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ define "main" }}
|
||||
<h1>404</h1>
|
||||
Site brokey...
|
||||
{{ end }}
|
14
antidocs/layouts/_default/baseof.html
Normal file
14
antidocs/layouts/_default/baseof.html
Normal 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>
|
20
antidocs/layouts/_default/list.html
Normal file
20
antidocs/layouts/_default/list.html
Normal 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> {{ end }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
39
antidocs/layouts/_default/single.html
Normal file
39
antidocs/layouts/_default/single.html
Normal 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 }}
|
21
antidocs/layouts/index.html
Normal file
21
antidocs/layouts/index.html
Normal 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> {{ end }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
3
antidocs/layouts/partials/footer.html
Normal file
3
antidocs/layouts/partials/footer.html
Normal 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>
|
5
antidocs/layouts/partials/head.html
Normal file
5
antidocs/layouts/partials/head.html
Normal 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 }}">
|
4
antidocs/layouts/partials/header.html
Normal file
4
antidocs/layouts/partials/header.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<header>
|
||||
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||||
{{- partial "menu.html" . -}}
|
||||
</header>
|
7
antidocs/layouts/partials/menu.html
Normal file
7
antidocs/layouts/partials/menu.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue