wires

summary refs log tree commit diff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-codeblock.html1
-rw-r--r--layouts/_default/baseof.html29
-rw-r--r--layouts/_default/list.html10
-rw-r--r--layouts/_default/single.html16
-rw-r--r--layouts/index.html14
-rw-r--r--layouts/partials/footer.html5
-rw-r--r--layouts/partials/head.html28
-rw-r--r--layouts/partials/header.html0
-rw-r--r--layouts/partials/tags.html5
9 files changed, 108 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html
new file mode 100644
index 0000000..9bfc3b1
--- /dev/null
+++ b/layouts/_default/_markup/render-codeblock.html
@@ -0,0 +1 @@
+<pre class="chroma"><code class="language-{{ .Type }}" data-lang="{{ .Type }}">{{ (transform.HighlightCodeBlock .).Inner }}</code></pre>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..ecac3b1
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.Language.LanguageCode }}">
+    <head>
+    {{ partial "head.html" . }}
+    <!-- this is here to make sure that if we can't load CSS the icons don't totally fuck up layout -->
+    <style>.icon svg { width: 1.25em; height: 1.25em; }</style>
+{{ range .AlternativeOutputFormats -}}
+{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+{{ end -}}
+</head>
+<body>
+<a href="#main" class="skip">Skip to content</a>
+<nav id="main-nav">
+<ul>
+<li><a href="{{.Site.BaseURL}}" id="site-title">{{.Site.Title}}</a></li>
+{{ with .Site.Menus.main }}
+        {{ range . }}
+        <li><a href="{{ .URL }}">{{ .Name }}</a></li>
+        {{ end }}
+{{ end }}
+</ul>
+</nav>
+
+<main id="main">
+{{ block "main" . }}{{ end }}
+</main>
+{{ partial "footer.html" . }}
+</body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..ea76a24
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+<h2>{{ .Title }}</h2>
+<ul>
+{{ range .Pages }}
+<li>
+<a href="{{ .Permalink }}">{{ .Title }}</a>
+</li>
+{{ end }}
+</ul>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..60d1b41
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,16 @@
+{{ define "main" }}
+<header>
+    <h1>{{ .Title }}</h1>
+    <time datetime="{{ .Lastmod }}">{{ .Lastmod.Format "January 2, 2006" }}</time>
+</header>
+    {{ if .Params.toc }}
+    <aside id="toc">
+        <a class="skip" href="#post">Skip table of contents</a>
+        <h2 id="toc-title">Contents</h2>
+        {{ .TableOfContents }}
+    </aside>
+    <a id="post"></a>
+    {{ end }}
+    {{ .Content }}
+    {{ partial "tags.html" . }}
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..fd3d675
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,14 @@
+{{ define "main" }}
+{{ .Content }}
+{{ with .Site.RegularPages }}
+<h2>Posts</h2>
+<ul>
+{{ range . }}
+<li>
+<a href="{{ .Permalink }}">{{ .Title }}</a>
+{{ partial "tags.html" . }}
+</li>
+{{ end }}
+</ul>
+{{ end }}
+{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..99d42f9
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,5 @@
+<footer>
+All content is openly licensed via <a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0</a>
+<br>
+Made with <a href="https://gohugo.io">Hugo</a>
+</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..ce38afc
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,28 @@
+<meta charset="utf-8"/>
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+{{ with (or .Description .Site.Params.description) }}
+<meta name="description" content="{{ . }}"/>
+{{ end }}
+{{ with .Keywords }}<meta name="keywords" content="{{ delimit . ", " }}"/>{{ end }}
+<link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"/>
+<link rel="canonical" href="{{ .Permalink }}"/>
+{{- with resources.Get "style.css" }}
+  {{- if eq hugo.Environment "development" }}
+    <link rel="stylesheet" href="{{ .RelPermalink }}">
+  {{- else }}
+    {{- with . | minify | fingerprint }}
+      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+    {{- end }}
+  {{- end }}
+{{- end }}
+{{- with resources.Get "syntax.css" }}
+  {{- if eq hugo.Environment "development" }}
+    <link rel="stylesheet" href="{{ .RelPermalink }}">
+  {{- else }}
+    {{- with . | minify | fingerprint }}
+      <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+    {{- end }}
+  {{- end }}
+{{- end }}
+<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
+
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/header.html
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
new file mode 100644
index 0000000..8062534
--- /dev/null
+++ b/layouts/partials/tags.html
@@ -0,0 +1,5 @@
+{{ with .GetTerms "tags" }}
+<br>
+tags:
+{{ range $i, $e := . }}{{- if $i -}}, {{ end -}}{{ with $e }}<a class="tag" href="{{.Permalink}}">{{lower .Title}}</a>{{end}}{{ end }}
+{{ end }}