diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 54 | ||||
-rw-r--r-- | layouts/_default/list.html | 11 | ||||
-rw-r--r-- | layouts/_default/single.html | 10 | ||||
-rw-r--r-- | layouts/_default/term.html | 19 | ||||
-rw-r--r-- | layouts/home.html | 21 | ||||
-rw-r--r-- | layouts/posts/list.html | 22 | ||||
-rw-r--r-- | layouts/posts/list.xml | 37 | ||||
-rw-r--r-- | layouts/posts/single.html | 36 | ||||
-rw-r--r-- | layouts/project-release/list.html | 14 | ||||
-rw-r--r-- | layouts/project-release/list.xml | 27 | ||||
-rw-r--r-- | layouts/project-release/single.html | 20 | ||||
-rw-r--r-- | layouts/projects/list.html | 21 | ||||
-rw-r--r-- | layouts/recipes/list.html | 24 | ||||
-rw-r--r-- | layouts/recipes/single.html | 103 | ||||
-rw-r--r-- | layouts/services/list.html | 13 | ||||
-rw-r--r-- | layouts/services/single.html | 14 | ||||
-rw-r--r-- | layouts/shortcodes/admonition.html | 8 | ||||
-rw-r--r-- | layouts/shortcodes/quote.html | 10 |
18 files changed, 464 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..f69ca6a --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,54 @@ +{{- $cssMain := resources.Get "theme/main.scss" | resources.ToCSS | fingerprint -}} +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="canonical" class="u-url" href="{{ .Permalink }}"> + <link rel="stylesheet" type="text/css" href="{{ $cssMain.Permalink }}"> + <link rel="me" href="https://fedi.tyil.nl/@tyil"> + <link rel="me" href="https://git.tyil.nl"> + <link rel="me" href="https://sr.ht/~tyil"> + <link rel="me" href="https://www.tyil.nl" class="h-card"> + <link rel="me" href="mailto:p.spek@tyil.nl"> + {{- range .AlternativeOutputFormats }} + <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" title="{{ $.Site.Title }}" href="{{ .Permalink }}"> + {{- end }} + <title>{{ .Page.Title }} - {{ .Site.Title }}</title> + {{- block "head" . }} + {{- end }} + </head> + <body> + {{- block "body" . }} + <header id="site-header"> + <div class="container"> + <nav class="main"> + <a href="/" class="brand-name">{{ .Site.Title }}</a> + {{- range sort .Site.Sections "Title" }} + <a href="{{ .Permalink }}">{{ .Title }}</a> + {{- end }} + </nav> + </div> + </header> + <main id="site-main"> + <div class="container"> + {{- block "main" . }}{{ end }} + </div> + </main> + <footer id="site-footer"> + <div class="container"> + <hr> + <p>© 2016 - {{ now.Year }} – Patrick "tyil" Spek</p> + <p> + All content is licensed as per the license shown below + that content. All other sources (html, css, ...) are + released under the terms of the <a + href="https://www.gnu.org/licenses/gpl-3.0.txt">GNU GPL, + version 3</a> or later. + </p> + </div> + </footer> + {{- end }} + </body> +</html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..6ba66fc --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{- define "main" }} +<h1>{{ .Title }}</h1> +{{ .Content }} +<ul> + {{- range .Paginator.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..79dc350 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} +<article> + <header> + <h1>{{ .Title }}</h1> + </header> + <main> + {{ .Content }} + </main> +</article> +{{ end }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html new file mode 100644 index 0000000..ee63c70 --- /dev/null +++ b/layouts/_default/term.html @@ -0,0 +1,19 @@ +{{ define "main" }} +<h1>Posts tagged with #{{ .Title }}</h1> +{{ .Content }} +<ul> + {{ range .Paginator.Pages }} + <li> + <a href="{{ .Permalink }}"> + {{ .Title }} + </a> + <small> + {{ .Date | dateFormat "2006-01-02" }} + {{- range .Params.tags }} + <a href="/tags/{{ . | lower }}">#{{ . }}</a> + {{- end }} + </small> + </li> + {{ end }} +</ul> +{{ end }} diff --git a/layouts/home.html b/layouts/home.html new file mode 100644 index 0000000..b1e0212 --- /dev/null +++ b/layouts/home.html @@ -0,0 +1,21 @@ +{{ define "main" }} +<article> + <header> + <h1> + {{ .Page.Title }} + </h1> + <small> + </small> + </header> + <main> + {{ .Content }} + </main> + <footer> + <p class="text-center"> + <a class="image-link" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> + <img alt="Creative Commons License" src="/img/cc-by-sa.png" /> + </a> + </p> + </footer> +</article> +{{ end }} diff --git a/layouts/posts/list.html b/layouts/posts/list.html new file mode 100644 index 0000000..b5ec8ca --- /dev/null +++ b/layouts/posts/list.html @@ -0,0 +1,22 @@ +{{- define "main" }} +<h1>{{ .Title }}</h1> +{{ .Content }} +{{- range .Sections }} + <h2>{{ .Title }}</h2> + <ul> + {{- range .Pages }} + <li> + <a class="u-url" href="{{ .Permalink }}"><span class="p-name">{{ .Title }}</span></a> + <small> + <time class="dt-published" datetime="{{ .Date | dateFormat "2006-01-02" }}"> + {{ .Date | dateFormat "2006-01-02" }} + </time> + {{- range .Params.tags }} + <a class="p-category tag" href="/tags/{{ . | lower }}">{{ . }}</a> + {{- end }} + </small> + </li> + {{- end }} + </ul> +{{- end }} +{{- end }} diff --git a/layouts/posts/list.xml b/layouts/posts/list.xml new file mode 100644 index 0000000..deb2448 --- /dev/null +++ b/layouts/posts/list.xml @@ -0,0 +1,37 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- range .Sections.Reverse -}} +{{- $pages = (append $pages (where .RegularPages "Draft" false)) }} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss> diff --git a/layouts/posts/single.html b/layouts/posts/single.html new file mode 100644 index 0000000..eca87b9 --- /dev/null +++ b/layouts/posts/single.html @@ -0,0 +1,36 @@ +{{ define "main" }} +<article class="h-entry"> + <header> + <h1 class="p-name">{{ .Title }}</h1> + <p> + {{- range .Params.tags }} + <a class="p-category tag" href="/tags/{{ . | lower }}">{{ . }}</a> + {{- end }} + — Published on <time class="dt-published" datetime="{{ .Date | dateFormat "2006-01-02" }}">{{ .Date | dateFormat "2006-01-02" }}</time>. + </p> + {{- if .Draft }} + <section class="admonition"> + <div class="admonition-title"> + draft + </div> + <div class="admonition-content"> + This blog post is still a + <strong>draft</strong>. It has most likely been + shared with you for reviewing purposes. Please + do not yet share this with other people. + </div> + </section> + {{- end }} + </header> + <main class="e-content"> + {{ .Content }} + </main> + <footer> + <p class="text-center"> + <a class="image-link" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> + <img alt="Creative Commons License" src="/img/cc-by-sa.png"> + </a> + </p> + </footer> +</article> +{{ end }} diff --git a/layouts/project-release/list.html b/layouts/project-release/list.html new file mode 100644 index 0000000..b52dd0e --- /dev/null +++ b/layouts/project-release/list.html @@ -0,0 +1,14 @@ +{{- define "main" }} +<h1>{{ .Parent.Title }} Releases</h1> +{{ .Content }} +<ul> + {{- range .Pages }} + <li> + <a href="{{ .Permalink }}">{{ .Title }}</a> + ({{ .Date | dateFormat "2006-01-02" }}) + </li> + {{- end }} +</ul> +<p>Follow the <a href="{{ .Permalink }}index.xml">RSS feed</a> to stay up to date with +the latest {{ .Parent.Title }} releases.</p> +{{- end }} diff --git a/layouts/project-release/list.xml b/layouts/project-release/list.xml new file mode 100644 index 0000000..74cdda2 --- /dev/null +++ b/layouts/project-release/list.xml @@ -0,0 +1,27 @@ +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <description>{{ .Title }} Releases</description> + <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range .Pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss> diff --git a/layouts/project-release/single.html b/layouts/project-release/single.html new file mode 100644 index 0000000..e422699 --- /dev/null +++ b/layouts/project-release/single.html @@ -0,0 +1,20 @@ +{{ define "main" }} +<article> + <header> + <h1>{{ .Title }}</h1> + </header> + <main> + {{ .Content }} + </main> + <footer> + {{- with .Params.packages }} + Pre-built packages: + <ul> + {{- range $key, $value := . }} + <li><a href="{{ $value }}">{{ $key }}</a></li> + {{- end }} + </ul> + {{- end }} + </footer> +</article> +{{ end }} diff --git a/layouts/projects/list.html b/layouts/projects/list.html new file mode 100644 index 0000000..de50a9c --- /dev/null +++ b/layouts/projects/list.html @@ -0,0 +1,21 @@ +{{- define "main" }} +<h1>{{ .Title }}</h1> +{{ .Content }} +{{- range .Sections }} + <section class="project"> + <h2> + {{ .Title }} + <small> + {{- range .Params.languages }} + {{ . }} + {{- end }} + </small> + </h2> + {{ .Content }} + <nav class="project"> + <a href="{{ .Permalink }}releases">Releases</a> + <a href="{{ .Params.repository }}">Sources</a> + </nav> + </section> +{{- end }} +{{- end }} diff --git a/layouts/recipes/list.html b/layouts/recipes/list.html new file mode 100644 index 0000000..b758a2b --- /dev/null +++ b/layouts/recipes/list.html @@ -0,0 +1,24 @@ +{{- define "main" }} +<h1>{{ .Title }}</h1> +{{ .Content }} +{{- range sort .Pages "Title" }} +<section class="recipe"> + <div class="preview"> + {{- with .Params.preview }} + <img src="{{ .src }}" /> + {{- end }} + </div> + <div class="description"> + <h2> + <a class="p-name" href="{{ .Permalink }}">{{ .Title }}</a> + </h2> + <ul class="taglist"> + {{- range sort .Params.tags }} + <li><a class="p-category tag" href="/tags/{{ . | lower }}">{{ . }}</a></li> + {{- end }} + </ul> + {{ .Content }} + </div> +</section> +{{- end }} +{{- end }} diff --git a/layouts/recipes/single.html b/layouts/recipes/single.html new file mode 100644 index 0000000..353abd2 --- /dev/null +++ b/layouts/recipes/single.html @@ -0,0 +1,103 @@ +{{ define "main" }} +<article> + <header> + <h1 class="p-name">{{ .Title }}</h1> + <ul class="taglist"> + {{- range sort .Params.tags }} + <li><a class="p-category tag" href="/tags/{{ . | lower }}">{{ . }}</a></li> + {{- end }} + </ul> + {{- if .Draft }} + <section class="admonition"> + <div class="admonition-title"> + draft + </div> + <div class="admonition-content"> + This recipe is still a <strong>draft</strong>. + It has most likely been shared with you for + reviewing purposes, but neither the + instructions nor the ingredients have been + properly checked yet. Do not make this recipe + unless you are an experienced cook, and please + do not yet share it with other people. + </div> + </section> + {{- end }} + </header> + <main class="e-content"> + {{ .Content }} + <table> + <tbody> + <tr> + <td>Preparation time</td> + <td>{{ .Params.preptime }} minutes</td> + </tr> + <tr> + <td>Cooking time</td> + <td>{{ .Params.cooktime }} minutes</td> + </tr> + <tr> + <td>Serves</td> + <td data-serves="{{ .Params.serves }}">{{ .Params.serves }}</td> + </tr> + </tbody> + </table> + <h2>Ingredients</h2> + <table> + <thead> + <tr> + <th> </th> + <th>Ingredient</th> + <th>Amount</th> + <th>Unit</th> + </tr> + </thead> + <tbody> + {{- range $i, $ingredient := .Params.ingredients }} + <tr> + <td> + <input id="ingredient{{ $i }}" type="checkbox"> + </td> + <td> + <label for="ingredient{{ $i }}">{{ .label }}</label> + {{- if .links }} + {{- range .links }} + <a class="external-link-icon" href="{{ . }}">↗</span></a> + {{- end }} + {{- end }} + </td> + {{- if .unit }} + <td data-unit="{{ $ingredient.unit }}" data-amount="{{ $ingredient.amount }}">{{ .amount }}</td> + <td data-unit="{{ $ingredient.unit }}">{{ $ingredient.unit }}</td> + {{- else }} + <td colspan="2">{{ $ingredient.amount }}</td> + {{- end }} + </tr> + {{- end }} + </tbody> + </table> + <h2>Instructions</h2> + {{- range $i, $stage := .Params.stages }} + <h3>{{ $stage.label }}</h3> + {{- if $stage.notes }} + <p>{{ .notes }}</p> + {{- end }} + <ol> + {{- range $j, $step := $stage.steps }} + <li> + <input id="stage{{ $i }}-step{{ $j }}" type="checkbox"> + <label for="stage{{ $i }}-step{{ $j }}">{{ $step | $.Page.RenderString }}</label> + </li> + {{- end }} + </ol> + {{- end }} + </main> + <footer> + <p class="text-center"> + <a class="image-link" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> + <img alt="Creative Commons License" src="/img/cc-by-sa.png"> + </a> + </p> + </footer> +</article> +{{ end }} diff --git a/layouts/services/list.html b/layouts/services/list.html new file mode 100644 index 0000000..8e78be0 --- /dev/null +++ b/layouts/services/list.html @@ -0,0 +1,13 @@ +{{ define "main" }} +<h1>{{ .Title }}</h1> +{{ .Content }} +{{ range .Pages }} +<section class="service"> + <h2> + {{ .Title }} + <small><a href="{{ .Params.location }}">{{ .Params.location }}</a></small> + </h2> + {{ .Content }} +</section> +{{ end }} +{{ end }} diff --git a/layouts/services/single.html b/layouts/services/single.html new file mode 100644 index 0000000..e1afa52 --- /dev/null +++ b/layouts/services/single.html @@ -0,0 +1,14 @@ +{{ define "main" }} +<article> + <header> + <h1>{{ .Title }}</h1> + </header> + <main> + <ul> + <li><strong>Base URL</strong>: <a href="{{ .Params.location }}">{{ .Params.location }}</a></li> + <li><strong>Upstream</strong>: <a href="{{ .Params.upstream }}">{{ .Params.upstream }}</a></li> + </ul> + {{ .Content }} + </main> +</article> +{{ end }} diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html new file mode 100644 index 0000000..f25b9ff --- /dev/null +++ b/layouts/shortcodes/admonition.html @@ -0,0 +1,8 @@ +<section class="admonition"> + <div class="admonition-title"> + {{ .Get "title" }} + </div> + <div class="admonition-content"> + {{ .Inner | .Page.RenderString }} + </div> +</section> diff --git a/layouts/shortcodes/quote.html b/layouts/shortcodes/quote.html new file mode 100644 index 0000000..f2d9c4c --- /dev/null +++ b/layouts/shortcodes/quote.html @@ -0,0 +1,10 @@ +<div class="quoteblock"> + <blockquote> + <div class="paragraph"> + {{ .Inner | .Page.RenderString }} + </div> + </blockquote> + <div class="attribution"> + — {{ .Get "attribution" }} + </div> +</div> |