template installiert

This commit is contained in:
2026-10-17 08:45:08 +02:00
parent ec2da90945
commit 7532843b67
378 changed files with 13317 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Locale }}" dir="{{ or .Site.Language.Direction "ltr" }}">
{{ partial "head.html" . }}
<body class="list-body">
<a class="skip-link" href="#main-content">Skip to content</a>
{{ partial "nav-bar.html" . }}
<main id="main-content" class="site-main list-main side-gutter" tabindex="-1">
<header class="list-header">
<p class="section-kicker">404</p>
<h1 class="list-header-title">Page not found</h1>
<p class="list-header-subtext">The page you were looking for has moved or no longer exists.</p>
</header>
<nav class="pagination-nav" aria-label="Recovery">
<a href="{{ .Site.Home.RelPermalink }}" class="pagination-text">&larr; Back to home</a>
</nav>
</main>
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
{{- $image := or (.Page.Resources.GetMatch .Destination) (resources.GetMatch .Destination) -}}
{{- if $image -}}
{{- partial "responsive-image.html" (dict
"image" $image
"alt" .Text
"title" .Title
"widths" (slice 711 1422 2133)
"sizes" "(min-width: 711px) 711px, 100vw"
) -}}
{{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }} loading="lazy" decoding="async">
{{- end -}}
+10
View File
@@ -0,0 +1,10 @@
{{- $description := .Summary -}}
{{- if isset .Params "description" -}}
{{- $description = .Params.description -}}
{{- end -}}
{{- $description = $description | plainify | htmlUnescape -}}
{{- $limit := int (.Site.Params.cardDescriptionLength | default 0) -}}
{{- if gt $limit 0 -}}
{{- $description = $description | truncate $limit -}}
{{- end -}}
{{- return $description -}}
+18
View File
@@ -0,0 +1,18 @@
<footer class="site-footer side-padding">
{{ $navigation := .Site.Params.navigation | default dict }}
<p class="footer-brand">
{{- if isset $.Site.Params "brand"}}{{ $.Site.Params.brand }}{{ else }}{{ $.Site.Title }}{{ end -}}
</p>
<nav class="footer-links" aria-label="Footer navigation">
<a href="{{ $.Site.Home.RelPermalink }}">Home</a>
{{ range where .Site.Pages "Params.displayinmenu" true -}}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{ end -}}
{{ range $key, $value := .Site.Taxonomies.categories -}}
{{ with $.Site.GetPage (printf "%s%s" "categories/" ($key | urlize)) }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{ end }}
{{- end }}
</nav>
{{ partial "social-links.html" (dict "context" . "class" "footer-social-links" "includeRss" $navigation.rssinmenu) }}
</footer>
+61
View File
@@ -0,0 +1,61 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{{ if not .IsHome }}{{with .Title }}{{ . }} &middot; {{ end }}{{ end }}{{ .Site.Title }}</title>
{{ $description := .Description | default .Site.Params.description }}
{{ if eq .Kind "term" }}{{ $description = .Description | default (printf "Posts about %s by %s." .Title .Site.Title) }}{{ end }}
<meta name="description" content="{{ $description | plainify | truncate 160 }}" />
{{ with site.Params.author.name }}<meta name="author" content="{{ . }}" />{{ end }}
{{ $canonical := .Permalink }}
{{ if in (slice "home" "section" "taxonomy" "term") .Kind }}{{ $canonical = .Paginator.URL | absURL }}{{ end }}
<link rel="canonical" href="{{ $canonical }}">
{{ if (fileExists "static/apple-touch-icon.png") -}}
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | absURL }}">
{{ end -}}
{{ if (fileExists "static/favicon-32x32.png") -}}
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/favicon-32x32.png" | absURL }}">
{{ end -}}
{{ if (fileExists "static/favicon-16x16.png") -}}
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/favicon-16x16.png" | absURL }}">
{{ end -}}
{{ if (fileExists "static/site.webmanifest") -}}
<link rel="manifest" href="{{ "/site.webmanifest" | absURL }}">
{{ end -}}
{{ if (fileExists "static/safari-pinned-tab.svg") -}}
<link rel="mask-icon" href="{{ "/safari-pinned-tab.svg" | absURL }}" color="{{ site.Params.appearance.maskIconColor | default "#22201d" }}">
{{ end -}}
{{ partial "opengraph.html" . }}
{{ partial "twitter_cards.html" . }}
{{ partial "structured-data.html" . }}
{{ if (templates.Exists "_partials/meta-tags.html") -}}
{{ partial "meta-tags.html" . }}
{{ end -}}
{{ with resources.Get "css/katex.min.css" -}}
{{ $katexStyle := . | fingerprint }}
<link href="{{ $katexStyle.RelPermalink }}" rel="stylesheet" integrity="{{ $katexStyle.Data.Integrity }}" crossorigin="anonymous">
{{ end -}}
<meta name="theme-color" content="#f7f3eb" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#20201d" media="(prefers-color-scheme: dark)">
<meta name="color-scheme" content="light dark">
{{ $normalizeStyle := resources.Get "css/normalize.css" }}
{{ $fontStyle := resources.Get "css/source-sans-3.css" }}
{{ $mainStyle := resources.Get "css/style.css" }}
{{ $overrideStyle := resources.Get "css/override.css" }}
{{ $style := slice $normalizeStyle $fontStyle $mainStyle $overrideStyle | resources.Concat "css/noesis.css" | minify | fingerprint }}
<link href="{{ $style.RelPermalink }}" rel="stylesheet" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{ end -}}
{{ partial "google_analytics.html" . }}
{{ $appearance := .Site.Params.appearance | default dict }}
{{ with $appearance.backgroundimage -}}
{{ with resources.GetMatch . -}}
<style>
body {
background: #ecedef url("{{ .RelPermalink | safeCSS }}") repeat;
}
</style>
{{- end }}
{{- end }}
</head>
+3
View File
@@ -0,0 +1,3 @@
{{ with .Site.Params.metaCreator -}}
<meta name="twitter:creator" content="{{ . }}">
{{ end -}}
+51
View File
@@ -0,0 +1,51 @@
<nav class="nav-bar side-padding" aria-label="Primary navigation">
{{ $socials := .Site.Params.socials | default dict }}
{{ $navigation := .Site.Params.navigation | default dict }}
<p class="nav-header"><a href="{{ .Site.Home.RelPermalink }}" class="nav-text">
{{- if isset $.Site.Params "brand"}}
{{- $.Site.Params.brand -}}
{{ else }}
{{- $.Site.Title -}}
{{ end -}}
</a></p>
<ul class="nav-links">
<li><a href="{{ .Site.Home.RelPermalink }}"{{ if .IsHome }} aria-current="page"{{ end }}>Home</a></li>
{{ range where .Site.Pages "Params.displayinmenu" true -}}
<li><a href="{{ .RelPermalink }}"{{ if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ range $key, $value := .Site.Taxonomies.categories -}}
{{ with $.Site.GetPage (printf "%s%s" "categories/" ($key | urlize)) }}
<li><a href="{{ .RelPermalink }}"{{ if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end }}
{{- end }}
{{ if eq $navigation.rssinmenu true -}}
<li><a href="{{ "/index.xml" | relURL }}">rss</a></li>
{{- end }}
</ul>
<div class="hamburger-menu">
<input class="hamburger-menu-button" type="checkbox"
onclick="hamburgerMenuPressed.call(this)"
aria-label="Open navigation menu"
aria-expanded="false"
aria-controls="menu"
>
<div class="hamburger-menu-icon" aria-hidden="true">
<span></span>
<span></span>
</div>
<ul id="menu" class="hamburger-menu-overlay">
<li><a href="{{ .Site.Home.RelPermalink }}" class="hamburger-menu-overlay-link"{{ if .IsHome }} aria-current="page"{{ end }}>Home</a></li>
{{ range where .Site.Pages "Params.displayinmenu" true -}}
<li><a href="{{ .RelPermalink }}" class="hamburger-menu-overlay-link"{{ if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
{{ range $key, $value := .Site.Taxonomies.categories -}}
{{ with $.Site.GetPage (printf "%s%s" "categories/" ($key | urlize)) }}
<li><a href="{{ .RelPermalink }}" class="hamburger-menu-overlay-link"{{ if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end }}
{{- end }}
{{ if eq $navigation.rssinmenu true -}}
<li><a href="{{ "/index.xml" | relURL }}" class="hamburger-menu-overlay-link">rss</a></li>
{{- end }}
</ul>
</div>
</nav>
+39
View File
@@ -0,0 +1,39 @@
{{- $image := .image -}}
{{- $alt := .alt | default "" -}}
{{- $class := .class | default "" -}}
{{- $pictureClass := .pictureClass | default "" -}}
{{- $sizes := .sizes | default "100vw" -}}
{{- $style := .style | default "" -}}
{{- $title := .title | default "" -}}
{{- $loading := .loading | default "lazy" -}}
{{- $widths := .widths | default (slice 711 1422 2133) -}}
{{- $images := slice -}}
{{- if and $image (reflect.IsImageResourceProcessable $image) -}}
{{- range $widths -}}
{{- $width := int . -}}
{{- if le $width $image.Width -}}
{{- $images = $images | append ($image.Resize (printf "%dx Lanczos" $width)) -}}
{{- end -}}
{{- end -}}
{{- if eq (len $images) 0 -}}
{{- $images = $images | append $image -}}
{{- end -}}
{{- $fallback := index $images 0 -}}
<picture{{ with $pictureClass }} class="{{ . }}"{{ end }}>
{{- $webpImages := slice -}}
{{- range $images -}}
{{- $webpImages = $webpImages | append (.Resize (printf "%dx webp Lanczos" .Width)) -}}
{{- end }}
<source type="image/webp" srcset="{{ range $index, $candidate := $webpImages }}{{ if $index }}, {{ end }}{{ $candidate.RelPermalink }} {{ $candidate.Width }}w{{ end }}" sizes="{{ $sizes }}">
<source srcset="{{ range $index, $candidate := $images }}{{ if $index }}, {{ end }}{{ $candidate.RelPermalink }} {{ $candidate.Width }}w{{ end }}" sizes="{{ $sizes }}">
<img src="{{ $fallback.RelPermalink }}" width="{{ $fallback.Width }}" height="{{ $fallback.Height }}"{{ with $class }} class="{{ . }}"{{ end }} alt="{{ $alt }}" loading="{{ $loading }}" decoding="async"{{ with $title }} title="{{ . }}"{{ end }}{{ with $style }} style="{{ . | safeCSS }}"{{ end }}>
</picture>
{{- else if and $image (reflect.IsImageResourceWithMeta $image) -}}
<picture{{ with $pictureClass }} class="{{ . }}"{{ end }}>
<img src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}"{{ with $class }} class="{{ . }}"{{ end }} alt="{{ $alt }}" loading="{{ $loading }}" decoding="async"{{ with $title }} title="{{ . }}"{{ end }}{{ with $style }} style="{{ . | safeCSS }}"{{ end }}>
</picture>
{{- else if $image -}}
<picture{{ with $pictureClass }} class="{{ . }}"{{ end }}>
<img src="{{ $image.RelPermalink }}"{{ with $class }} class="{{ . }}"{{ end }} alt="{{ $alt }}" loading="{{ $loading }}" decoding="async"{{ with $title }} title="{{ . }}"{{ end }}{{ with $style }} style="{{ . | safeCSS }}"{{ end }}>
</picture>
{{- end -}}
+10
View File
@@ -0,0 +1,10 @@
{{ with resources.Get "js/katex.min.js" }}
{{ $katex := . | fingerprint }}
<script defer src="{{ $katex.RelPermalink }}" integrity="{{ $katex.Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
{{ with resources.Get "js/contrib/auto-render.min.js" }}
{{ $autoRender := . | fingerprint }}
<script defer src="{{ $autoRender.RelPermalink }}" integrity="{{ $autoRender.Data.Integrity }}" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{ $corejs := resources.Get "js/core.js" | minify | fingerprint }}
<script defer src="{{ $corejs.RelPermalink }}" integrity="{{ $corejs.Data.Integrity }}" crossorigin="anonymous"></script>
+74
View File
@@ -0,0 +1,74 @@
{{- $ctx := .context -}}
{{- $class := .class | default "social-links" -}}
{{- $includeRss := .includeRss | default false -}}
{{- $socials := $ctx.Site.Params.socials | default dict -}}
{{- $fallbackIcon := resources.Get "icons/link.svg" -}}
{{- $services := slice
(dict "key" "email" "label" "Email" "icon" "email")
(dict "key" "discord" "label" "Discord" "icon" "discord")
(dict "key" "facebook" "label" "Facebook" "icon" "facebook")
(dict "key" "flickr" "label" "Flickr" "icon" "flickr")
(dict "key" "github" "label" "GitHub" "icon" "github")
(dict "key" "instagram" "label" "Instagram" "icon" "instagram")
(dict "key" "linkedin" "label" "LinkedIn" "icon" "linkedin")
(dict "key" "patreon" "label" "Patreon" "icon" "patreon")
(dict "key" "pinterest" "label" "Pinterest" "icon" "pinterest")
(dict "key" "reddit" "label" "Reddit" "icon" "reddit")
(dict "key" "snapchat" "label" "Snapchat" "icon" "snapchat")
(dict "key" "soundcloud" "label" "SoundCloud" "icon" "soundcloud")
(dict "key" "spotify" "label" "Spotify" "icon" "spotify")
(dict "key" "tiktok" "label" "TikTok" "icon" "tik-tok")
(dict "key" "tumblr" "label" "Tumblr" "icon" "tumblr")
(dict "key" "twitch" "label" "Twitch" "icon" "twitch")
(dict "key" "x" "label" "X" "icon" "twitter-alt")
(dict "key" "twitter" "label" "X" "icon" "twitter-alt")
(dict "key" "vimeo" "label" "Vimeo" "icon" "vimeo")
(dict "key" "whatsapp" "label" "WhatsApp" "icon" "whatsapp")
(dict "key" "youtube" "label" "YouTube" "icon" "youtube")
-}}
<div class="social-links {{ $class }}">
{{- range $services -}}
{{- $key := .key -}}
{{- $label := .label -}}
{{- if isset $socials $key -}}
{{- $raw := index $socials $key -}}
{{- if $raw -}}
{{- $href := printf "%s" $raw -}}
{{- if and (eq $key "email") (not (strings.HasPrefix $href "mailto:")) -}}
{{- $href = printf "mailto:%s" $href -}}
{{- end -}}
{{- $iconName := .icon -}}
{{- $icon := resources.Get (printf "icons/%s.svg" $iconName) -}}
{{- if not $icon -}}
{{- $icon = $fallbackIcon -}}
{{- end -}}
{{- $darkIcon := resources.Get (printf "icons/%s-dark.svg" $iconName) -}}
{{- if not $darkIcon -}}
{{- $darkIcon = $icon -}}
{{- end -}}
{{- with $icon -}}
<a href="{{ $href }}"{{ if ne $key "email" }} target="_blank" rel="noopener noreferrer"{{ end }} aria-label="{{ $label }}" title="{{ $label }}" style="{{ printf "--social-icon: url('%s'); --social-icon-dark: url('%s');" .RelPermalink $darkIcon.RelPermalink | safeCSS }}">
<span class="social-icon" aria-hidden="true"></span>
<span class="sr-only">{{ $label }}</span>
</a>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if $includeRss -}}
{{- $rssIcon := resources.Get "icons/rss.svg" -}}
{{- if not $rssIcon -}}
{{- $rssIcon = $fallbackIcon -}}
{{- end -}}
{{- $rssDarkIcon := resources.Get "icons/rss-dark.svg" -}}
{{- if not $rssDarkIcon -}}
{{- $rssDarkIcon = $rssIcon -}}
{{- end -}}
{{- with $rssIcon -}}
<a href="{{ "/index.xml" | relURL }}" target="_blank" rel="noopener noreferrer" aria-label="RSS" title="RSS" style="{{ printf "--social-icon: url('%s'); --social-icon-dark: url('%s');" .RelPermalink $rssDarkIcon.RelPermalink | safeCSS }}">
<span class="social-icon" aria-hidden="true"></span>
<span class="sr-only">RSS</span>
</a>
{{- end -}}
{{- end -}}
</div>
+59
View File
@@ -0,0 +1,59 @@
{{- $author := site.Params.author | default dict -}}
{{- $profile := site.Home.Params.profile | default dict -}}
{{- with or $author.name $profile.name -}}
{{- $personID := printf "%s#person" site.Home.Permalink -}}
{{- $person := dict "@type" "Person" "@id" $personID "name" . "url" site.Home.Permalink -}}
{{- with or $author.jobtitle $profile.jobtitle -}}
{{- $person = merge $person (dict "jobTitle" .) -}}
{{- end -}}
{{- with $author.worksfor -}}
{{- $person = merge $person (dict "worksFor" (dict "@type" "Organization" "name" .)) -}}
{{- end -}}
{{- with or $author.location $profile.location -}}
{{- $person = merge $person (dict "homeLocation" (dict "@type" "Place" "name" .)) -}}
{{- end -}}
{{- with $profile.headshotimage -}}
{{- with or (site.Home.Resources.GetMatch .) (resources.GetMatch .) -}}
{{- $person = merge $person (dict "image" .Permalink) -}}
{{- end -}}
{{- end -}}
{{- $sameAs := slice -}}
{{- range $key, $url := site.Params.socials | default dict -}}
{{- if and $url (ne $key "email") -}}
{{- $sameAs = $sameAs | append $url -}}
{{- end -}}
{{- end -}}
{{- with $sameAs -}}
{{- $person = merge $person (dict "sameAs" .) -}}
{{- end -}}
{{- $authorRef := dict "@id" $personID -}}
{{- $description := $.Description | default site.Params.description | plainify -}}
{{- $graph := slice $person -}}
{{- if $.IsHome -}}
{{- $website := dict "@type" "WebSite" "@id" (printf "%s#website" site.Home.Permalink) "name" site.Title "url" site.Home.Permalink "inLanguage" site.Language.Locale "author" $authorRef "publisher" $authorRef -}}
{{- with $description }}{{ $website = merge $website (dict "description" .) }}{{ end -}}
{{- $graph = $graph | append $website -}}
{{- else if $.IsPage -}}
{{- $type := $.Params.schematype | default (cond $.Date.IsZero "WebPage" "BlogPosting") -}}
{{- $page := dict "@type" $type "@id" $.Permalink "url" $.Permalink "name" ($.Title | plainify) "inLanguage" site.Language.Locale "isPartOf" (dict "@id" (printf "%s#website" site.Home.Permalink)) -}}
{{- with $description }}{{ $page = merge $page (dict "description" .) }}{{ end -}}
{{- if eq $type "ProfilePage" -}}
{{- $page = merge $page (dict "mainEntity" $authorRef) -}}
{{- else if eq $type "BlogPosting" -}}
{{- $page = merge $page (dict
"headline" ($.Title | plainify)
"mainEntityOfPage" $.Permalink
"datePublished" ($.Date.Format "2006-01-02T15:04:05Z07:00")
"dateModified" ($.Lastmod.Format "2006-01-02T15:04:05Z07:00")
"author" $authorRef
"publisher" $authorRef
) -}}
{{- with $.Params.categories }}{{ $page = merge $page (dict "articleSection" .) }}{{ end -}}
{{- with $.Resources.GetMatch "featuredImage" }}{{ $page = merge $page (dict "image" .Permalink) }}{{ end -}}
{{- end -}}
{{- $graph = $graph | append $page -}}
{{- end }}
<script type="application/ld+json">{{ dict "@context" "https://schema.org" "@graph" $graph | jsonify | safeJS }}</script>
{{- end -}}
+1
View File
@@ -0,0 +1 @@
<div style="clear: both;"></div>
+22
View File
@@ -0,0 +1,22 @@
{{- $user := "" -}}
{{- $id := "" -}}
{{- $file := "" -}}
{{- if .IsNamedParams -}}
{{- $user = .Get "user" -}}
{{- $id = .Get "id" -}}
{{- $file = .Get "file" -}}
{{- else -}}
{{- $user = .Get 0 -}}
{{- $id = .Get 1 -}}
{{- if ge (len .Params) 3 -}}
{{- $file = .Get 2 -}}
{{- end -}}
{{- end -}}
{{- if or (not $user) (not $id) -}}
{{- errorf "The gist shortcode requires a GitHub user and gist ID in %q" .Page.File.Path -}}
{{- end -}}
{{- $src := printf "https://gist.github.com/%s/%s.js" $user $id -}}
{{- with $file -}}
{{- $src = printf "%s?file=%s" $src (. | urlquery) -}}
{{- end -}}
<script src="{{ $src | safeURL }}"></script>
+11
View File
@@ -0,0 +1,11 @@
{{- $src := .Get "src" -}}
{{- with $.Page.Resources.GetMatch $src -}}
{{- partial "responsive-image.html" (dict
"image" .
"alt" ($.Get "alt")
"widths" (slice 711 1422 2133)
"sizes" "(min-width: 711px) 711px, 100vw"
) -}}
{{- else -}}
{{- errorf "The image shortcode could not find page resource %q in %q" $src $.Page.File.Path -}}
{{- end -}}
+1
View File
@@ -0,0 +1 @@
{{.Inner}}
+34
View File
@@ -0,0 +1,34 @@
{{- $src := .Get "src" -}}
{{- $displayWidth := 711 -}}
{{- with .Get "width" -}}
{{- $displayWidth = int (trim . "px") -}}
{{- end -}}
{{- $class := "small-img" -}}
{{- $pictureClass := "small-pic" -}}
{{- with .Get "smartfloat" -}}
{{- if or (eq . "left") (eq . "right") -}}
{{- $pictureClass = printf "%s smartfloat-%s" $pictureClass . -}}
{{- end -}}
{{- end -}}
{{- if eq (.Get "clear") "true" -}}
{{- $pictureClass = printf "%s clear" $pictureClass -}}
{{- end -}}
{{- $style := "" -}}
{{- $sizes := "(min-width: 711px) 711px, 100vw" -}}
{{- with .Get "width" -}}
{{- $style = printf "width: %s;" . -}}
{{- $sizes = . -}}
{{- end -}}
{{- with $.Page.Resources.GetMatch $src -}}
{{- partial "responsive-image.html" (dict
"image" .
"pictureClass" $pictureClass
"class" $class
"alt" ($.Get "alt")
"style" $style
"widths" (slice $displayWidth (mul $displayWidth 2) (mul $displayWidth 3))
"sizes" $sizes
) -}}
{{- else -}}
{{- errorf "The smallimg shortcode could not find page resource %q in %q" $src $.Page.File.Path -}}
{{- end -}}
+118
View File
@@ -0,0 +1,118 @@
{{- $pages := .Pages -}}
{{- if .IsHome -}}
{{- $pages = where .Site.RegularPages "Section" "in" .Site.MainSections -}}
{{- end -}}
{{- $paginator := .Paginate (where $pages "Params.displayinlist" "!=" false) -}}
<!DOCTYPE html>
<html lang="{{ .Site.Language.Locale }}" dir="{{ or .Site.Language.Direction "ltr" }}">
{{ partial "head.html" . }}
<body class="list-body home-body">
<a class="skip-link" href="#main-content">Skip to content</a>
{{ partial "nav-bar.html" . }}
<main id="main-content" class="site-main home-main" tabindex="-1">
{{ $profile := .Site.Params.profile | default dict }}
{{ if isset .Params "profile" }}
{{ $profile = .Params.profile | default dict }}
{{ end }}
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
<header class="home-hero side-padding">
<div class="home-hero-grid">
<div class="home-hero-copy">
{{ with (.Params.eyebrow | default "" | strings.TrimSpace) }}<p class="hero-eyebrow">{{ . | markdownify }}</p>{{ end }}
{{ with .Title }}<h1 class="home-hero-title">{{ . | markdownify }}</h1>{{ end }}
{{ with .Description }}<p class="home-hero-text">{{ . | markdownify }}</p>{{ end }}
{{ if or $profile.name $profile.jobtitle $profile.location }}
<div class="hero-signals" role="group" aria-label="Author details">
{{ with $profile.name }}
<span class="hero-signal">{{ . }}</span>
{{ end }}
{{ with $profile.jobtitle }}
{{ $briefcase := resources.Get "icons/briefcase.svg" }}
<span class="hero-signal">{{ with $briefcase }}<span class="hero-signal-icon" style="{{ printf "--signal-icon: url('%s');" .RelPermalink | safeCSS }}" aria-hidden="true"></span>{{ end }}{{ . }}</span>
{{ end }}
{{ with $profile.location }}
{{ $locationIcon := resources.Get "icons/map-marker-home.svg" }}
<span class="hero-signal">{{ with $locationIcon }}<span class="hero-signal-icon" style="{{ printf "--signal-icon: url('%s');" .RelPermalink | safeCSS }}" aria-hidden="true"></span>{{ end }}{{ . }}</span>
{{ end }}
</div>
{{ end }}
</div>
{{ with $profile.headshotimage -}}
{{ $headshot := $.Resources.GetMatch . }}
{{ if not $headshot }}{{ $headshot = resources.GetMatch . }}{{ end }}
{{ with $headshot -}}
<div class="home-headshot-card">
{{ partial "responsive-image.html" (dict
"image" .
"class" "home-headshot"
"alt" $profile.headshotalt
"widths" (slice 272 544 816)
"sizes" "(min-width: 760px) clamp(240px, 27vw, 340px), 220px"
"loading" "eager"
) }}
</div>
{{ end }}
{{ end -}}
</div>
</header>
{{- end }}
{{ with .Content -}}
<section class="list-header-content side-padding">
{{ . }}
</section>
{{- end }}
<section id="writing" class="writing-section side-gutter" aria-labelledby="writing-title">
<div class="writing-layout">
<div class="writing-column">
<header class="section-header">
<h2 id="writing-title">{{ with .Params.writingtitle }}{{ . }}{{ else }}Recent Posts{{ end }}</h2>
{{ with .Params.writingsubtitle }}<p class="section-subtitle">{{ . }}</p>{{ end }}
</header>
<div class="post-list">
{{- range $paginator.Pages -}}
{{ .Render "li" }}
{{- end }}
</div>
{{ if or ($paginator.HasPrev) ($paginator.HasNext) -}}
<nav class="pagination-nav" aria-label="Writing pagination">
{{ if $paginator.HasPrev }}<a href="{{ $paginator.Prev.URL }}" class="pagination-newer pagination-text">&larr; Newer Posts</a>{{ end }}
{{ if $paginator.HasNext }}<a href="{{ $paginator.Next.URL }}" class="pagination-older pagination-text">Older Posts &rarr;</a>{{ end }}
</nav>
{{- end }}
</div>
{{ $aboutLabel := or $profile.name .Site.Title }}
<aside class="home-about-rail" aria-label="{{ printf "About %s" $aboutLabel }}">
{{ with .Params.about }}
<section class="rail-section">
<h2 class="rail-label">About</h2>
<div class="rail-about">{{ . | markdownify }}</div>
</section>
{{ end }}
{{ with .Site.Taxonomies.categories }}
<section class="rail-section">
<h2 class="rail-label">Topics</h2>
<ul class="rail-topic-list">
{{ range $name, $taxonomy := . }}
{{ with $.Site.GetPage (printf "/categories/%s" ($name | urlize)) }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ else }}
<li><a href="{{ printf "/categories/%s/" ($name | urlize) | relURL }}">{{ $name | title }}</a></li>
{{ end }}
{{ end }}
</ul>
</section>
{{ end }}
{{ if .Site.Params.socials }}
<section class="rail-section">
<h2 class="rail-label">Connect</h2>
{{ partial "social-links.html" (dict "context" . "class" "rail-links") }}
</section>
{{ end }}
</aside>
</div>
</section>
</main>
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
</html>
+22
View File
@@ -0,0 +1,22 @@
<a href="{{ .RelPermalink }}" class="card blog-card bc-next{{ if not (.Resources.GetMatch "featuredImage") }} blog-card-text-only{{ end }}" rel="bookmark" aria-label="Next article: {{ .Title | plainify }}">
{{ with .Resources.GetMatch "featuredImage" }}
<div class="card-img-container">
{{ partial "responsive-image.html" (dict
"image" .
"class" "card-img"
"alt" .Params.description
"widths" (slice 400 800 1200)
"sizes" "(min-width: 760px) 176px, (min-width: 600px) 152px, calc(100vw - 2 * clamp(1.25rem, 4vw, 2.5rem))"
) }}
</div>
{{ end }}
<article class="card-body">
<div class="card-subtext muted-text">
<p>Next Article</p>
{{ if isset .Params "date" }}<p><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
</div>
<h2 class="card-title">{{ .Title | markdownify }}</h2>
<p class="card-text">{{ partial "card-description.html" . }}</p>
<span class="card-read-more">Continue</span>
</article>
</a>
+22
View File
@@ -0,0 +1,22 @@
<a href="{{ .RelPermalink }}" class="card blog-card{{ if not (.Resources.GetMatch "featuredImage") }} blog-card-text-only{{ end }}" rel="bookmark" aria-label="{{ .Title | plainify }}">
{{ with .Resources.GetMatch "featuredImage" }}
<div class="card-img-container">
{{ partial "responsive-image.html" (dict
"image" .
"class" "card-img"
"alt" .Params.description
"widths" (slice 400 800 1200)
"sizes" "(min-width: 760px) 176px, (min-width: 600px) 152px, calc(100vw - 2 * clamp(1.25rem, 4vw, 2.5rem))"
) }}
</div>
{{- end }}
<article class="card-body">
<div class="card-subtext muted-text">
{{ if isset .Params "date" }}<p><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
{{ if (isset .Params "categories") }}<p>{{ delimit .Params.categories ", " }}</p>{{ end }}
</div>
<h2 class="card-title">{{ .Title | markdownify }}</h2>
<p class="card-text">{{ partial "card-description.html" . }}</p>
<span class="card-read-more">{{ site.Params.cardReadMoreText | default "Read" }}</span>
</article>
</a>
+40
View File
@@ -0,0 +1,40 @@
{{- $pages := where .Pages "Params.displayinlist" "!=" false -}}
{{- if .IsHome -}}
{{- $pages = where .Site.RegularPages "Params.displayinlist" "!=" false -}}
{{- end -}}
{{- $paginator := .Paginate $pages -}}
<!DOCTYPE html>
<html lang="{{ .Site.Language.Locale }}" dir="{{ or .Site.Language.Direction "ltr" }}">
{{ partial "head.html" . }}
<body class="list-body">
<a class="skip-link" href="#main-content">Skip to content</a>
{{ partial "nav-bar.html" . }}
<main id="main-content" class="site-main list-main side-gutter" tabindex="-1">
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
<header class="list-header">
<p class="section-kicker">{{ if eq .Kind "term" }}Topic{{ else }}Archive{{ end }}</p>
{{ with .Title | markdownify }}<h1 class="list-header-title">{{ . }}</h1>{{ end }}
{{ if .Description }}<p class="list-header-subtext">{{ .Description }}</p>{{ else if eq .Kind "term" }}<p class="list-header-count">{{ len $pages }} {{ if eq (len $pages) 1 }}article{{ else }}articles{{ end }}</p>{{ end }}
</header>
{{- end }}
{{ with .Content -}}
<section class="list-header-content">
{{ . }}
</section>
{{- end }}
<div class="post-list">
{{- range $paginator.Pages -}}
{{ .Render "li" }}
{{- end }}
</div>
{{ if or ($paginator.HasPrev) ($paginator.HasNext) -}}
<nav class="pagination-nav" aria-label="Writing pagination">
{{ if $paginator.HasPrev }}<a href="{{ $paginator.Prev.URL }}" class="pagination-newer pagination-text">&larr; Newer Posts</a>{{ end }}
{{ if $paginator.HasNext }}<a href="{{ $paginator.Next.URL }}" class="pagination-older pagination-text">Older Posts &rarr;</a>{{ end }}
</nav>
{{- end }}
</main>
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
</html>
+33
View File
@@ -0,0 +1,33 @@
{{- $authorName := .Site.Params.author.name -}}
{{- $authorEmail := .Site.Params.author.email -}}
{{- $pages := where .Pages "Params.displayinlist" "!=" false -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = first $limit $pages -}}
{{- end -}}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} - {{ 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.Language.Locale }}
<language>{{ . }}</language>{{ end }}{{ with $authorEmail }}
<managingEditor>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ 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.Type | 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 $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ if (isset .Params "description") }}{{ index .Params "description" | html }}{{ else }}{{ .Summary | html }}{{ end }}</description>
</item>
{{- end }}
</channel>
</rss>
+48
View File
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Locale }}" dir="{{ or .Site.Language.Direction "ltr" }}">
{{ partial "head.html" . }}
<body class="single-body">
<a class="skip-link" href="#main-content">Skip to content</a>
{{ partial "nav-bar.html" . }}
<main id="main-content" class="content side-text-padding" tabindex="-1">
<article class="post">
<header class="post-header">
{{ if or (isset .Params "date") (isset .Params "categories") -}}
<div class="post-meta">
{{ if isset .Params "date" }}<p><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
{{ if isset .Params "categories" }}<p>{{ range $index, $category := .Params.categories }}{{ if $index }}, {{ end }}{{ with $.Site.GetPage (printf "/categories/%s" ($category | urlize)) }}<a href="{{ .RelPermalink }}">{{ $category }}</a>{{ else }}{{ $category }}{{ end }}{{ end }}</p>{{ end }}
</div>
{{- end }}
<h1 class="post-title">{{ .Title | markdownify }}</h1>
</header>
{{ with .Resources.GetMatch "featuredImage" -}}
<figure class="post-figure">
{{ partial "responsive-image.html" (dict
"image" .
"alt" .Params.description
"widths" (slice 711 1422 2133)
"sizes" "(min-width: 711px) 711px, 100vw"
"loading" "eager"
) }}
{{ with .Params.attribution -}}
<figcaption>Image by&nbsp;{{ with .link }}<a href="{{ . }}" target="_blank" rel="noreferrer noopener">{{ end }}{{ .name }}{{ with .link }}</a>{{ end }}</figcaption>
{{- end }}
</figure>
{{- end }}
{{ if .Params.toc -}}
<h2>Contents</h2>
{{ .TableOfContents }}
{{- end }}
{{ .Content }}
</article>
{{ partial "disqus.html" . }}
</main>
{{ with .PrevInSection -}}
<nav class="end-nav side-padding" aria-label="Article navigation">
{{ .Render "li-next" }}
</nav>
{{- end }}
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
</html>