Initial version

This commit is contained in:
Stefan Bethke 2024-06-13 22:14:05 +02:00
commit ed5653a7fc
211 changed files with 11043 additions and 0 deletions

View file

View file

@ -0,0 +1,6 @@
{{ .Page.Store.Set "math" true -}}
<p{{ with .Attributes.class }} class="{{ . }}"{{ end }}>
$$
{{ .Inner }}
$$
</p>

View file

@ -0,0 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="icon-inline"{{ range $k, $v := .Attributes }}{{ printf " %s=%q" $k $v | safeHTMLAttr }}{{ end }}>
{{- .Text | safeHTML -}}
<a class="icon-link" href="#{{ .Anchor | safeURL }}" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" />
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" />
</svg></a></h{{ .Level }}>

View file

@ -0,0 +1,81 @@
{{/* Control how the image is rendered with these variables. */}}
{{ $class := "" -}}
{{ $size := "" -}}
{{ $srcset := "" -}}
{{ $width := "" -}}
{{/* Only change the below code if you know what you are doing. */}}
{{ $height := "" -}}
{{ $maxwidth := site.Params.imageMaxWidth -}}
{{ $realwidth := 0 -}}
{{ $realheight := 0 -}}
{{ $resource := false -}}
{{ $src := .Destination -}}
{{ $srcsetw := (slice) -}}
{{ $static := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ with (imageConfig (path.Join "/static" $src)) -}}
{{ $realwidth = .Width -}}
{{ $realheight = .Height -}}
{{ end -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ if $size -}}
{{ $image := $resource.Resize $size -}}
{{ $src = $image.RelPermalink -}}
{{ $width = $image.Width -}}
{{ $height = $image.Height -}}
{{ if $srcset -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) -}}
{{ end -}}
{{ else -}}
{{ $src = $resource.RelPermalink -}}
{{ $realwidth = $resource.Width -}}
{{ $realheight = $resource.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ range $set := split $srcset " " -}}
{{ $image := $resource.Resize (printf "%sx" $set) -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) -}}
{{ end -}}
{{ $width = "" -}}
{{ $height = "" -}}
{{ end -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ $height = $realheight -}}
{{ if and ($realwidth) (lt ($width) ($realwidth)) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ else if $height -}}
{{ $width = $realwidth -}}
{{ $height = int $height -}}
{{ if and ($realheight) (lt ($height) ($realheight)) -}}
{{ $width = (mul ($realwidth) (div (add ($height) 0.0) ($realheight))) -}}
{{ $width = (math.Round $width) -}}
{{ end -}}
{{ else if and ($maxwidth) (lt ($maxwidth) ($realwidth)) -}}
{{ $width = ($maxwidth) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
<img class="image{{ with $class }} {{ . }}{{ end }}" src="{{ $src }}" alt="{{ .Text }}"{{ with $srcsetw }} srcset="{{ delimit . ", " }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}"{{ end }}>

View file

@ -0,0 +1 @@
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html class="nojs" lang="{{ site.LanguageCode | default site.Language.Lang }}" dir="{{ site.Language.LanguageDirection | default "ltr" }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ block "title" . }}{{ .Title }} {{ site.Title }}{{ end }}</title>
{{ partial "meta.html" . }}
{{ partialCached "styles.html" . }}
{{ partial "meta_json_ld.html" . }}
{{ partial "scripts.html" . }}
{{ partial "math.html" . }}
{{ partialCached "tracking.html" . }}
{{ if templates.Exists "partials/head.html" -}}
{{ partial "head.html" . }}
{{ end -}}
{{ block "head" . }}{{ end }}
</head>
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
<header class="header layout__header">
{{ if $.Param "logo" | default true -}}
<a href="{{ site.Home.RelPermalink }}" title="Home" rel="home" class="header__logo">
<img src="{{ with $.Param "logopath" }}{{ . | relURL }}{{ else }}{{ "images/logo.png" | relURL }}{{ end }}"{{ with $.Param "logowidth" }} width="{{ . }}"{{ end }}{{ with $.Param "logoheight" }} height="{{ . }}"{{ end }} alt="Home" class="header__logo-image">
</a>
{{ end -}}
<h1 class="header__site-name{{ if not ($.Param "sitename" | default true) }} visually-hidden{{ end }}">
<a href="{{ site.Home.RelPermalink }}" title="Home" class="header__site-link" rel="home"><span>{{ site.Title }}</span></a>
</h1>
<div class="region header__region">
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end -}}
{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
</div>
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
</header>
{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
{{ block "main" . }}{{ end }}
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
<footer class="footer layout__footer mt--l">
{{ if templates.Exists "partials/footer.html" -}}
{{ partial "footer.html" . }}
{{ else -}}
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
{{ end -}}
</footer>
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
</div>
</body>
</html>

View file

@ -0,0 +1,6 @@
<article class="card{{ with .Section }} card--{{ . | urlize }}{{ end }}">
<header>
<h2 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
</header>
<p>{{ .Summary }}</p>
</article>

View file

@ -0,0 +1,8 @@
<article class="full-view{{ with .Section }} full-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
</header>
{{ .Content }}
</article>

View file

@ -0,0 +1 @@
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> <time class="created-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</time></li>

View file

@ -0,0 +1,16 @@
{{ define "main" -}}
<main class="main layout__main">
<header>
<h1 class="title">{{ .Title }}</h1>
</header>
{{ .Content }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}
{{ .Render "summary" }}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end -}}

View file

@ -0,0 +1,54 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $limit := site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{ $length := (len $pages) -}}
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ site.Title }}{{ end }}",
"description": "{{ i18n "string_recent_content" }} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ site.Title }}",
"home_page_url": "{{ site.BaseURL }}",
{{ with .OutputFormats.Get "JSON" -}}
"feed_url": "{{ .Permalink }}",
{{ end -}}
{{ with site.LanguageCode -}}
"language": "{{ . }}",
{{ end -}}
{{ with $.Param "icon" -}}
"icon": "{{ . | absURL }}",
{{ end -}}
{{ with $.Param "favicon" -}}
"favicon": "{{ . | absURL }}",
{{ end -}}
{{ with site.Params.author.name -}}
"authors": [
{
"name": "{{ . }}"{{ with site.Params.author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Params.author.avatar }},
"avatar": "{{ . | absURL }}"{{ end }}
}
],
{{ end -}}
"items": [
{{ range $index, $element := $pages -}}
{
"title": {{ .Title | jsonify }},
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
"date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
"id": "{{ .Permalink }}",
"url": "{{ .Permalink }}",
{{ with .Params.author -}}
"authors": [
{
"name": "{{ . }}"
}
],
{{ end -}}
"content_html": {{ .Content | jsonify }}
}{{ if ne (add $index 1) $length }},{{ end }}
{{ end -}}
]
}

View file

@ -0,0 +1,46 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := $pctx.RegularPages -}}
{{- $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 }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>{{ i18n "string_recent_content" }} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>
{{ with site.LanguageCode -}}
<language>{{ . }}</language>
{{ end -}}
{{ with site.Params.author.email -}}
<managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
{{ end -}}
{{ with site.Params.author.email -}}
<webMaster>{{ . }}{{ with site.Params.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.Params.author.email -}}
<author>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</author>
{{ end -}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end -}}
</channel>
</rss>

View file

@ -0,0 +1,17 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}">{{ .Title }}</h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
{{ .Content }}
{{ if $.Param "relatedposts" | default false }}{{ partial "related.html" . }}{{ end -}}
{{ if ne .Lastmod .Date }}{{ partial "dates.html" . }}{{ end -}}
</article>
</main>
{{ end -}}

View file

@ -0,0 +1,7 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
<h2 class="title mt--s{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
</header>
<p>{{ .Summary }}</p>
</article>

View file

@ -0,0 +1,5 @@
{{- $.Scratch.Add "searchindex" slice -}}
{{- range $index, $element := where site.RegularPages "Params.exclude_search" nil -}}
{{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "permalink" $element.RelPermalink "tags" (delimit ($element.Params.tags | default "") " ") "content" $element.Plain "summary" $element.Summary "date" ($element.Date.Format ($.Param "dateformat" | default "2 January, 2006"))) -}}
{{- end -}}
{{- $.Scratch.Get "searchindex" | jsonify -}}

View file

@ -0,0 +1,15 @@
{{ define "title" }}{{ site.Title }}{{ end }}
{{ define "main" -}}
<main class="main layout__main">
{{ .Content }}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{ $paginator := .Paginate $pages -}}
{{ range $paginator.Pages -}}
{{ .Render "summary" }}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end -}}

View file

@ -0,0 +1,15 @@
{{ define "main" -}}
<main class="main layout__main">
<h1 class="title">Micro posts</h1>
<p class="micro__follow"><a href="https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}">{{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }}</a></p>
{{ .Content }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}
{{ .Render "summary" }}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end -}}

View file

@ -0,0 +1,35 @@
{{ $list := .Pages -}}
{{ $length := (len $list) -}}
{
"version" : "https://jsonfeed.org/version/1",
"title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}",
"description": "Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}",
"home_page_url" : "{{ site.BaseURL }}",
{{ with .OutputFormats.Get "JSON" -}}
"feed_url" : "{{ .Permalink }}",
{{ end -}}
{{ with $.Param "icon" -}}
"icon" : "{{ . | absURL }}",
{{ end -}}
{{ with $.Param "favicon" -}}
"favicon" : "{{ . | absURL }}",
{{ end -}}
{{ with site.Author.name -}}
"author" : {
"name" : "{{ . }}"{{ with site.Author.url }},
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }},
"avatar": "{{ . | absURL }}"{{ end }}
},
{{ end -}}
"items" : [
{{ range $index, $element := $list -}}
{
"date_published" : "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
"date_modified" : "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
"id" : "{{ .Permalink }}",
"url" : "{{ .Permalink }}",
"content_html" : {{ .Content | jsonify }}
}{{ if ne (add $index 1) $length }},{{ end }}
{{ end -}}
]
}

View file

@ -0,0 +1,34 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Micro posts {{ i18n "string_on" }} {{ site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}</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>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end -}}
</channel>
</rss>

View file

@ -0,0 +1,12 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="hidden">{{ .Title }}</h1>
<p>{{ partial "author-date" . }}</p>
</header>
{{ .Content }}
</article>
</main>
{{ end -}}

View file

@ -0,0 +1,8 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
<h2 class="hidden">{{ .Title }}</h2>
<p><a href="{{ .RelPermalink }}">{{ partial "author-date" . }}</a></p>
</header>
{{ .Content }}
</article>

View file

@ -0,0 +1,3 @@
{{ with $.Param "author" | default site.Author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date (or ($.Param "author") site.Author.name) }} - {{ end -}}
{{ with .Date }}<time class="created-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format ($.Param "dateformat" | default "2 January, 2006") }}</time>{{ end }}

View file

@ -0,0 +1,10 @@
<div class="cookieconsent layout__cookieconsent hidden">
<div class="cookieconsent__message">
{{ i18n "cookieconsent_message" }}
{{ with site.Params.privacyPolicyUrl }}<a href="{{ . }}">{{ i18n "privacy_policy" }}</a>{{ end }}
</div>
<div class="cookieconsent__actions">
<button class="button button--small button--cookieconsent button--decline" type="button" data-consent="false">{{ i18n "cookieconsent_decline" }}</button>
<button class="button button--small button--cookieconsent button--accept" type="button" data-consent="true">{{ i18n "cookieconsent_accept" }}</button>
</div>
</div>

View file

@ -0,0 +1,4 @@
<div class="content-dates meta">
{{ i18n "last_mod" }} {{ .Lastmod.Format ($.Param "dateformat" | default "2 January, 2006") }}<br>
{{ i18n "created" }} {{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}
</div>

View file

@ -0,0 +1,8 @@
{{ $list := .AlternativeOutputFormats -}}
{{ $length := (len $list) -}}
{{ if $list -}}
<p>{{ i18n "string_follow" | title }}{{ with .Section }} {{ . }}{{ end }}: {{ range $index, $element := $list -}}
<a rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">{{ .Name }}</a>{{ if ne (add $index 1) $length }} | {{ end }}
{{- end -}}
</p>
{{ end -}}

View file

@ -0,0 +1,19 @@
<nav class="language-selector layout__language-selector" aria-label="{{ i18n "lang_select_title" }}">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" class="language-icon" width="24" height="24" viewBox="0 0 961 1113">
<path d="M848 3a17654 17654 0 00-349 118l-39 13-6 2-171-60-173-62c-2 0-2 6-2 118v119l-50 16-53 19c-5 3-5-19-5 343 0 335 0 336 2 339l6 5a92499 92499 0 00459-150l12-4 10 3 467 148 4 2V302l-45-15-45-14-1-132c0-124-1-132-2-134-4-7-9-8-19-5zm-4 145l-1 117-178-57-178-57L843 30l1 118zM458 481l-1 319-216 72-216 72V305l215-72 217-72 1 320zm262-131c17 4 30 9 30 9 1 0 20 67 42 149l57 203 15 56-64-19a2060 2060 0 01-24-84 2094 2094 0 00-130-40l-15 33-14 34-64-18 22-55 55-136 46-112c10-24 13-30 14-30l31 10z"/>
<path d="M257 360l-35 9c-23 7-25 7-34 7a72 72 0 01-20-3c-1 1 2 11 5 18 4 8 13 17 23 21 6 3 7 3 18 3 19 0 37-6 52-17 12-8 16-18 15-29-2-11-8-13-24-9zM335 413l-35 16c-13 7-23 12-28 13l-38 12a1636 1636 0 01-106 32c-19 3-17 2-17 9l2 8c2 4 9 10 14 12 12 6 42 3 51-6 2-2 3-3 3-7v-6l31-10 40-11a515 515 0 0148-13l-48 96c-10 19-23 40-45 71l-52 71-55 64-7 8h4c7 0 17-2 20-4a929 929 0 00149-179l23 17c26 20 30 23 51 35 25 14 39 21 56 27 8 2 12 3 13 1 1-4-6-30-9-33l-26-12-47-20-40-17-16-7 10-17c22-35 34-56 53-95l20-40 1-10v-11h-3l-17 6zM716 451l-23 56-23 55 86 26a4814 4814 0 00-40-137zM680 972a460 460 0 0026 44 422 422 0 01-319 66 517 517 0 01-175-66c-7-3-14-2-17 4-2 3-2 9 0 12s24 16 46 27a536 536 0 00222 53c36 1 39 0 68-4a480 480 0 00181-65l8-5 12 21 13 19 7-19 17-48 10-32-99-7z"/>
</svg>
<ul class="navbar">
{{ if .IsTranslated -}}
{{ range .Translations -}}
<li><a rel="alternate" href="{{ .RelPermalink }}" hreflang="{{ .Site.LanguageCode | default .Lang }}" lang="{{ .Site.LanguageCode | default .Lang }}">{{ .Language.LanguageName }}</a></li>
{{ end -}}
{{ else -}}
{{ range site.Languages -}}
{{ if ne site.Language.Lang .Lang -}}
<li><a rel="alternate" href="{{ .Lang | relURL }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .LanguageName }}</a></li>
{{ end -}}
{{ end -}}
{{ end -}}
</ul>
</nav>

View file

@ -0,0 +1,11 @@
{{ $opts := dict "minify" true -}}
{{ if eq hugo.Environment "development" -}}
{{ $opts = merge $opts (dict "minify" false) -}}
{{ end -}}
{{ if or ($.Param "math") (.Page.Store.Get "math") (.HasShortcode "math") -}}
<link rel="stylesheet" href="{{ "katex/katex.min.css" | relURL }}">
<script defer src="{{ "katex/katex.min.js" | relURL }}"></script>
<script defer src="{{ "katex/contrib/auto-render.min.js" | relURL }}"></script>
{{ $math := resources.Get "js/math.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $math.RelPermalink }}"></script>
{{ end -}}

View file

@ -0,0 +1,25 @@
<nav class="main-menu{{ if not ($.Param "menuinheader") }} layout__navigation{{ end }}" aria-label="{{ i18n "menu_title" }}">
<ul class="navbar">
{{ if site.Menus.main -}}
{{ $currentPage := . -}}
{{ range site.Menus.main -}}
<li><a href="{{ .URL | relLangURL }}"{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} aria-current="page"{{ end }}>{{ .Pre }}<span>{{ .Name }}</span>{{ .Post }}</a></li>
{{ end -}}
{{ else -}}
{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
{{ with site.Home }}<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ i18n "menu_home" }}</a></li>{{ end }}
{{ range where site.RegularPages "Section" "" -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ range site.Sections -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ end -}}
</ul>
</nav>

View file

@ -0,0 +1,30 @@
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" {{ printf "type=%q" .MediaType.Type | safeHTMLAttr }} title="{{ .Name }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<meta name="description" content="{{ with (.Description | default (replaceRE "\n" " " (.Plain | truncate 170))) }}{{ . }}{{ end }}">
<meta name="created" {{ printf "content=%q" (.Date.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
<meta name="modified" {{ printf "content=%q" (.Lastmod.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
{{ with $.Param "author" }}<meta name="author" content="{{ . }}">{{ end }}
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
{{ with $.Param "image" }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
{{ hugo.Generator }}
<meta name="msapplication-TileColor" content="{{ $.Param "themecolor" | default "#ffffff" }}">
<meta name="theme-color" content="{{ $.Param "themecolor" | default "#ffffff" }}">
{{ with site.Params.piwikTrackerUrl }}<link rel="dns-prefetch" href="https://{{ . }}">{{ end }}
{{ with $.Param "microusername" }}<link rel="me" href="https://micro.blog/{{ . }}">{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if .IsTranslated -}}
{{ range .Translations -}}
<link rel="alternate" hreflang="{{ .Site.LanguageCode | default .Lang }}" href="{{ .Permalink }}">
{{ end -}}
{{ end -}}
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | relURL }}">
{{ if $.Param "realfavicongenerator" -}}
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}">
{{ end -}}

View file

@ -0,0 +1,29 @@
{{ $breadcrumbScratch := newScratch -}}
{{ $crumbScratch := newScratch -}}
{{ $crumbScratch.Set "itemListElement" (slice) -}}
{{ $breadPos := 0 -}}
{{ range .Ancestors.Reverse -}}
{{ $breadPos = (add $breadPos 1) -}}
{{ $crumbScratch.Add "itemListElement" (dict
"@type" "ListItem"
"position" $breadPos
"item" (dict
"@id" .Permalink
"name" .LinkTitle
)
) -}}
{{ end -}}
{{ $breadPos = (add $breadPos 1) -}}
{{ $crumbScratch.Add "itemListElement" (dict
"@type" "ListItem"
"position" $breadPos
"item" (dict
"@id" .Permalink
"name" .LinkTitle
)
) -}}
{{ $breadcrumbScratch.SetInMap "breadcrumb" "@context" "https://schema.org" -}}
{{ $breadcrumbScratch.SetInMap "breadcrumb" "@type" "BreadcrumbList" -}}
{{ $breadcrumbScratch.SetInMap "breadcrumb" "itemListElement" ($crumbScratch.Get "itemListElement") -}}
{{ $jsonifiedBreadcrumb := $breadcrumbScratch.Get "breadcrumb" | jsonify (dict "indent" " " "prefix" " ") -}}
{{ return ($jsonifiedBreadcrumb | safeJS) -}}

View file

@ -0,0 +1,58 @@
<script type="application/ld+json">
{{ $blogSections := site.Params.blogSections | default (slice "blog" "post") -}}
{{ $breadcrumbSections := site.Params.breadcrumbSections | default (slice) -}}
{
"@context": "https://schema.org",
{{ if .IsPage -}}
"@type": {{ if in $blogSections .Section }}"BlogPosting",{{ else }}"WebPage",
{{ if in $breadcrumbSections .Section -}}
"breadcrumb": {{ partial "meta_breadcrumb_json_ld.html" . }},
{{ end -}}
{{ end -}}
"headline": {{ .Title }},
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
"url" : {{ .Permalink }},
{{ with (.Description | default (replaceRE "\n" " " (.Plain | truncate 170))) -}}
"description": {{ . }},
{{ end -}}
{{ with .Params.tags -}}
"keywords": {{ . }},
{{ end -}}
{{ else -}}
"@type": "WebPage",
{{ if in $breadcrumbSections .Section -}}
"breadcrumb": {{ partial "meta_breadcrumb_json_ld.html" . }},
{{ end -}}
"url" : {{ .Permalink }},
"name": {{ .Title }},
{{ with $.Param "description" -}}
"description": {{ . }},
{{ end -}}
{{ end -}}
{{ with $.Param "image" -}}
"image" : {{ . | absURL }},
{{ end -}}
{{ with $.Param "author" -}}
"author": {
"@type": "Person",
"name": {{ . }}
},
{{ end -}}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{ site.BaseURL }}
},
"publisher": {
"@type": "Organization",
"name": {{ site.Title }},
{{ with $.Param "icon" -}}
"logo" : {
"@type": "ImageObject",
"url": {{ . | absURL }}
},
{{ end -}}
"url": {{ site.BaseURL }}
}
}
</script>

View file

@ -0,0 +1,39 @@
<div class="mobile-nav" dir="ltr">
<div class="mobile-nav__cover"></div>
<button class="mobile-nav__toggle{{ if $.Param "mobilemenuoutline" }} button--outline{{ end }}" aria-expanded="false" aria-controls="sheet">
{{ i18n "menu_mobile" }}
<svg class="mobile-nav__hamburger" viewBox="0 0 100 100" focusable="false" aria-hidden="true">
<rect width="80" height="12" x="10" y="20" rx="5"></rect>
<rect width="80" height="12" x="10" y="45" rx="5"></rect>
<rect width="80" height="12" x="10" y="70" rx="5"></rect>
</svg>
</button>
<div class="mobile-nav__sheet link-inverted link-nav" id="sheet" aria-hidden="true">
<div class="mobile-nav__region">{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
<nav class="mobile-nav__main-menu" aria-label="{{ i18n "menu_title" }}">
<ul class="mobile-nav__navbar">
{{ if site.Menus.main -}}
{{ $currentPage := . -}}
{{ range site.Menus.main -}}
<li><a href="{{ .URL | relLangURL }}"{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} aria-current="page"{{ end }}>{{ .Pre }}<span>{{ .Name }}</span>{{ .Post }}</a></li>
{{ end -}}
{{ else -}}
{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
{{ with site.Home }}<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ i18n "menu_home" }}</a></li>{{ end }}
{{ range where site.RegularPages "Section" "" -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ range site.Sections -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ end -}}
</ul>
</nav>
</div>
</div>

View file

@ -0,0 +1,14 @@
{{ if $.Param "internalpagination" -}}
{{ template "_internal/pagination.html" . }}
{{ else -}}
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) -}}
<nav class="pager">
{{ if .Paginator.HasPrev -}}
<a href="{{ .Paginator.Prev.URL }}" rel="prev" class="pager__item pager__item--prev"><span aria-hidden="true">« </span>{{ i18n "pager_prev" }}</a>
{{ end -}}
{{ if .Paginator.HasNext -}}
<a href="{{ .Paginator.Next.URL }}" rel="next" class="pager__item pager__item--next">{{ i18n "pager_next" }}<span aria-hidden="true"> »</span></a>
{{ end -}}
</nav>
{{ end -}}
{{ end -}}

View file

@ -0,0 +1,12 @@
{{ $src := (.Params.podcast.mp3 | absURL) -}}
{{ if site.Params.Podcast.cdn -}}
{{ $src = add site.Params.Podcast.cdn (.Params.podcast.mp3 | relURL) -}}
{{ end -}}
<figure class="podcast">
<audio controls preload="{{ site.Params.Podcast.preload | default "metadata" }}"><source src="{{ $src }}" type="audio/mpeg"></audio>
<figcaption><a href="{{ $src }}">{{ .Title }}</a></figcaption>
</figure>
{{ with .Params.podcast.image }}
{{ $resource := resources.Get .src }}{{ $size := "250x" }}{{ with .width }}{{ $size = (add (string .) "x") }}{{ end }}{{ $image := $resource.Resize $size -}}
<figure class="image {{ .class | default "right" }}"><img src="{{ $image.RelPermalink }}" width="{{ .width | default "250" }}" alt="{{ .alt }}"></figure>
{{ end -}}

View file

@ -0,0 +1,11 @@
<aside class="related layout__related">
{{ $related := site.RegularPages.Related . | first 3 -}}
{{ with $related -}}
<h2>{{ i18n "string_see_also" }}</h2>
<ul>
{{ range . -}}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
</ul>
{{ end -}}
</aside>

View file

@ -0,0 +1,60 @@
{{ $opts := dict "minify" true -}}
{{ if eq hugo.Environment "development" -}}
{{ $opts = merge $opts (dict "minify" false) -}}
{{ end -}}
{{ $early := resources.Get "js/script-early.js" | js.Build $opts | fingerprint -}}
<script src="{{ $early.RelPermalink }}"></script>
{{ if $.Param "alpine" -}}
{{ $alpine := resources.Get "libs/alpine.min.js" | fingerprint -}}
<script defer src="{{ $alpine.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "jquery" -}}
{{ $jquery := resources.Get "libs/jquery.slim.min.js" | fingerprint -}}
<script defer src="{{ $jquery.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "umbrella" -}}
{{ $umbrella := resources.Get "libs/umbrella.min.js" | fingerprint -}}
<script defer src="{{ $umbrella.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "mobilemenu" -}}
{{ $mobilemenu := resources.Get "js/mobile.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $mobilemenu.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "cookieconsent" -}}
{{ $cookieconsent := resources.Get "js/cookieconsent.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $cookieconsent.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "listsort" -}}
{{ $listmin := resources.Get "libs/list.min.js" | fingerprint -}}
<script defer src="{{ $listmin.RelPermalink }}"></script>
{{ $listsort := resources.Get "js/listsort.js" | fingerprint -}}
<script defer src="{{ $listsort.RelPermalink }}"></script>
{{ end -}}
{{ if $.Param "tables" -}}
{{ $tables := resources.Get "js/tables.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $tables.RelPermalink }}"></script>
{{ end -}}
{{ if .HasShortcode "contact" -}}
{{ $contact := resources.Get "js/contact.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $contact.RelPermalink }}"></script>
{{ end -}}
{{ if .HasShortcode "search" -}}
{{ $flexsearch := resources.Get "libs/flexsearch.compact.js" | fingerprint -}}
<script defer src="{{ $flexsearch.RelPermalink }}"></script>
{{ $search_opts := merge $opts (dict "params" (dict "searchLimit" (site.Params.searchLimit | default 20) "basePath" site.Home.RelPermalink)) -}}
{{ $search := resources.Get "js/search.js" | js.Build $search_opts | fingerprint -}}
<script defer src="{{ $search.RelPermalink }}"></script>
{{ end -}}
{{ $script := resources.Get "js/script.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $script.RelPermalink }}"></script>

View file

@ -0,0 +1,15 @@
{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
<aside class="sidebar layout__second-sidebar">
{{ range site.Sections -}}
<section class="menu">
<p class="title"><strong><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} aria-current="page"{{ end }}>{{ .Title }}</a></strong></p>
<ul>
{{ range .Pages -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
</ul>
</section>
{{ end -}}
</aside>

View file

@ -0,0 +1,19 @@
{{ $main_options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" false "transpiler" (site.Params.sassTranspiler | default "libsass")) -}}
{{ if eq hugo.Environment "development" -}}
{{ $main_options = merge $main_options (dict "outputStyle" "nested" "enableSourceMap" true) -}}
{{ end -}}
{{ $mobile_options := merge $main_options (dict "targetPath" "css/mobile.css") -}}
{{ $print_options := merge $main_options (dict "targetPath" "css/print.css") -}}
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options -}}
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options -}}
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options -}}
{{ if ne hugo.Environment "development" -}}
{{ $main_style = $main_style | fingerprint -}}
{{ $mobile_style = $mobile_style | fingerprint -}}
{{ $print_style = $print_style | fingerprint -}}
{{ end -}}
{{ if $.Param "mobilemenu" -}}
<link rel="stylesheet" href="{{ $mobile_style.RelPermalink }}" media="screen">
{{ end -}}
<link rel="stylesheet" href="{{ $main_style.RelPermalink }}">
<link rel="stylesheet" href="{{ $print_style.RelPermalink }}" media="print">

View file

@ -0,0 +1,3 @@
<div class="submitted meta">
{{ partial "author-date" . }}
</div>

View file

@ -0,0 +1,8 @@
<div class="tags meta">
{{ i18n "taxo_tags" }}:
<ul>
{{ range (.GetTerms "tags") -}}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end -}}
</ul>
</div>

View file

@ -0,0 +1,27 @@
{{ $gaid := (or site.Config.Services.GoogleAnalytics.ID site.GoogleAnalytics) -}}
{{ $opts := dict
"minify" true
"params" (dict
"cookieConsent" site.Params.cookieConsent
"piwikTrackerUrl" site.Params.piwikTrackerUrl
"piwikSiteID" site.Params.piwikSiteID
"plausibleSiteID" site.Params.plausibleSiteID
"GoogleAnalytics" $gaid) -}}
{{ if eq hugo.Environment "development" -}}
{{ $opts = merge $opts (dict "minify" false) -}}
{{ end -}}
{{ if and site.Params.piwikTrackerUrl site.Params.piwikSiteID -}}
{{ $script := resources.Get "js/tracking.js" | js.Build $opts | fingerprint -}}
<script src="{{ $script.RelPermalink }}"></script>
<script defer src="https://{{ site.Params.piwikTrackerUrl }}/matomo.js"></script>
{{ end -}}
{{ if site.Params.plausibleSiteID -}}
<script async defer data-domain="{{ site.Params.plausibleSiteID }}" src="{{ site.Params.plausibleTrackerURL | default "https://plausible.io/js/plausible.js" }}"></script>
{{ end -}}
{{ if $gaid -}}
{{ $script := resources.Get "js/tracking.js" | js.Build $opts | fingerprint -}}
<script src="{{ $script.RelPermalink }}"></script>
{{ template "_internal/google_analytics.html" . }}
{{ end -}}

View file

@ -0,0 +1,10 @@
<article class="full-view{{ with .Section }} full-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
</header>
{{ partial "podcast.html" . -}}
{{ .Content }}
</article>

View file

@ -0,0 +1,64 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ site.Params.Podcast.Title | default site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{ site.Params.Podcast.Description | default site.Params.Description }}</description>
<generator>Hugo -- gohugo.io</generator>
<language>{{ site.Params.Podcast.Lang | default site.LanguageCode }}</language>
{{ with site.Params.author.email -}}
<managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
{{ end -}}
{{ with site.Params.author.email -}}
<webMaster>{{ . }}{{ with site.Params.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 site.Params.Podcast.Image }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with site.Params.Podcast.Category -}}
<itunes:category {{ if .name }}text="{{ .name }}"{{ end }}>
{{ range .subcategories }}<itunes:category text="{{ . }}" />{{ end }}
</itunes:category>
{{ end -}}
{{ with site.Params.Podcast.Owner -}}
<itunes:owner>
{{ with .name }}<itunes:name>{{ . }}</itunes:name>{{ end }}
{{ with .email }}<itunes:email>{{ . }}</itunes:email>{{ end }}
</itunes:owner>
{{ end -}}
{{ with site.Params.Podcast.Description }}<itunes:summary>{{ . }}</itunes:summary>{{ end }}
{{ with site.Params.Podcast.Author }}<itunes:author>{{ . }}</itunes:author>{{ end }}
{{ with site.Params.Podcast.Type }}<itunes:type>{{ . }}</itunes:type>{{ end }}
{{ with site.Params.Podcast.Block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
{{ with site.Params.Podcast.Complete }}<itunes:complete>{{ . }}</itunes:complete>{{ end }}
{{ with site.Params.Podcast.NewFeed }}<itunes:new-feed-url>{{ . }}</itunes:new-feed-url>{{ end }}
<itunes:explicit>{{ if site.Params.Podcast.Explicit }}true{{ else }}false{{ end }}</itunes:explicit>
{{ range .Pages -}}
<item>
<title>{{ .Title }}</title>
<itunes:title>{{ .Title }}</itunes:title>
<link>{{ .Permalink }}</link>
<guid>{{ .Permalink }}</guid>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with site.Params.Podcast.Author }}<author>{{ . }}</author>{{ end }}
<description>{{ .Content | html }}</description>
{{ if site.Params.Podcast.local | default true -}}
{{ with .Params.podcast.mp3 }}{{ $file_stat := os.Stat (path.Join "/static" .) }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ path.Join site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" length="{{ $file_stat.Size }}" type="audio/mpeg" />{{ end }}
{{ else -}}
{{ with .Params.podcast.mp3 }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ add site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" type="audio/mpeg" />{{ end }}
{{ end -}}
{{ with .Params.podcast.duration }}<itunes:duration>{{ . }}</itunes:duration>{{ end }}
{{ with .Params.podcast.image.src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with .Params.podcast.episode }}<itunes:episode>{{ . }}</itunes:episode>{{ end }}
{{ with .Params.podcast.episodeType }}<itunes:episodeType>{{ . }}</itunes:episodeType>{{ end }}
{{ with .Params.podcast.season }}<itunes:season>{{ . }}</itunes:season>{{ end }}
{{ with .Params.podcast.block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
<itunes:explicit>{{ if .Params.podcast.explicit }}true{{ else }}false{{ end }}</itunes:explicit>
</item>
{{ end -}}
</channel>
</rss>

View file

@ -0,0 +1,15 @@
{{ define "main" -}}
<main class="main layout__main">
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}">{{ .Title }}</h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
{{ partial "podcast.html" . -}}
{{ .Content }}
</article>
</main>
{{ end -}}

View file

@ -0,0 +1,41 @@
{{ $caption := .Get "caption" -}}
{{ $class := .Get "class" -}}
{{ $preload := .Get "preload" | default "metadata" -}}
{{ $src := .Get "src" -}}
{{ $resource := false -}}
{{ $static := false -}}
{{ $type := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ $src = $resource.RelPermalink -}}
{{ $type = $resource.MediaType }}
{{ end -}}
{{ if not $src -}}
{{ warnf "%s shortcode number %d in \"content/%s\" is missing the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ else if not (or $static $resource) -}}
{{ warnf "%s shortcode number %d in \"content/%s\" has an error in the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ end -}}
<figure class="audio{{ with $class }} {{ . }}{{ end }}">
<audio controls preload="{{ $preload }}">
<source src="{{ $src }}" {{ with $type }}type="{{ . }}"{{ end }}>
</audio>
{{ with $caption -}}
<figcaption>{{ . | markdownify }}</figcaption>
{{ end -}}
</figure>

View file

@ -0,0 +1,5 @@
{{ $class := .Get "class" -}}
{{ $newtab := .Get "newtab" | default false -}}
{{ $src := .Get "src" -}}
{{ $text := .Get "text" -}}
<a class="button{{ with $class }} {{ . }}{{ end }}" href="{{ $src }}"{{ if $newtab }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $text }}</a>

View file

@ -0,0 +1 @@
<div class="clearfix"></div>

View file

@ -0,0 +1,16 @@
<p class="error message js-hidden">{{ i18n "js_required" }}</p>
<p class="contact-submitted status message hidden">{{ i18n "contact_submitted" }}</p>
<p class="contact-error error message hidden">{{ i18n "contact_error" }}</p>
<form class="contact-form hidden" data-protect="/php/contact.php" action="#" method="post" accept-charset="UTF-8">
<label for="edit-name">{{ i18n "contact_name" }}</label>
<input type="text" id="edit-name" name="name" placeholder="{{ i18n "contact_name_placeholder" }}" required autofocus>
<label for="edit-mail">{{ i18n "contact_mail" }}</label>
<input type="email" id="edit-mail" name="email" placeholder="{{ i18n "contact_mail_placeholder" }}" required>
<input type="text" id="edit-url" class="hidden" name="url" placeholder="{{ i18n "contact_honeypot" }}">
<label for="edit-subject">{{ i18n "contact_subject" }}</label>
<input type="text" id="edit-subject" name="subject" placeholder="{{ i18n "contact_subject_placeholder" }}" required>
<label for="edit-message">{{ i18n "contact_message" }}</label>
<textarea id="edit-message" name="message" rows="5" placeholder="{{ i18n "contact_message_placeholder" }}" required></textarea>
<button type="submit" name="submit" disabled>{{ i18n "contact_submit" }}</button>
</form>

View file

@ -0,0 +1,6 @@
{{ $class := .Get "class" -}}
{{ $summary := .Get "summary" -}}
<details{{ with $class }} class="{{ . }}"{{ end }}>
{{ with $summary }}<summary>{{ . }}</summary>{{ end }}
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
</details>

View file

@ -0,0 +1,107 @@
{{ $alt := .Get "alt" -}}
{{ $attr := .Get "attr" -}}
{{ $attrlink := .Get "attrlink" -}}
{{ $caption := .Get "caption" -}}
{{ $class := .Get "class" -}}
{{ $height := .Get "height" -}}
{{ $link := .Get "link" -}}
{{ $size := .Get "size" -}}
{{ $src := .Get "src" -}}
{{ $srcset := .Get "srcset" -}}
{{ $title := .Get "title" -}}
{{ $width := .Get "width" -}}
{{ $maxwidth := site.Params.imageMaxWidth -}}
{{ $realwidth := 0 -}}
{{ $realheight := 0 -}}
{{ $resource := false -}}
{{ $srcsetw := (slice) -}}
{{ $static := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ with (imageConfig (path.Join "/static" $src)) -}}
{{ $realwidth = .Width -}}
{{ $realheight = .Height -}}
{{ end -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ if $size -}}
{{ $image := $resource.Resize $size -}}
{{ $src = $image.RelPermalink -}}
{{ if or $width $height -}}
{{ $realwidth = $image.Width -}}
{{ $realheight = $image.Height -}}
{{ else -}}
{{ $width = $image.Width -}}
{{ $height = $image.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) -}}
{{ end -}}
{{ else -}}
{{ $src = $resource.RelPermalink -}}
{{ $realwidth = $resource.Width -}}
{{ $realheight = $resource.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ range $set := split $srcset " " -}}
{{ $image := $resource.Resize (printf "%sx" $set) -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) -}}
{{ end -}}
{{ $width = "" -}}
{{ $height = "" -}}
{{ end -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ $height = $realheight -}}
{{ if and ($realwidth) (lt ($width) ($realwidth)) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ else if $height -}}
{{ $width = $realwidth -}}
{{ $height = int $height -}}
{{ if and ($realheight) (lt ($height) ($realheight)) -}}
{{ $width = (mul ($realwidth) (div (add ($height) 0.0) ($realheight))) -}}
{{ $width = (math.Round $width) -}}
{{ end -}}
{{ else if and ($maxwidth) (lt ($maxwidth) ($realwidth)) -}}
{{ $width = ($maxwidth) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ if not $src -}}
{{ warnf "%s shortcode number %d in \"content/%s\" is missing the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ else if not (or $static $resource) -}}
{{ warnf "%s shortcode number %d in \"content/%s\" has an error in the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ end -}}
<figure class="image{{ with $class }} {{ . }}{{ end }}">
{{ with $link }}<a href="{{ . }}">{{ end -}}
<img src="{{ $src }}"{{ with $srcsetw }} srcset="{{ delimit . ", " }}"{{ end }}{{ if isset .Params "alt" }} alt="{{ $alt }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}>
{{- if $link }}</a>{{ end }}
{{ if or $title $caption $attr -}}
<figcaption>
{{ with $title }}<strong>{{ . }}</strong><br>{{ end -}}
{{- $caption | markdownify }}{{ if and $caption $attr }} {{ end -}}
{{ with $attrlink }}<a href="{{ . }}">{{ end }}{{ $attr | markdownify }}{{ if $attrlink }}</a>{{ end -}}
</figcaption>
{{ end -}}
</figure>

View file

@ -0,0 +1,36 @@
{{ $class := .Get "class" -}}
{{ $newtab := .Get "newtab" | default false -}}
{{ $src := .Get "src" -}}
{{ $text := .Get "text" -}}
{{ $resource := false -}}
{{ $static := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ $src = $resource.RelPermalink -}}
{{ end -}}
{{ if not $text -}}
{{ $text = path.Base $src -}}
{{ end -}}
{{ if not $src -}}
{{ warnf "%s shortcode number %d in \"content/%s\" is missing the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ else if not (or $static $resource) -}}
{{ warnf "%s shortcode number %d in \"content/%s\" has an error in the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ end -}}
<a class="file{{ with $class }} {{ . }}{{ end }}" href="{{ $src }}"{{ if $newtab }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $text }}</a>

View file

@ -0,0 +1,94 @@
{{ $alt := .Get "alt" -}}
{{ $class := .Get "class" -}}
{{ $height := .Get "height" -}}
{{ $link := .Get "link" -}}
{{ $size := .Get "size" -}}
{{ $src := .Get "src" -}}
{{ $srcset := .Get "srcset" -}}
{{ $width := .Get "width" -}}
{{ $maxwidth := site.Params.imageMaxWidth -}}
{{ $realwidth := 0 -}}
{{ $realheight := 0 -}}
{{ $resource := false -}}
{{ $srcsetw := (slice) -}}
{{ $static := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ with (imageConfig (path.Join "/static" $src)) -}}
{{ $realwidth = .Width -}}
{{ $realheight = .Height -}}
{{ end -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ if $size -}}
{{ $image := $resource.Resize $size -}}
{{ $src = $image.RelPermalink -}}
{{ if or $width $height -}}
{{ $realwidth = $image.Width -}}
{{ $realheight = $image.Height -}}
{{ else -}}
{{ $width = $image.Width -}}
{{ $height = $image.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) -}}
{{ end -}}
{{ else -}}
{{ $src = $resource.RelPermalink -}}
{{ $realwidth = $resource.Width -}}
{{ $realheight = $resource.Height -}}
{{ end -}}
{{ if $srcset -}}
{{ range $set := split $srcset " " -}}
{{ $image := $resource.Resize (printf "%sx" $set) -}}
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) -}}
{{ end -}}
{{ $width = "" -}}
{{ $height = "" -}}
{{ end -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ $height = $realheight -}}
{{ if and ($realwidth) (lt ($width) ($realwidth)) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ else if $height -}}
{{ $width = $realwidth -}}
{{ $height = int $height -}}
{{ if and ($realheight) (lt ($height) ($realheight)) -}}
{{ $width = (mul ($realwidth) (div (add ($height) 0.0) ($realheight))) -}}
{{ $width = (math.Round $width) -}}
{{ end -}}
{{ else if and ($maxwidth) (lt ($maxwidth) ($realwidth)) -}}
{{ $width = ($maxwidth) -}}
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
{{ $height = (math.Round $height) -}}
{{ end -}}
{{ if not $src -}}
{{ warnf "%s shortcode number %d in \"content/%s\" is missing the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ else if not (or $static $resource) -}}
{{ warnf "%s shortcode number %d in \"content/%s\" has an error in the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ end -}}
{{ with $link }}<a class="image-link" href="{{ . }}">{{ end -}}
<img class="image{{ with $class }} {{ . }}{{ end }}" src="{{ $src }}"{{ with $srcsetw }} srcset="{{ delimit . ", " }}"{{ end }}{{ if isset .Params "alt" }} alt="{{ $alt }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}>
{{- if $link }}</a>{{ end }}

View file

@ -0,0 +1 @@
${{ .Inner }}$

View file

@ -0,0 +1 @@
{{ with site.GetPage (.Get 0) }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}

View file

@ -0,0 +1,21 @@
<p class="error message js-hidden">{{ i18n "js_required" }}</p>
<p class="search-loading status message hidden">{{ i18n "search_loading" }}</p>
<div class="search-input hidden">
<form id="search-form" class="search-form" action="#" method="post" accept-charset="UTF-8" role="search">
<label for="query" class="visually-hidden">{{ i18n "search_title" }}</label>
<input type="search" id="query" name="query" class="search-text" placeholder="{{ i18n "search_placeholder" }}" maxlength="128">
</form>
</div>
<div class="search-results"></div>
<template>
<article class="search-result list-view">
<header>
<h2 class="title mt--s mb--xxs"><a href="#">Title here</a></h2>
<div class="submitted"><time class="created-date">Date here</time></div>
</header>
<p class="content">Summary here</p>
</article>
</template>

View file

@ -0,0 +1,65 @@
{{ $alt := .Get "alt" -}}
{{ $caption := .Get "caption" -}}
{{ $class := .Get "class" -}}
{{ $height := .Get "height" -}}
{{ $inline := .Get "inline" | default false -}}
{{ $link := .Get "link" -}}
{{ $src := .Get "src" -}}
{{ $width := .Get "width" -}}
{{ $resource := false -}}
{{ $static := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ if $inline -}}
{{ $src = readFile (path.Join "/static" $src) -}}
{{ end -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ if $inline -}}
{{ $src = $resource.Content -}}
{{ else -}}
{{ $src = $resource.RelPermalink -}}
{{ end -}}
{{ end -}}
{{ if and $width $height -}}
{{ $width = int $width -}}
{{ $height = int $height -}}
{{ else if $width -}}
{{ $width = int $width -}}
{{ else if $height -}}
{{ $height = int $height -}}
{{ end -}}
{{ if not $src -}}
{{ warnf "%s shortcode number %d in \"content/%s\" is missing the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ else if not (or $static $resource) -}}
{{ warnf "%s shortcode number %d in \"content/%s\" has an error in the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ end -}}
{{ if $caption }}<figure class="image image--svg{{ with $class }} {{ . }}{{ end }}">{{ end -}}
{{ with $link }}<a class="image-link" href="{{ . }}">{{ end -}}
{{ if $inline -}}
<div class="image image--svg{{ with $class }} {{ . }}{{ end }}">{{ $src | safeHTML }}</div>
{{ else -}}
<img class="image image--svg{{ with $class }} {{ . }}{{ end }}" src="{{ $src }}"{{ if isset .Params "alt" }} alt="{{ $alt }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}>
{{ end -}}
{{- if $link }}</a>{{ end }}
{{ if $caption -}}
<figcaption>
{{ $caption | markdownify -}}
</figcaption>
</figure>
{{ end -}}

View file

@ -0,0 +1,67 @@
{{ $autoplay := .Get "autoplay" -}}
{{ $caption := .Get "caption" -}}
{{ $class := .Get "class" -}}
{{ $loop := .Get "loop" -}}
{{ $poster := .Get "poster" -}}
{{ $preload := .Get "preload" | default "metadata" -}}
{{ $src := .Get "src" -}}
{{ $width := .Get "width" -}}
{{ $posterres := false -}}
{{ $resource := false -}}
{{ $static := false -}}
{{ $type := false -}}
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
{{ $static = true -}}
{{ $src = relURL $src -}}
{{ else if $src -}}
{{ $src = strings.TrimLeft "/" $src -}}
{{ with resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ with .Page.Resources.Get $src -}}
{{ $resource = . -}}
{{ end -}}
{{ end -}}
{{ if $resource -}}
{{ $src = $resource.RelPermalink -}}
{{ $type = $resource.MediaType -}}
{{ end -}}
{{ if and $poster (fileExists (path.Join "/static" $poster)) -}}
{{ $poster = relURL $poster -}}
{{ else if $poster -}}
{{ $poster = strings.TrimLeft "/" $poster -}}
{{ with resources.Get $poster -}}
{{ $posterres = . -}}
{{ end -}}
{{ with .Page.Resources.Get $poster -}}
{{ $posterres = . -}}
{{ end -}}
{{ end -}}
{{ if $posterres -}}
{{ if $width -}}
{{ $image := $posterres.Resize (printf "%sx" $width) -}}
{{ $poster = $image.RelPermalink -}}
{{ else -}}
{{ $poster = $posterres.RelPermalink -}}
{{ end -}}
{{ end -}}
{{ if not $src -}}
{{ warnf "%s shortcode number %d in \"content/%s\" is missing the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ else if not (or $static $resource) -}}
{{ warnf "%s shortcode number %d in \"content/%s\" has an error in the \"src\" attribute." .Name .Ordinal .Page.File.Path -}}
{{ end -}}
<figure class="video{{ with $class }} {{ . }}{{ end }}">
<video controls preload="{{ $preload }}" {{ with $width }}width="{{ . }}"{{ end }} {{ with $poster }}poster="{{ . }}"{{ end }} {{ with $autoplay }}autoplay="{{ . }}"{{ end }} {{ with $loop }}loop="{{ . }}"{{ end }}>
<source src="{{ $src }}" {{ with $type }}type="{{ . }}"{{ end }}>
</video>
{{ with $caption -}}
<figcaption>{{ . | markdownify }}</figcaption>
{{ end -}}
</figure>

View file

@ -0,0 +1 @@
</div>

View file

@ -0,0 +1 @@
<div class="{{ .Get 0 }}">

View file

@ -0,0 +1,3 @@
{{ $display := "inline" -}}
{{ if eq (.Get 1) "block" }}{{ $display = "block" }}{{ end -}}
<div class="{{ .Get 0 }}">{{ if eq (.Get 1) "nomarkdown" }}{{ .Inner }}{{ else }}{{ .Inner | $.Page.RenderString (dict "display" $display) }}{{ end }}</div>

View file

@ -0,0 +1,4 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<h2 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a> <span class="meta">({{ .Data.Pages.Len }})</span></h2>
<p>{{ .Description }}</p>
</article>