Initial commit
This commit is contained in:
commit
07a9f6baba
13 changed files with 875 additions and 0 deletions
0
layouts/404.html
Normal file
0
layouts/404.html
Normal file
14
layouts/_default/baseof.html
Normal file
14
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>
|
25
layouts/_default/list.html
Normal file
25
layouts/_default/list.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
{{ if .Content }}
|
||||
<article>
|
||||
{{ .Content -}}
|
||||
</article>
|
||||
{{ else }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Tags</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
{{ range .Paginator.Pages }}
|
||||
<tr>
|
||||
<td><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></td>
|
||||
<td>{{ range .Params.tags }}<a class="tag" href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a> {{ end }}</td>
|
||||
<td><p>{{ .Params.description }}</p></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
20
layouts/_default/single.html
Normal file
20
layouts/_default/single.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<div class="main-head">
|
||||
<h1> {{ .Title | markdownify }} </h1>
|
||||
</div>
|
||||
{{ if .Params.image }}
|
||||
<details open="">
|
||||
<summary>Image</summary>
|
||||
<figure class="postImage">
|
||||
<img src="{{ .Params.image }}" alt="{{ .Params.imageDescription }}">
|
||||
<figcaption>{{ .Params.imageDescription }}</figcaption>
|
||||
</figure>
|
||||
</details>
|
||||
{{ 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>
|
||||
{{ end }}
|
26
layouts/index.html
Normal file
26
layouts/index.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{ define "main" }}
|
||||
<div class="main-head">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
{{ if .Content }}
|
||||
<article>
|
||||
{{ .Content -}}
|
||||
</article>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Tags</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
{{ range .Paginator.Pages }}
|
||||
<tr>
|
||||
<td><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></td>
|
||||
<td>{{ range .Params.tags }}<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">#{{ . }}</a> {{ end }}</td>
|
||||
<td><p>{{ .Params.description }}</p></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
3
layouts/partials/footer.html
Normal file
3
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<footer>
|
||||
The content of this page is lisences under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
|
||||
</footer>
|
5
layouts/partials/head.html
Normal file
5
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
layouts/partials/header.html
Normal file
4
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
layouts/partials/menu.html
Normal file
7
layouts/partials/menu.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<menu type="toolbar">
|
||||
{{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