aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r--themes/default/layouts/_default/_markup/render-codeblock-mathml.html18
-rw-r--r--themes/default/layouts/_default/_markup/render-codeblock.html28
-rw-r--r--themes/default/layouts/_default/_markup/render-heading.html11
-rw-r--r--themes/default/layouts/_default/_markup/render-image.html145
-rw-r--r--themes/default/layouts/_default/_markup/render-link.html38
-rw-r--r--themes/default/layouts/_default/baseof.html47
-rw-r--r--themes/default/layouts/_default/baseof.json12
-rw-r--r--themes/default/layouts/_default/baseof.txt12
-rw-r--r--themes/default/layouts/_default/baseof.xml13
-rw-r--r--themes/default/layouts/_default/drafts.html54
-rw-r--r--themes/default/layouts/_default/feeds.html50
-rw-r--r--themes/default/layouts/_default/home.archive-messages.html48
-rw-r--r--themes/default/layouts/_default/home.archive-tags.html56
-rw-r--r--themes/default/layouts/_default/home.archives.html67
-rw-r--r--themes/default/layouts/_default/home.authors.html49
-rw-r--r--themes/default/layouts/_default/home.authors.section.html20
-rw-r--r--themes/default/layouts/_default/home.browserconfig.xml13
-rw-r--r--themes/default/layouts/_default/home.rss-style.xsl146
-rw-r--r--themes/default/layouts/_default/home.settings.html32
-rw-r--r--themes/default/layouts/_default/home.sources.html76
-rw-r--r--themes/default/layouts/_default/home.xslt.rss.xsl104
-rw-r--r--themes/default/layouts/_default/home.xslt.sitemap.xsl90
-rw-r--r--themes/default/layouts/_default/index.html34
-rw-r--r--themes/default/layouts/_default/index.json26
-rw-r--r--themes/default/layouts/_default/index.webmanifest24
-rw-r--r--themes/default/layouts/_default/likes.html54
-rw-r--r--themes/default/layouts/_default/list.html36
-rw-r--r--themes/default/layouts/_default/media.html68
-rw-r--r--themes/default/layouts/_default/rss.xml124
-rw-r--r--themes/default/layouts/_default/section.drafts.html58
-rw-r--r--themes/default/layouts/_default/section.feeds.html53
-rw-r--r--themes/default/layouts/_default/section.following.html75
-rw-r--r--themes/default/layouts/_default/section.gallery.html12
-rw-r--r--themes/default/layouts/_default/section.html74
-rw-r--r--themes/default/layouts/_default/section.marks.html58
-rw-r--r--themes/default/layouts/_default/section.media.html65
-rw-r--r--themes/default/layouts/_default/section.webring.html66
-rw-r--r--themes/default/layouts/_default/single.embed.html26
-rw-r--r--themes/default/layouts/_default/single.html105
-rw-r--r--themes/default/layouts/_default/single.plain.txt3
-rw-r--r--themes/default/layouts/_default/sitemap.xml66
-rw-r--r--themes/default/layouts/_default/summary.html55
-rw-r--r--themes/default/layouts/_default/taxonomy.html117
-rw-r--r--themes/default/layouts/_default/term.html47
44 files changed, 1438 insertions, 937 deletions
diff --git a/themes/default/layouts/_default/_markup/render-codeblock-mathml.html b/themes/default/layouts/_default/_markup/render-codeblock-mathml.html
new file mode 100644
index 0000000..f6e5b61
--- /dev/null
+++ b/themes/default/layouts/_default/_markup/render-codeblock-mathml.html
@@ -0,0 +1,18 @@
+{{- $caption := default "Math Render" .Attributes.caption -}}
+{{- $ordinal := add .Ordinal 1 -}}
+{{- $hash := print (truncate 3 "" (sha256 .Inner)) (truncate 3 "" (sha256 .Page.RelPermalink)) "-" $ordinal -}}
+{{- $id := print "math:" $hash | safeURL -}}
+
+<math-ml>
+ <figure id="{{ $id }}">
+ <figure>
+ {{- with $math := .Inner -}}
+ {{- $math | safeHTML -}}
+ {{- end -}}
+ </figure>
+ <figcaption>
+ <a href="#{{ $id }}">({{ $ordinal }})</a>
+ {{ $caption | markdownify }}
+ </figcaption>
+ </figure>
+</math-ml>
diff --git a/themes/default/layouts/_default/_markup/render-codeblock.html b/themes/default/layouts/_default/_markup/render-codeblock.html
index f5c0e13..ab9a786 100644
--- a/themes/default/layouts/_default/_markup/render-codeblock.html
+++ b/themes/default/layouts/_default/_markup/render-codeblock.html
@@ -1,19 +1,25 @@
-{{ $options := .Attributes.options | default "default=1" }}
-{{ $caption := .Attributes.caption }}
+{{- $caption := .Attributes.caption -}}
+{{- $type := .Type | default "text" -}}
+{{- $options := .Attributes.options | default "default=1" -}}
+{{- $hash := print (truncate 3 "" (sha256 .Inner)) (truncate 3 "" (sha256 .Page.RelPermalink)) .Ordinal -}}
+{{- $id := print "code-block:" $hash | safeURL -}}
+{{- $highlight := highlight .Inner $type (print $options ",lineAnchors=" "code-line:" $hash) -}}
-<code-block {{ if in (lower $options) "linenos" }}data-lines{{ end }}>
+<code-block id="{{ $id }}" {{ if in (lower $options) "linenos" }}data-lines=""{{ end }}>
<header>
<language-label>
- {{ .Type }}
+ <a href="#{{ $id }}">{{ $type }}</a>
</language-label>
- <button>
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/copy.svg")) }}
- <span>Copy</span>
- </button>
</header>
- {{ highlight .Inner .Type (print $options ",lineAnchors=" "code-" (truncate 7 "" (md5 .Inner))) }}
+ <code-content contenteditable="true" spellcheck="false">
+ {{- replace $highlight
+ `class="lnlinks"`
+ `contenteditable="false" class="lnlinks"`
+ | safeHTML
+ -}}
+ </code-content>
</code-block>
-{{ with $caption }}
+{{- with $caption -}}
<footer>{{ . | markdownify }}</footer>
-{{ end }}
+{{- end -}}
diff --git a/themes/default/layouts/_default/_markup/render-heading.html b/themes/default/layouts/_default/_markup/render-heading.html
index 37eddb2..86b8e35 100644
--- a/themes/default/layouts/_default/_markup/render-heading.html
+++ b/themes/default/layouts/_default/_markup/render-heading.html
@@ -1,6 +1,9 @@
-<h{{ .Level }} id="{{ .Anchor | safeURL }}">
- <a
- title="{{ .Text | safeHTML }}"
- href="#{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
+{{- $text := .Text -}}
+{{- $hash := print (truncate 2 "" (sha256 .Page.RelPermalink)) (truncate 2 "" (sha256 $text)) -}}
+{{- $id := print "heading:" $hash ":" .Anchor -}}
+
+<h{{ .Level }} id="{{ $id | safeURL }}">
+ <a title="{{ $text | safeHTML }}" href="#{{ $id | safeURL }}">
+ {{ $text | safeHTML }}
</a>
</h{{ .Level }}>
diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html
index 0cf1d5a..04bf931 100644
--- a/themes/default/layouts/_default/_markup/render-image.html
+++ b/themes/default/layouts/_default/_markup/render-image.html
@@ -1,93 +1,110 @@
-{{- $source := $.Destination | safeURL -}}
-{{- $public := print "public/" $source -}}
-{{- $local := "" -}}
-{{- $cache := "" -}}
-{{- $exists := "" -}}
-{{- $width := "" -}}
-{{- $height := "" -}}
-{{- $dimensions := "600x360" -}}
-{{- $author := .Page.Section -}}
-{{- $relURL := strings.TrimPrefix .Page.Site.BaseURL .Page.Permalink -}}
-{{- $immutable := print ($relURL | humanize | urlize) "-" ($source | sha256 | truncate 8 "") -}}
-{{- $fileCache := print (partial "function-paths-media.html") "/" $author "/" $immutable -}}
+{{- $cache := "" -}}
+{{- $width := "" -}}
+{{- $height := "" -}}
+{{- $srcset := "" -}}
+{{- $colors := "" -}}
+{{- $type := "" -}}
+{{- $source := $.Destination | safeURL -}}
+{{- $public := print "public/" $source -}}
+{{- $fetch := print (urls.Parse $source).Scheme "://" (urls.Parse $source).Host (urls.Parse $source).RequestURI -}}
+{{- $figcaption := "Image/Picture" -}}
+{{- $orientation := "landscape" -}}
+{{- $dimensions := "600x360" -}}
+{{- $author := .Page.Section -}}
+{{- $relURL := strings.TrimPrefix .Page.Site.BaseURL .Page.Permalink -}}
+{{- $immutable := print ($relURL | humanize | urlize) "-" ($source | sha256 | truncate 8 "") -}}
+{{- $storage := print $author "/media/" $immutable -}}
+{{- $cached := fileExists (print "public/" $storage ".webp") -}}
-{{- if not (or (fileExists (print "public/" $fileCache ".webp")) (fileExists (print "public/" $fileCache (path.Ext $source)))) -}}
- {{- with $remote := resources.GetRemote $source -}}
+{{- $moderns := slice ".webp" ".avif" -}}
+{{- $fallbacks := slice ".png" ".jpg" ".gif" ".jpeg" ".svg" ".apng" ".jfif" ".pjpeg" ".pjp" -}}
+{{- $mimes := slice "image/avif" "image/webp" "image/apng" "image/gif" "image/jpeg" "image/png" "image/svg+xml" -}}
+
+{{- if not $cached -}}
+ {{- with $remote := cond (default true $.Page.Site.Params.site.offline) false (resources.GetRemote $fetch) -}}
{{- with .Err -}}
{{- if fileExists $public -}}
- {{- $local = resources.Get $public -}}
- {{- with $local -}}
- {{- $local = .Content | resources.FromString (print (partial "function-paths-media.html") "/" $author "/" (path.Base .)) -}}
+ {{- with $local := resources.Get $public -}}
+ {{- $local = .Content | resources.FromString (print $storage (path.Base .)) -}}
+ {{- $local = .Fit (print $dimensions " webp") -}}
+ {{- $local = $local | resources.Copy (print $storage ".webp") -}}
+ {{- $srcset = $local.Permalink -}}
+ {{- $local = .Fit $dimensions -}}
+ {{- $local = $local | resources.Copy (print $storage (path.Ext $local)) -}}
+ {{- $width = $local.Width -}}
+ {{- $height = $local.Height -}}
+ {{- $colors = $local.Colors -}}
+ {{- $cache = $local.Permalink -}}
{{- end -}}
{{- $source = print ("" | absURL) $source -}}
{{- else -}}
- {{- $404image := resources.Get "data/media/404.png" -}}
- {{- with $404image -}}
- {{- $width = .Width -}}
- {{- $height = .Height -}}
+ {{- with $404image := resources.Get "data/media/404.png" -}}
+ {{- $width = $404image.Width -}}
+ {{- $height = $404image.Height -}}
+ {{- $source = $404image.Permalink -}}
{{- end -}}
- {{- $source = $404image.RelPermalink -}}
{{- end -}}
{{- else -}}
- {{- $cache = .Content | resources.FromString (print (partial "function-paths-media.html") "/" $author "/" (path.Base .)) -}}
+ {{- with $cache = $remote.Content | resources.FromString (print $storage (path.Base $remote)) -}}
+ {{- $cache = .Fit (print $dimensions " webp") -}}
+ {{- $cache = $cache | resources.Copy (print $storage ".webp") -}}
+ {{- $srcset = $cache.Permalink -}}
+ {{- $cache = .Fit $dimensions -}}
+ {{- $cache = $cache | resources.Copy (print $storage (path.Ext $cache)) -}}
+ {{- $width = $cache.Width -}}
+ {{- $height = $cache.Height -}}
+ {{- $colors = $cache.Colors -}}
+ {{- $cache = $cache.Permalink -}}
+ {{- end -}}
{{- end -}}
{{- end -}}
{{- else -}}
- {{- $exists = resources.Get (print "public/" $fileCache (path.Ext $source)) -}}
- {{- $exists = $exists.Content | resources.FromString (print (partial "function-paths-media.html") "/" $author "/" (path.Base $exists)) -}}
+ {{- with $cache = resources.Get (print "public/" $storage ".webp") -}}
+ {{- $width = $cache.Width -}}
+ {{- $height = $cache.Height -}}
+ {{- $colors = $cache.Colors -}}
+ {{- $type = $cache.MediaType -}}
+ {{- $srcset = print ("" | absURL) "/" $storage ".webp" -}}
+ {{- end -}}
+ {{- range $extension := $fallbacks -}}
+ {{- with resources.Get (print "public/" $storage $extension) -}}
+ {{- $cache = print ("" | absURL) "/" $storage $extension -}}
+ {{- break -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+{{- if lt $width $height -}}
+ {{- $orientation = "portrait" -}}
+{{- end -}}
+
+{{- with $caption := $.Title -}}
+ {{- $figcaption = $caption | markdownify -}}
{{ end }}
{{- /* This comment removes trailing newlines and white spaces. */ -}}
<figure>
- <a href="{{ $source }}">
+ <a data-orientation="{{ $orientation }}" href="{{ $source }}">
<picture>
- {{- with $local }}
- {{- $local = .Fit (print $dimensions " webp") }}
- {{- $local = $local | resources.Copy (print (partial "function-paths-media.html") "/" $author "/" $immutable ".webp") }}
- <source srcset="{{- $local.RelPermalink -}}" type="image/webp" />
- {{- $local = .Fit $dimensions }}
- {{- $local = $local | resources.Copy (print (partial "function-paths-media.html") "/" $author "/" $immutable (path.Ext $local)) }}
- {{- $width = $local.Width -}}
- {{- $height = $local.Height -}}
- {{- $writeToFile := $local.Permalink }}
+ {{- with $srcset }}
+ <source srcset="{{ $srcset }}" type="{{ or $type "image/webp" }}" />
{{- end }}
- {{- with $cache }}
- {{- $cache = .Fit (print $dimensions " webp") }}
- {{- $cache = $cache | resources.Copy (print $author "/media/" $immutable ".webp") }}
- <source srcset="{{- $cache.RelPermalink -}}" type="image/webp" />
- {{- $cache = .Fit $dimensions }}
- {{- $cache = $cache | resources.Copy (print (partial "function-paths-media.html") "/" $author "/" $immutable (path.Ext $cache)) }}
- {{- $width = $cache.Width -}}
- {{- $height = $cache.Height -}}
- {{- $cache = $cache.RelPermalink }}
- {{- end -}}
- {{- with $exists }}
- {{- if fileExists (print "public/" $fileCache ".webp") -}}
- <source srcset="/{{- print $fileCache ".webp" -}}" type="image/webp" />
- {{- end -}}
- {{- if fileExists (print "public/" $author "/media/" $immutable ".webp") -}}
- <source srcset="/{{- print $author "/media/" $immutable ".webp" -}}" type="image/webp" />
- {{- end -}}
- {{- $width = .Width -}}
- {{- $height = .Height -}}
- {{- $cache = .RelPermalink }}
- {{- end -}}
- <img loading="lazy"
+ <img
+ loading="lazy"
src="{{ or $cache $source }}"
alt="{{ $.Text | htmlUnescape }}"
title="{{ $.Text | htmlUnescape }}"
width="{{ $width }}"
height="{{ $height }}"
+ {{ printf `style="` | safeHTMLAttr -}}
+ {{- partial "image-gradient.css.html" $colors | safeHTMLAttr -}}
+ {{- printf `"` | safeHTMLAttr }}
/>
</picture>
</a>
<figcaption>
- {{ with $.Title -}}
- {{ . | markdownify }}
- {{ else -}}
- Image/Picture
- {{ end -}}
- <br>
- Index: {{ with $cache }} {{ print "[Cache](" . ")" | markdownify }} &middot; {{ end }}
+ {{ $figcaption }}
+ <br />
+ Index: {{ with $cache }} {{ print "[Cache](" $cache ")" | markdownify }} &middot; {{ end }}
{{ print "[Source](" $source ")" | markdownify }}
</figcaption>
</figure>
diff --git a/themes/default/layouts/_default/_markup/render-link.html b/themes/default/layouts/_default/_markup/render-link.html
index 17a6f2c..ccfbc06 100644
--- a/themes/default/layouts/_default/_markup/render-link.html
+++ b/themes/default/layouts/_default/_markup/render-link.html
@@ -1,21 +1,31 @@
{{- $link := .Destination -}}
-{{ $isRemote := strings.HasPrefix $link "http" }}
-{{- if not $isRemote -}}
-{{ $url := urls.Parse .Destination }}
-{{- if $url.Path -}}
-{{ $fragment := "" }}
-{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
-{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .Permalink $fragment }}{{ end }}{{ end -}}
+{{- $url := urls.Parse $link -}}
+{{- $site := urls.Parse .Page.Site.BaseURL -}}
+{{- $local := or (eq $url.Host $site.Host) (strings.HasPrefix $link "/") -}}
+{{- $remote := not $local -}}
+
+{{- if and $local $url.Path -}}
+
+{{- $fragment := "" -}}
+
+ {{- with $url.Fragment -}}
+ {{- $fragment = printf "#%s" . -}}
+ {{- end -}}
+
+ {{- with .Page.GetPage $url.Path -}}
+ {{- $link = printf "%s%s" .Permalink $fragment -}}
+ {{- end -}}
+
{{- end -}}
+
<a
+ {{- if $remote }}
+ rel="noopener no-referrer"
+ {{- else }}
+ data-internal=""
+ {{- end }}
href="{{ $link | safeURL }}"
{{ with or .Title ($link | safeURL) -}}
title="{{ . }}"
- {{ end }}
- {{- if $isRemote -}}
- target="_blank"
- rel="noopener no-referrer"
- {{ end }}>
- {{- .Text | safeHTML -}}
-</a>
+ {{ end }}>{{ .Text | safeHTML }}</a>
{{- /* This comment removes trailing newlines and white spaces. */ -}}
diff --git a/themes/default/layouts/_default/baseof.html b/themes/default/layouts/_default/baseof.html
index 3ee2e03..c277115 100644
--- a/themes/default/layouts/_default/baseof.html
+++ b/themes/default/layouts/_default/baseof.html
@@ -1,11 +1,26 @@
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if $modified -}}
<!DOCTYPE html>
-<html lang="en-us" itemscope itemtype="http://schema.org/BlogPosting">
+<html
+ lang="en-us"
+ data-kind="{{ .Page.Kind }}"
+ data-type="{{ .Page.Type }}"
+ itemscope=""
+ itemtype="http://schema.org/BlogPosting"
+ data-document="html"
+>
<head>
<title>
{{- block "title" . -}}{{- end -}}
- {{- partial "site-title.html" . -}}
+ {{- partial "head-title.html" . -}}
</title>
- <meta name="description" content="{{- partial "site-description.html" . -}}">
+ <meta name="description" content="{{- partial "head-description.html" . -}}" />
{{- partial "head.html" . -}}
{{- block "styles" . -}}{{- end -}}
</head>
@@ -14,19 +29,27 @@
<a href="#main">Skip to main content</a>
</skip-link>
- <column-left>
+ <column-base position="left">
{{- partial "navigator-left.html" . -}}
- </column-left>
+ </column-base>
- <column-middle>
+ <column-base position="middle">
+ {{- block "header" . -}}{{- end -}}
<main id="main">
- {{- block "middle" . -}}{{- end -}}
- {{- partial "footer.html" . -}}
+ {{- block "middle" . -}}
+ <footer>Silence is golden.</footer>
+ {{- end -}}
</main>
- </column-middle>
+ {{- block "footer" . -}}
+ {{- partial "footer.html" . -}}
+ {{- end -}}
+ </column-base>
- <column-right>
- {{- block "right" . -}}{{- end -}}
- </column-right>
+ <column-base position="right">
+ {{- block "right" . -}}
+ <footer>Silence is golden.</footer>
+ {{- end -}}
+ </column-base>
</body>
</html>
+{{- end -}}
diff --git a/themes/default/layouts/_default/baseof.json b/themes/default/layouts/_default/baseof.json
new file mode 100644
index 0000000..e1203cc
--- /dev/null
+++ b/themes/default/layouts/_default/baseof.json
@@ -0,0 +1,12 @@
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if $modified -}}
+ {{- block "main" . -}}
+ "Silence is golden."
+ {{- end -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/baseof.txt b/themes/default/layouts/_default/baseof.txt
new file mode 100644
index 0000000..c354667
--- /dev/null
+++ b/themes/default/layouts/_default/baseof.txt
@@ -0,0 +1,12 @@
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if $modified -}}
+ {{- block "main" . -}}
+ Silence is golden.
+ {{- end -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/baseof.xml b/themes/default/layouts/_default/baseof.xml
new file mode 100644
index 0000000..73f129f
--- /dev/null
+++ b/themes/default/layouts/_default/baseof.xml
@@ -0,0 +1,13 @@
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if $modified -}}
+{{- block "main" . -}}
+{{- printf `<?xml version="1.0" encoding="utf-8" standalone="yes"?>%s` "\n" | safeHTML -}}
+<root>Silence is golden.</root>
+{{- end -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/drafts.html b/themes/default/layouts/_default/drafts.html
deleted file mode 100644
index 635f17b..0000000
--- a/themes/default/layouts/_default/drafts.html
+++ /dev/null
@@ -1,54 +0,0 @@
-{{ define "styles" }}
-{{ $author := partial "author-user.html" . }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
-
- tab-list a[href="{{ .Site.BaseURL }}/{{ $author }}/drafts/"] {
- color: #111;
- color: var(--foreground);
- display: inherit;
- font-weight: 700;
- text-decoration-color: #014cc6;
- text-decoration-color: var(--link);
- text-decoration: underline;
- }
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
- (dict
- "Title" "Drafts"
- "Subtitle" (partial "count-drafts.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
- }}
-
- {{ partial "profile.html" . }}
-
- {{- $author := partial "author-user.html" . -}}
- {{- $users := where .Site.RegularPages "Section" $author -}}
- {{- $drafts := where .Site.RegularPages "Draft" true -}}
- {{- $filteredPages := $users | intersect $drafts -}}
- {{- $paginator := .Paginate $filteredPages }}
-
- {{ range $paginator.Pages }}
- {{ .Render "summary" }}
- {{ else }}
- <footer>
- <code>No drafts found!</code>
- </footer>
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right.html" . -}}
-{{ end }}
diff --git a/themes/default/layouts/_default/feeds.html b/themes/default/layouts/_default/feeds.html
deleted file mode 100644
index 332c455..0000000
--- a/themes/default/layouts/_default/feeds.html
+++ /dev/null
@@ -1,50 +0,0 @@
-{{ define "styles" }}
-{{ $author := partial "author-user.html" . }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
-
- tab-list a[href="{{ .Site.BaseURL }}/{{ $author }}/feeds/"] {
- color: #111;
- color: var(--foreground);
- display: inherit;
- font-weight: 700;
- text-decoration-color: #014cc6;
- text-decoration-color: var(--link);
- text-decoration: underline;
- }
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
- (dict
- "Title" "Feeds"
- "Subtitle" (partial "count-feeds.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
- }}
-
- {{ partial "profile.html" . }}
-
- {{ range .Paginator.Pages }}
- {{ .Render "summary" }}
- {{ else }}
- <footer>
- <code>No feeds found!</code>
- </footer>
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
- {{ partial "generate-feeds" . }}
-
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right.html" . -}}
-{{ end }}
diff --git a/themes/default/layouts/_default/home.archive-messages.html b/themes/default/layouts/_default/home.archive-messages.html
deleted file mode 100644
index d97694f..0000000
--- a/themes/default/layouts/_default/home.archive-messages.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{{ define "title" }}Message History &mdash; {{ end }}
-{{ define "description" }}This page contains an archive of all messages &mdash; {{ end }}
-{{ define "styles" }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/archives/messages/") | safeCSS }}
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
-{{ partial "navigator-middle.html"
- (dict
- "Title" "History"
- "Subtitle" (partial "count-total-messages.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
-}}
-
-<message-archive>
- <item-list>
- {{ $type := (partial "author-user.html" .) }}
- {{ range (.Site.RegularPages.GroupByDate "2006") }}
- {{ range (first 1 .Pages) }}
- <h1>{{ .Date.Format "2006" }}</h1>
- {{ end }}
- <ul>
- {{ range .Pages }}
- <li>
- <a title="{{ partial "title.html" . }}" href="{{ .RelPermalink }}#{{ partial "card-id.html" . }}">
- <span><code>{{ .Date.Format "02 Jan" }}</code></span>
- <span>{{ partial "title.html" . }}</span>
- <span>@{{ partial "author-user.html" . }}</span>
- </a>
- </li>
- {{ end }}
- </ul>
- {{ end }}
- </item-list>
-</message-archive>
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
diff --git a/themes/default/layouts/_default/home.archive-tags.html b/themes/default/layouts/_default/home.archive-tags.html
deleted file mode 100644
index 7fec925..0000000
--- a/themes/default/layouts/_default/home.archive-tags.html
+++ /dev/null
@@ -1,56 +0,0 @@
-{{ define "title" }}Tags Archive &mdash; {{ end }}
-{{ define "description" }}This page contains an archive of all tags &mdash; {{ end }}
-{{ define "styles" }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/archives/tags/") | safeCSS }}
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
-{{ partial "navigator-middle.html"
- (dict
- "Title" "Records"
- "Subtitle" (partial "count-tags.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
-}}
-
-{{- $page := 1 -}}
-{{- $count := 0 -}}
-
-<item-list>
- {{ range $taxonomy := .Site.Taxonomies }}
- {{ range $tag, $article := $taxonomy }}
- <h1><a href="{{ $.Site.BaseURL }}/tags/{{ $tag }}/">#{{ $tag }}</a></h1>
- <ul>
- {{ range $article.Pages -}}
- {{- $count = add $count 1 -}}
- <li>
- <a
- title="{{ partial "title.html" . }}"
- href="{{ .Site.BaseURL }}/tags/{{ $tag }}/{{ if gt $page 1 }}page/{{ $page }}/{{ end }}#{{ partial "card-id.html" . }}">
- <span><code>{{ .Date.Format "02 Jan 2006" }}</code></span>
- <span>{{ partial "title.html" . }}</span>
- <span>@{{ partial "author-user.html" . }}</span>
- </a>
- </li>
- {{ if eq (mod $count $.Paginator.PageSize) 0 }}
- {{ $page = add $page 1 }}
- {{- end -}}
- {{- end -}}
- {{- $page = 1 -}}
- {{- $count = 0 -}}
- </ul>
- {{ end }}
- {{ end }}
-</item-list>
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
diff --git a/themes/default/layouts/_default/home.archives.html b/themes/default/layouts/_default/home.archives.html
new file mode 100644
index 0000000..f443583
--- /dev/null
+++ b/themes/default/layouts/_default/home.archives.html
@@ -0,0 +1,67 @@
+{{- define "title" -}}Archives &mdash; {{ end -}}
+{{- define "description" -}}An archive of all items &mdash; {{ end -}}
+{{- define "styles" -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/archives/") | safeCSS }}
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "IconLabel" "Back"
+ "Id" "back"
+ "Title" "Archives"
+ "Icon" "arrow-left"
+ "Subtitle" (print (partial "count.html" .) " " "Total")
+ "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
+ )
+ -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ <archive-list>
+ <time-line>
+ {{ range (.Paginator.Pages.GroupByDate "2006") }}
+ {{ range (first 1 .Pages) }}
+ <h1>{{ .Date | time.Format "2006" }}</h1>
+ {{ end }}
+ <ul>
+ {{ range .Pages }}
+ {{- $author := .Page.Section -}}
+ <li>
+ <a
+ title="{{ partial "meta-title.html" . }}"
+ href="{{ .Permalink }}#{{ partial "card-id.html" . }}"
+ >
+ <code>
+ <time
+ data-type="disabled"
+ datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}"
+ title="{{ .Date | time.Format "Posted: Monday January 2 2006 at 15:04:05 MST" }}"
+ >
+ {{ .Date | time.Format "02 Jan" }}
+ </time>
+ </code>
+ <section>
+ <h2>{{ partial "meta-title.html" . }}</h2>
+ <p>@{{ or .Params.feed.domain $author }}</p>
+ </section>
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </time-line>
+ </archive-list>
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.authors.html b/themes/default/layouts/_default/home.authors.html
index db67566..0662285 100644
--- a/themes/default/layouts/_default/home.authors.html
+++ b/themes/default/layouts/_default/home.authors.html
@@ -1,38 +1,41 @@
-{{ define "title" }}Authors &mdash; {{ end }}
-{{ define "description" }}This page contains a list of all authors &mdash; {{ end }}
-{{ define "styles" }}
+{{- define "title" -}}Authors &mdash; {{ end -}}
+{{- define "description" -}}A list of all authors &mdash; {{ end -}}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/authors/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/authors/") | safeCSS }}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
(dict
"Title" "Authors"
- "Subtitle" (partial "count-authors.html" .)
+ "Subtitle" (print (partial "count-authors.html" .) " " "Total")
"Icon" "arrow-left"
"IconLabel" "Back"
"Href" "/"
"Id" "back"
"Context" .
)
- }}
-
- {{ $authors := slice }}
+ -}}
+{{- end -}}
- {{- range $index, $data := .Site.Data -}}
- {{- $authors = $authors | append $data.user -}}
- {{- end -}}
+{{- define "middle" -}}
+ {{- partial "generate-authors" . -}}
- {{- range $author := (shuffle (uniq $authors)) -}}
- {{ $data := index $.Site.Data $author | default "default" }}
- {{ partial "author-card.html" (dict "Data" $data) }}
- {{ end }}
+ {{- $authors := partial "function-authors-slice.html" . -}}
-{{ end }}
+ {{- range $author := $authors -}}
+ {{- $data := index $.Site.Data.authors $author -}}
+ {{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
+ {{- partial "author-card.html" (dict
+ "Data" $data
+ "Date" $date
+ )
+ -}}
+ {{- end -}}
+{{- end -}}
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.authors.section.html b/themes/default/layouts/_default/home.authors.section.html
new file mode 100644
index 0000000..b0b1161
--- /dev/null
+++ b/themes/default/layouts/_default/home.authors.section.html
@@ -0,0 +1,20 @@
+{{- $authors := partial "function-authors-slice.html" . -}}
+
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if $modified -}}
+ {{- range $author := first 3 $authors -}}
+ {{- $data := index $.Site.Data.authors $author -}}
+ {{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
+ {{- partial "author-card.html" (dict
+ "Data" $data
+ "Date" $date
+ )
+ -}}
+ {{- end -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.browserconfig.xml b/themes/default/layouts/_default/home.browserconfig.xml
deleted file mode 100644
index 67bc7a3..0000000
--- a/themes/default/layouts/_default/home.browserconfig.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-{{- $icon := resources.Get .Site.Params.webmanifest.logo -}}
-
-{{- $mstile150 := $icon.Fit "150x150" -}}
-
-<?xml version="1.0" encoding="utf-8"?>
-<browserconfig>
- <msapplication>
- <tile>
- <square150x150logo src="{{ $mstile150.Permalink }}"/>
- <TileColor>#da532c</TileColor>
- </tile>
- </msapplication>
-</browserconfig>
diff --git a/themes/default/layouts/_default/home.rss-style.xsl b/themes/default/layouts/_default/home.rss-style.xsl
deleted file mode 100644
index b537d38..0000000
--- a/themes/default/layouts/_default/home.rss-style.xsl
+++ /dev/null
@@ -1,146 +0,0 @@
-{{- print "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | safeHTML }}
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="3.0">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:template match="/">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- {{ print "<title><xsl:value-of select=\"/rss/channel/title\"/> Web Feed</title>" | safeHTML }}
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
- {{- $default := resources.Get "css/default.css" -}}
- {{- if .Site.Params.site.production -}}
- {{ $css := slice $default | resources.Concat "css/bundle.css" | resources.Minify | fingerprint }}
- <link rel="stylesheet" type="text/css" href="{{ $css.Permalink }}"/>
- {{- else }}
- <link rel="stylesheet" type="text/css" href="{{ $default.Permalink }}"/>
- {{- end }}
- </head>
- <body>
- <column-left>
- </column-left>
- <column-middle>
- <main>
- <nav>
- <icon-button>
- <a id="back" href="/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/arrow-left.svg")) }}
- <small>Back</small>
- </a>
- </icon-button>
-
- <section>
- <h2><xsl:value-of select="/rss/channel/title"/> Feed</h2>
- <small>Web Feed Preview</small>
- </section>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-home" href="/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/home.svg")) }}
- <small>Home</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-tag" href="/tags/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/tag.svg")) }}
- <small>Tags</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-clock" href="/archives/messages/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/tabler/clock.svg")) }}
- <small>History</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-book-2" href="/archives/tags/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/tabler/book-2.svg")) }}
- <small>Records</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-users" href="/authors/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/users.svg")) }}
- <small>Authors</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-rss" href="/rss.xml">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/rss.svg")) }}
- <small>RSS</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-circle" href="/index.json">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/circle.svg")) }}
- <small>JSON</small>
- </a>
- </icon-button>
- </icon-navigator>
-
- <icon-navigator hidden="">
- <icon-button>
- <a id="nav-middle-git-commit" href="/sources/">
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/git-commit.svg")) }}
- <small>Sources</small>
- </a>
- </icon-button>
- </icon-navigator>
- </nav>
- <navigation-separator><hr hidden=""></hr></navigation-separator>
- <xsl:for-each select="/rss/channel/item">
- <micro-card>
- <micro-summary>
- <micro-thumbnail>
- <figure>
- <a><xsl:attribute name="href"><xsl:value-of select="/rss/channel/link"/></xsl:attribute>
- <picture>
- <img
- loading="lazy"
- >
- <xsl:attribute name="alt"><xsl:value-of select="/rss/channel/category"/></xsl:attribute>
- <xsl:attribute name="title"><xsl:value-of select="/rss/channel/category"/></xsl:attribute>
- <xsl:attribute name="src">{{ .Site.BaseURL }}/<xsl:value-of select="/rss/channel/category"/>/media/profile/picture.png</xsl:attribute>
- </img>
- </picture>
- </a>
- </figure>
- </micro-thumbnail>
- <micro-content>
- <h2>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
- <xsl:value-of select="title" />
- </a>
- </h2>
- <small> Published: <xsl:value-of select="pubDate" /> </small>
- </micro-content>
- </micro-summary>
- </micro-card>
- </xsl:for-each>
- </main>
- </column-middle>
- <column-right>
- </column-right>
- </body>
- </html>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/themes/default/layouts/_default/home.settings.html b/themes/default/layouts/_default/home.settings.html
new file mode 100644
index 0000000..84e8080
--- /dev/null
+++ b/themes/default/layouts/_default/home.settings.html
@@ -0,0 +1,32 @@
+{{- define "title" -}}Settings &mdash; {{ end -}}
+{{- define "description" -}}A list of all interface settings &mdash; {{ end -}}
+{{- define "styles" -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/settings/") | safeCSS }}
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "IconLabel" "Back"
+ "Id" "back"
+ "Title" "Settings"
+ "Icon" "arrow-left"
+ "Subtitle" "Interface"
+ "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
+ )
+ -}}
+{{- end -}}
+
+{{- define "middle" -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.sources.html b/themes/default/layouts/_default/home.sources.html
index 424180a..32f7822 100644
--- a/themes/default/layouts/_default/home.sources.html
+++ b/themes/default/layouts/_default/home.sources.html
@@ -1,41 +1,53 @@
-{{ define "title" }}Sources &mdash; {{ end }}
-{{ define "description" }}This page contains a list of all source files &mdash; {{ end }}
-{{ define "styles" }}
+{{- define "title" -}}Sources &mdash; {{ end -}}
+{{- define "description" -}}A list of all sources &mdash; {{ end -}}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/sources/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/sources/") | safeCSS }}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
+{{- define "header" -}}
+ {{- $_default := readDir (print "/themes/default/layouts/_default") -}}
+ {{- $_markup := readDir (print "/themes/default/layouts/_default/_markup") -}}
+ {{- $partials := readDir (print "/themes/default/layouts/partials") -}}
+ {{- $shortcodes := readDir (print "/themes/default/layouts/shortcodes") -}}
- {{ $_default := readDir (print "/themes/default/layouts/_default") }}
- {{ $_markup := readDir (print "/themes/default/layouts/_default/_markup") }}
- {{ $partials := readDir (print "/themes/default/layouts/partials") }}
- {{ $shortcodes := readDir (print "/themes/default/layouts/shortcodes") }}
+ {{- $fileCount := add
+ (add
+ (sub (len $_default) 1)
+ (len $_markup))
+ (add
+ (len $partials)
+ (len $shortcodes))
+ -}}
- {{ $fileCount := add (len $shortcodes) (len $partials) }}
-
- {{ partial "navigator-middle.html"
+ {{- partial "navigator-middle.html"
(dict
"Title" "Sources"
- "Subtitle" (print $fileCount " " "Files")
+ "Subtitle" (print $fileCount " " "Total")
"Icon" "arrow-left"
"IconLabel" "Back"
"Href" "/"
"Id" "back"
"Context" .
)
- }}
+ -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- $_default := readDir (print "/themes/default/layouts/_default") -}}
+ {{- $_markup := readDir (print "/themes/default/layouts/_default/_markup") -}}
+ {{- $partials := readDir (print "/themes/default/layouts/partials") -}}
+ {{- $shortcodes := readDir (print "/themes/default/layouts/shortcodes") -}}
<source-files>
<item-list>
-
<h1>Defaults</h1>
<ul>
{{ range sort $_default ".ModTime" "desc" }}
{{ if not .IsDir }}
<li>
- <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/_default/{{ .Name }}">
+ <a download="" title="{{ .Name }}" href="{{ "sources/files/_default" | relURL }}/{{ .Name }}">
<span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span>
<span><code>{{ .Name }}</code></span>
<span><code>{{ .Size -}}</code></span>
@@ -50,7 +62,7 @@
{{ range sort $_markup ".ModTime" "desc" }}
{{ if not .IsDir }}
<li>
- <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/_default/_markup/{{ .Name }}">
+ <a download="" title="{{ .Name }}" href="{{ "sources/files/_default/_markup" | relURL }}/{{ .Name }}">
<span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span>
<span><code>{{ .Name }}</code></span>
<span><code>{{ .Size -}}</code></span>
@@ -65,7 +77,7 @@
{{ range sort $partials ".ModTime" "desc" }}
{{ if not .IsDir }}
<li>
- <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/partials/{{ .Name }}">
+ <a download="" title="{{ .Name }}" href="{{ "sources/files/partials" | relURL }}/{{ .Name }}">
<span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span>
<span><code>{{ .Name }}</code></span>
<span><code>{{ .Size -}}</code></span>
@@ -80,7 +92,7 @@
{{ range sort $shortcodes ".ModTime" "desc" }}
{{ if not .IsDir }}
<li>
- <a download title="{{ .Name }}" href="{{ $.Site.BaseURL }}/sources/files/shortcodes/{{ .Name }}">
+ <a download="" title="{{ .Name }}" href="{{ "sources/files/shortcodes" | relURL }}/{{ .Name }}">
<span><code>{{- .ModTime | time.Format "2006-01-02 15:04 MST" }}</code></span>
<span><code>{{ .Name }}</code></span>
<span><code>{{ .Size -}}</code></span>
@@ -93,20 +105,18 @@
<footer>
<p>
- Canory Version: 0.8.13
- &middot; Dictionary Access by Paul Lutus: <a href="https://arachnoid.com/javascript/dictionary_access.js">GPLv2+ License</a>
- &middot; Feather Icons by Cole Bemis: <a href="https://github.com/feathericons/feather/blob/8b5d6802fa8fd1eb3924b465ff718d2fa8d61efe/LICENSE">MIT License</a>
- &middot; Tabler Icons by Paweł Kuna: <a href="https://github.com/tabler/tabler-icons/blob/60f39297d0f785f2e8635faca6857b2260b2d164/LICENSE">MIT License</a>
- &middot; Instant Page by Alexandre Dieulot: <a href="https://github.com/instantpage/instant.page/blob/729e97d5b3245552e41d8f92ed03d08f1d62ea46/LICENSE">MIT License</a>
- &middot; Fixed Search by Heracles Papatheodorou: <a href="https://gist.github.com/Arty2/8b0c43581013753438a3d35c15091a9f#file-license-md">License</a>
- &middot; Fuzzy Sort by Stephen Kamenar: <a href="https://github.com/farzher/fuzzysort/blob/e7f484a124f09bf3cb9a4db366a95457d962dbed/LICENSE">MIT License</a>
+ Canory Version: {{ "{{% version number %}}" | markdownify }}
+ &middot; Dictionary Access by Paul Lutus: <a href="https://arachnoid.com/javascript/dictionary_access.js">GPLv2+ Licence</a>
+ &middot; Feather Icons by Cole Bemis: <a href="https://github.com/feathericons/feather/blob/8b5d6802fa8fd1eb3924b465ff718d2fa8d61efe/Licence">MIT Licence</a>
+ &middot; Tabler Icons by Paweł Kuna: <a href="https://github.com/tabler/tabler-icons/blob/60f39297d0f785f2e8635faca6857b2260b2d164/Licence">MIT Licence</a>
+ &middot; Instant Page by Alexandre Dieulot: <a href="https://github.com/instantpage/instant.page/blob/729e97d5b3245552e41d8f92ed03d08f1d62ea46/Licence">MIT Licence</a>
+ &middot; Fixed Search by Heracles Papatheodorou: <a href="https://gist.github.com/Arty2/8b0c43581013753438a3d35c15091a9f#file-Licence-md">MIT Licence</a>
+ &middot; Fuzzy Sort by Stephen Kamenar: <a href="https://github.com/farzher/fuzzysort/blob/e7f484a124f09bf3cb9a4db366a95457d962dbed/Licence">MIT Licence</a>
</p>
</footer>
-
</source-files>
+{{- end -}}
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/home.xslt.rss.xsl b/themes/default/layouts/_default/home.xslt.rss.xsl
new file mode 100644
index 0000000..587d119
--- /dev/null
+++ b/themes/default/layouts/_default/home.xslt.rss.xsl
@@ -0,0 +1,104 @@
+{{- printf `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
+ version="1.1"
+>
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" />
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" data-xml="" data-document="xhtml">
+ <head>
+ {{ printf `<title><xsl:value-of select="/rss/channel/title" /> Web Feed</title>` | safeHTML }}
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
+ {{- partial "head-css.html" . -}}
+ {{- partial "head-js.html" . -}}
+ </head>
+ <body>
+ <column-base position="left"></column-base>
+ <column-base position="middle">
+ <nav>
+ <icon-button>
+ <a id="back" target="_self">
+ <xsl:choose>
+ <xsl:when test="/rss/channel/atom:link[@rel='previous']/@href">
+ <xsl:attribute name="href">
+ <xsl:value-of select="/rss/channel/atom:link[@rel='previous']/@href" />
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">/</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
+ <small>Back</small>
+ </a>
+ </icon-button>
+ <section>
+ <h2><xsl:value-of select="/rss/channel/title" />'s Feed</h2>
+ <small>Web Feed Preview</small>
+ </section>
+ <xsl:if test="/rss/channel/atom:link[@rel='next']/@href">
+ <icon-button>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="/rss/channel/atom:link[@rel='next']/@href" />
+ </xsl:attribute>
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }}
+ <small>Next</small>
+ </a>
+ </icon-button>
+ </xsl:if>
+ {{ if .Site.Menus.main }}
+ {{ range .Site.Menus.main }}
+ <icon-navigator hidden="">
+ <icon-button>
+ <a id="nav-middle-{{ path.Base .Identifier }}" href="{{ .URL | absURL }}">
+ {{ with .Identifier }}
+ {{ $icon := print (partial "function-paths.html").static "/icons/" . ".svg" }}
+ {{ safeHTML (readFile $icon) }}
+ {{ end }}
+ <small>{{ delimit (first 1 (split .Name " ")) " " }}</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+ {{ end }}
+ {{ end }}
+ </nav>
+ <main>
+ <xsl:for-each select="/rss/channel/item">
+ <micro-card>
+ <header>
+ <figure>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
+ <span>
+ <object>
+ <xsl:attribute name="title"><xsl:value-of select="atom:author/atom:name" /></xsl:attribute>
+ <xsl:attribute name="data"><xsl:value-of select="atom:author/atom:uri" /></xsl:attribute>
+ <xsl:value-of select="substring(atom:author/atom:name, 1, 1)" />
+ </object>
+ </span>
+ </a>
+ </figure>
+ </header>
+ <article>
+ <h2>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
+ <xsl:value-of select="title" />
+ </a>
+ </h2>
+ <small>Published: <xsl:value-of select="pubDate" /></small>
+ </article>
+ </micro-card>
+ </xsl:for-each>
+ </main>
+ </column-base>
+ <column-base position="right"></column-base>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/themes/default/layouts/_default/home.xslt.sitemap.xsl b/themes/default/layouts/_default/home.xslt.sitemap.xsl
new file mode 100644
index 0000000..e0be723
--- /dev/null
+++ b/themes/default/layouts/_default/home.xslt.sitemap.xsl
@@ -0,0 +1,90 @@
+{{- printf `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
+ version="1.1"
+>
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" data-xml="sitemap" data-document="xhtml">
+ <head>
+ <title>{{ $.Site.Title }} Site Map</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
+ {{- partial "head-css.html" . -}}
+ {{- partial "head-js.html" . -}}
+ </head>
+ <body>
+ <column-base position="left"></column-base>
+ <column-base position="middle">
+ <nav>
+ <icon-button>
+ <a id="back" target="_self" href="/">
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
+ <small>Back</small>
+ </a>
+ </icon-button>
+ <section>
+ <h2>{{ $.Site.Title }} Site Map</h2>
+ <small>Site Map Preview</small>
+ </section>
+ {{ if .Site.Menus.main }}
+ {{ range .Site.Menus.main }}
+ <icon-navigator hidden="">
+ <icon-button>
+ <a
+ id="nav-middle-{{ path.Base .Identifier }}"
+ href="{{ .URL | absURL }}"
+ >
+ {{ with .Identifier }}
+ {{ $icon := print (partial "function-paths.html").static "/icons/" . ".svg" }}
+ {{ safeHTML (readFile $icon) }}
+ {{ end }}
+ <small>{{ delimit (first 1 (split .Name " ")) " " }}</small>
+ </a>
+ </icon-button>
+ </icon-navigator>
+ {{ end }}
+ {{ end }}
+ </nav>
+ <main>
+ <navigation-separator><hr hidden=""></hr></navigation-separator>
+ <section>
+ <table>
+ <thead>
+ <tr>
+ <th align="left">
+ <code>
+ <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/>
+ Uniform Resource Locators (URLs)
+ </code>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
+ <tr>
+ <td>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="sitemap:loc" />
+ </xsl:attribute>
+<xsl:attribute name="title">Last Modified: <xsl:value-of select="sitemap:lastmod" />
+Frequency: <xsl:value-of select="sitemap:changefreq" />
+Priority: <xsl:value-of select="sitemap:priority" />
+ </xsl:attribute>
+ <xsl:value-of select="sitemap:loc" />
+ </a>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </section>
+ </main>
+ </column-base>
+ <column-base position="right"></column-base>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/themes/default/layouts/_default/index.html b/themes/default/layouts/_default/index.html
new file mode 100644
index 0000000..f25cabf
--- /dev/null
+++ b/themes/default/layouts/_default/index.html
@@ -0,0 +1,34 @@
+{{- define "styles" -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "Title" "Home"
+ "Subtitle" (print (partial "count.html" .) " " "Total")
+ "IconLabel" (and (gt .Paginator.PageNumber 1) "Back")
+ "Id" (and (gt .Paginator.PageNumber 1) "back")
+ "Icon" (and (gt .Paginator.PageNumber 1) "arrow-left")
+ "Href" (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL))
+ )
+ -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/index.json b/themes/default/layouts/_default/index.json
index 63f8445..9484e60 100644
--- a/themes/default/layouts/_default/index.json
+++ b/themes/default/layouts/_default/index.json
@@ -1,25 +1,30 @@
+{{- define "main" -}}
+
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ .Site.Title }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ .Site.BaseURL }}/index.json",
+ {{- with .Paginator.Next }}
+ "next_url": "{{ .URL | absURL }}",
+ {{- end }}
"items": [
- {{- range $index, $data := .Site.RegularPages -}}
- {{- if and (ne $data.Type "json") (not .ExpiryDate) (not .Params.unlisted) -}}
+ {{- $filteredPages := partial "function-filters-content.html" .Paginator.Pages -}}
+ {{- range $index, $data := $filteredPages -}}
{{- if and $index (gt $index 0) -}},{{- end }}
{
- "id": "{{ md5 $data.Permalink }}",
+ "id": "{{ sha256 $data.Permalink }}",
"url": "{{ $data.Permalink }}",
- "title": "{{ $data.Summary | htmlUnescape }}",
- "summary": "{{ $data.Summary | htmlUnescape }}",
+ "title": {{ $data.Summary | htmlUnescape | jsonify }},
+ "summary": {{ $data.Summary | htmlUnescape | jsonify }},
"date_modified": "{{ $data.Date | time.Format "2006-01-02T15:04:05Z" }}",
"date_published": "{{ $data.PublishDate | time.Format "2006-01-02T15:04:05Z" }}",
"_metadata": {
- "slug": "{{ $data.Slug }}",
+ "kind": "{{ $data.Kind }}",
"type": "{{ $data.Type }}"
},
"author": {
- "name": "{{ partial "author-user.html" . }}"
+ "name": "{{ $data.Type }}"
},
"tags": [
{{- range $tags, $tag := $data.Params.tags -}}
@@ -32,9 +37,10 @@
{{- end -}}
],
"content_text": {{ $data.Plain | jsonify }},
- "content_html": {{ $data.Content | jsonify }}
+ "content_html": {{ partial "function-content.html" $data | jsonify }}
}
- {{- end -}}
- {{ end }}
+ {{- end }}
]
}
+
+{{- end -}}
diff --git a/themes/default/layouts/_default/index.webmanifest b/themes/default/layouts/_default/index.webmanifest
deleted file mode 100644
index f7b3f66..0000000
--- a/themes/default/layouts/_default/index.webmanifest
+++ /dev/null
@@ -1,24 +0,0 @@
-{{- $icon := resources.Get .Site.Params.webmanifest.logo -}}
-
-{{- $androidChrome192 := $icon.Fit "192x192" -}}
-{{- $androidChrome512 := $icon.Fit "512x512" -}}
-
-{
- "name": "{{ .Site.Params.webmanifest.name }}",
- "short_name": "{{ .Site.Params.webmanifest.shortName }}",
- "icons": [
- {
- "src": "{{ $androidChrome192.Permalink }}",
- "sizes": "192x192",
- "type": "image/png"
- },
- {
- "src": "{{ $androidChrome512.Permalink }}",
- "sizes": "512x512",
- "type": "image/png"
- }
- ],
- "theme_color": "{{ .Site.Params.webmanifest.themeColor }}",
- "background_color": "{{ .Site.Params.webmanifest.backgroundColor }}",
- "display": "{{ .Site.Params.webmanifest.display }}"
-}
diff --git a/themes/default/layouts/_default/likes.html b/themes/default/layouts/_default/likes.html
deleted file mode 100644
index f37159c..0000000
--- a/themes/default/layouts/_default/likes.html
+++ /dev/null
@@ -1,54 +0,0 @@
-{{ define "styles" }}
-{{ $author := partial "author-user.html" . }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
-
- tab-list a[href="{{ .Site.BaseURL }}/{{ $author }}/likes/"] {
- color: #111;
- color: var(--foreground);
- display: inherit;
- font-weight: 700;
- text-decoration-color: #014cc6;
- text-decoration-color: var(--link);
- text-decoration: underline;
- }
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
- (dict
- "Title" "Likes"
- "Subtitle" (partial "count-likes.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
- }}
-
- {{ partial "profile.html" . }}
-
- {{- $author := partial "author-user.html" . -}}
- {{- $users := where .Site.RegularPages "Section" $author -}}
- {{- $likes := where .Site.RegularPages ".Params.liked" true -}}
- {{- $filteredPages := $users | intersect $likes -}}
- {{- $paginator := .Paginate $filteredPages }}
-
- {{ range $paginator.Pages }}
- {{ .Render "summary" }}
- {{ else }}
- <footer>
- <code>No likes found!</code>
- </footer>
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right.html" . -}}
-{{ end }}
diff --git a/themes/default/layouts/_default/list.html b/themes/default/layouts/_default/list.html
deleted file mode 100644
index 5cc563b..0000000
--- a/themes/default/layouts/_default/list.html
+++ /dev/null
@@ -1,36 +0,0 @@
-{{ define "styles" }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
- (dict
- "Title" "Home"
- "Subtitle" (partial "count-total-messages.html" .)
- "Context" .
- )
- }}
-
- {{ range .Paginator.Pages }}
- {{ .Render "summary" }}
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
-{{ end }}
-
-{{ define "right" }}
- {{- partial "author-list.html" . -}}
-
- {{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.picturegallery) }}
- {{- partial "gallery-images.html" . -}}
- {{ end }}
-
- {{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.webring) }}
- {{- partial "web-ring.html" . -}}
- {{ end }}
-
-{{ end }}
diff --git a/themes/default/layouts/_default/media.html b/themes/default/layouts/_default/media.html
deleted file mode 100644
index f4bb3a9..0000000
--- a/themes/default/layouts/_default/media.html
+++ /dev/null
@@ -1,68 +0,0 @@
-{{ define "styles" }}
-{{ $author := partial "author-user.html" . }}
-<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
-
- tab-list a[href="{{ .Site.BaseURL }}/{{ $author }}/media/"] {
- color: #111;
- color: var(--foreground);
- display: inherit;
- font-weight: 700;
- text-decoration-color: #014cc6;
- text-decoration-color: var(--link);
- text-decoration: underline;
- }
-</style>
-{{ end }}
-
-{{ define "middle" }}
-
- {{ partial "navigator-middle.html"
- (dict
- "Title" "Media"
- "Subtitle" (partial "count-media.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
- }}
-
- {{ partial "profile.html" . }}
-
- {{- $author := partial "author-user.html" . -}}
-
- {{ $count := 0 }}
- {{ $result := false }}
-
- {{ range .Site.Pages }}
- {{ if or
- (in .Content "<figure>")
- (in .Content "<imgur-video>")
- (in .Content "<youtube-video>")
- (in .Content "<video-container>")
- }}
- {{ if eq .Type $author }}
- {{ $result = true }}
- {{ $count = add $count 1 }}
- {{ if le $count 10 }}
- {{ .Render "summary" }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
-
- {{ if not $result }}
- <footer>
- <code>No media found!</code>
- </footer>
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right.html" . -}}
-{{ end }}
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml
index a09f9bf..16aee5f 100644
--- a/themes/default/layouts/_default/rss.xml
+++ b/themes/default/layouts/_default/rss.xml
@@ -1,40 +1,112 @@
-{{- $pctx := . -}}
-{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
-{{- $pages := $pctx.RegularPages -}}
+{{- define "main" -}}
+
+{{- $absURL := "" | absURL -}}
+
{{- $limit := .Site.Config.Services.RSS.Limit -}}
-{{- if ge $limit 1 -}}
-{{- $pages = $pages | first $limit -}}
+
+{{- if lt $limit 1 -}}
+ {{- $limit = .Paginator.TotalNumberOfElements -}}
+{{- end -}}
+
+{{- $lastBuildDate := now | time.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
+
+{{- if not .Date.IsZero -}}
+ {{- $lastBuildDate = .Date | time.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
+{{- end -}}
+
+{{- $title := partial "head-title.html" . -}}
+{{- $description := partial "head-title.html" . -}}
+{{- $author := partial "function-authors-data.html" . -}}
+{{- $image := print "/favicon.ico" -}}
+
+{{- if (eq .Page.Kind "section") -}}
+ {{- $title = $author.name -}}
+ {{- $description = $author.description | markdownify | html | htmlUnescape -}}
+ {{- $image = print "/" (partial "function-paths.html").media "/" .Section "/" .Section "-profile" (path.Ext $author.picture.profile) -}}
+{{- end -}}
+
+{{- if (eq .Page.Type "tags") -}}
+ {{- $title = print "#" (lower .Title) " -- " .Site.Title | markdownify | htmlUnescape -}}
+ {{- $description = print .Site.Title " Tags: #" .Title -}}
{{- end -}}
-{{- print "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
-{{- print "<?xml-stylesheet href=\"/rss.xsl\" type=\"text/xsl\"?>" | safeHTML }}
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+{{- $atomSelf := "" -}}
+{{- $atomPrevious := "" -}}
+{{- $atomNext := "" -}}
+
+{{- with .OutputFormats.Get "RSS" -}}
+ {{- $atomSelf = printf `<atom:link rel="self" href=%q type=%q />` .Permalink .MediaType | safeHTML -}}
+
+ {{- with $.Paginator.Prev -}}
+ {{- $atomPrevious = printf `<atom:link rel="previous" href=%q />` (.URL | absURL) | safeHTML -}}
+ {{- end -}}
+
+ {{- with $.Paginator.Next -}}
+ {{- $atomNext = printf `<atom:link rel="next" href=%q />` (.URL | absURL) | safeHTML -}}
+ {{- end -}}
+{{- end -}}
+
+{{- $filteredPages := partial "function-filters-content.html" .Paginator.Pages -}}
+
+{{- printf `<?xml version="1.0" encoding="utf-8" standalone="yes"?>` | safeHTML }}
+{{ printf `<?xml-stylesheet href="/rss.xsl" type="text/xsl"?>` | safeHTML }}
+
+<rss
+ version="2.0"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+>
<channel>
- <title>{{ partial "site-title" . }}</title>
+ <title>{{ or $title (title .Section) }}</title>
<link>{{ .Permalink }}</link>
- <description>Recent from {{ partial "site-title" . }}</description>
+ <description>{{ $description }}</description>
<language>{{ .Site.LanguageCode }}</language>
- <category>{{ partial "author-user" . }}</category>
+ <category>{{ or $author.user "default" }}</category>
+ <generator>Hugo {{ hugo.Version }}</generator>
+ <lastBuildDate>{{ $lastBuildDate }}</lastBuildDate>
<image>
- <title>{{ partial "site-title" . }}</title>
- <url>{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png</url>
+ <title>{{ $title }}</title>
+ <url>{{ $absURL }}{{ $image }}</url>
<link>{{ .Permalink }}</link>
</image>
- {{ 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 -}}
- {{ if and (not .Params.Unlisted) (not .ExpiryDate) }}
+
+ {{ $atomSelf }}
+ {{ $atomPrevious }}
+ {{ $atomNext }}
+
+ {{ range first $limit $filteredPages -}}
+
+ {{- $author = partial "function-authors-data.html" . -}}
+
+ {{- $image = print "/" (partial "function-paths.html").media
+ "/" $author.user "/" $author.user "-profile" (path.Ext $author.picture.profile)
+ -}}
+
+ {{- $atomAuthorUri := print $absURL $image -}}
+ {{- $atomAuthorName := or .Params.Feed.name $author.name -}}
+
+ {{- if .Params.Feed.favicon -}}
+ {{- $favicon := print "/" (partial "function-paths.html").media "/favicon." (.Params.Feed.source | anchorize) ".png" -}}
+ {{- $atomAuthorUri = print $absURL $favicon -}}
+ {{- end -}}
+
<item>
- <title>{{ .Summary | htmlUnescape }}</title>
- <link>{{ .Permalink }}</link>
- <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
+ <title>{{ (or .Summary .Title) | htmlUnescape }}</title>
+ <link>{{ or .Params.Feed.link .Permalink }}</link>
+ <pubDate>{{ .Date | time.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<guid>{{ .Permalink }}</guid>
- <description>{{ .Content | html }}</description>
+ <description>
+ {{ partial "function-content.html" . | html -}}
+ {{- print "<br /><br />" | html -}}
+ {{- printf `<a href=%q>Permalink</a>&nbsp;` .Permalink | html }}
+ {{ partial "tags.html" (dict "Format" "rss" "Context" .) | html }}
+ </description>
+ <atom:author>
+ <atom:name>{{ $atomAuthorName }}</atom:name>
+ <atom:uri>{{ $atomAuthorUri }}</atom:uri>
+ </atom:author>
</item>
- {{ end }}
- {{ end }}
+
+ {{ end -}}
</channel>
</rss>
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.drafts.html b/themes/default/layouts/_default/section.drafts.html
new file mode 100644
index 0000000..bb7485c
--- /dev/null
+++ b/themes/default/layouts/_default/section.drafts.html
@@ -0,0 +1,58 @@
+{{- define "styles" -}}
+{{- $author := partial "function-authors-data.html" . -}}
+{{- $author = $author.user -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
+
+ tab-bar a[href^="{{ "" | absURL }}/{{ $author }}/drafts"] {
+ color: #111;
+ color: var(--foreground);
+ font-weight: 700;
+ text-decoration-color: #014cc6;
+ text-decoration-color: var(--link);
+ text-decoration: underline;
+ border-bottom: 2px solid var(--background);
+ }
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ {{- $authors := where .Site.RegularPages "Section" $author.user -}}
+ {{- $drafts := where .Site.RegularPages "Draft" true -}}
+ {{- $filteredPages := $authors | intersect $drafts -}}
+ {{- $paginator := .Paginate $filteredPages -}}
+
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "IconLabel" "Back"
+ "Id" "back"
+ "Title" "Drafts"
+ "Icon" "arrow-left"
+ "Subtitle" (print (partial "count-drafts.html" .) " " "Total")
+ "Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Paginator.Prev.URL | absURL)) "/")
+ )
+ -}}
+
+ {{- partial "profile.html" . -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- else -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.feeds.html b/themes/default/layouts/_default/section.feeds.html
new file mode 100644
index 0000000..e239928
--- /dev/null
+++ b/themes/default/layouts/_default/section.feeds.html
@@ -0,0 +1,53 @@
+{{- define "styles" -}}
+{{- $author := partial "function-authors-data.html" . -}}
+{{- $author = $author.user -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
+
+ tab-bar a[href^="{{ "" | absURL }}/{{ $author }}/feeds"] {
+ color: #111;
+ color: var(--foreground);
+ font-weight: 700;
+ text-decoration-color: #014cc6;
+ text-decoration-color: var(--link);
+ text-decoration: underline;
+ border-bottom: 2px solid var(--background);
+ }
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "IconLabel" "Back"
+ "Id" "back"
+ "Title" "Feeds"
+ "Icon" "arrow-left"
+ "Subtitle" (print (partial "count-feeds.html" .) " " "Total")
+ "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
+ )
+ -}}
+
+ {{- partial "profile.html" . -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- else -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+ {{- $writeToFile := partial "function-generate-feeds" . -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.following.html b/themes/default/layouts/_default/section.following.html
new file mode 100644
index 0000000..2bfcc2e
--- /dev/null
+++ b/themes/default/layouts/_default/section.following.html
@@ -0,0 +1,75 @@
+{{- $parent := eq (len .Page.Ancestors) 1 -}}
+
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if (and $parent $modified) -}}
+ {{- $sources := slice -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ {{- $feeds := partial "function-generate-feeds.html" . -}}
+
+ {{- range $author.feeds.rss -}}
+ {{- $data := split . " " -}}
+ {{- $url := delimit (first 1 $data) "" -}}
+ {{- $sources = $sources | append (string $url) -}}
+ {{- end -}}
+
+ {{- range $source := $sources -}}
+ {{- range $distinct := first 1 (where $feeds "FeedSourceLink" "eq" $source) -}}
+
+ {{- $href := or $distinct.FeedHome (print "http://" $distinct.FeedSourceDomain) -}}
+ {{- $favicon := print "/" (partial "function-paths.html").media "/favicon." (.FeedSourceLink | anchorize) ".png" -}}
+
+ <micro-author>
+ <micro-card>
+ <header>
+ <figure>
+ <a
+ title="{{ $distinct.FeedName }}"
+ href="{{ $href }}">
+ <picture>
+ <img
+ width="64"
+ height="64"
+ alt="{{ $distinct.FeedName }}"
+ src="{{ $.Site.BaseURL }}{{ $favicon }}"
+ />
+ </picture>
+ </a>
+ </figure>
+ </header>
+ <article>
+ <h2>
+ <b>{{ $distinct.FeedName }}</b>
+ </h2>
+ <h3>
+ <a
+ data-hover
+ title="{{ $distinct.FeedName }}"
+ href="{{ $href }}">
+ @{{ $distinct.FeedSourceDomain }}
+ </a>
+ </h3>
+ <time
+ data-type="default"
+ title="{{ $distinct.FeedDateTitle }}"
+ datetime="{{ $distinct.FeedDateTime }}">
+ {{ $distinct.FeedDate -}}
+ </time>
+ </article>
+ <a
+ title="Follow {{ $distinct.FeedName }}"
+ href="{{ $href }}">
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/rss.svg")) }}
+ <span>Feed</span>
+ </a>
+ </micro-card>
+ </micro-author>
+
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.gallery.html b/themes/default/layouts/_default/section.gallery.html
new file mode 100644
index 0000000..761a276
--- /dev/null
+++ b/themes/default/layouts/_default/section.gallery.html
@@ -0,0 +1,12 @@
+{{- $parent := eq (len .Page.Ancestors) 1 -}}
+
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if (and $parent $modified) -}}
+ {{- partial "gallery-walk.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.html b/themes/default/layouts/_default/section.html
index 2708e89..901ca1f 100644
--- a/themes/default/layouts/_default/section.html
+++ b/themes/default/layouts/_default/section.html
@@ -1,50 +1,56 @@
-{{ define "styles" }}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
- tab-list a[href="{{ .CurrentSection.Permalink }}"],
- tab-list a[href="{{ strings.TrimRight "/" .CurrentSection.Permalink }}"] {
+ tab-bar a[href="{{ .CurrentSection.Permalink }}"],
+ tab-bar a[href^="{{ .CurrentSection.Permalink }}#"],
+ tab-bar a[href="{{ strings.TrimRight "/" .CurrentSection.Permalink }}"] {
color: #111;
color: var(--foreground);
- display: inherit;
font-weight: 700;
text-decoration-color: #014cc6;
text-decoration-color: var(--link);
text-decoration: underline;
+ border-bottom: 2px solid var(--background);
}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
+{{- define "header" -}}
+ {{- $author := partial "function-authors-data.html" . -}}
- {{- $messages := print (lang.FormatNumberCustom 0 .Paginator.TotalNumberOfElements) " " "Messages" -}}
-
- {{ partial "navigator-middle.html"
+ {{- partial "navigator-middle.html"
(dict
- "Title" (partial "author-name.html" .)
- "Subtitle" $messages
- "Icon" "arrow-left"
+ "Context" .
"IconLabel" "Back"
- "Href" "/"
"Id" "back"
- "Context" .
+ "Title" $author.name
+ "Icon" "arrow-left"
+ "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
+ "Subtitle" (print (lang.FormatNumberCustom 0 .Paginator.TotalNumberOfElements) " " "Total")
)
- }}
-
- {{ partial "profile.html" . }}
-
- {{ range .Paginator.Pages }}
- {{ .Render "summary" }}
- {{ else }}
- <footer>
- <code>No messages found!</code>
- </footer>
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right.html" . -}}
-{{ end }}
+ -}}
+
+ {{- partial "author-section-picture.html" . -}}
+
+ {{- partial "profile.html" . -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- else -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.marks.html b/themes/default/layouts/_default/section.marks.html
new file mode 100644
index 0000000..def6c94
--- /dev/null
+++ b/themes/default/layouts/_default/section.marks.html
@@ -0,0 +1,58 @@
+{{- define "styles" -}}
+{{- $author := partial "function-authors-data.html" . -}}
+{{- $author = $author.user -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
+
+ tab-bar a[href^="{{ "" | absURL }}/{{ $author }}/marks"] {
+ color: #111;
+ color: var(--foreground);
+ font-weight: 700;
+ text-decoration-color: #014cc6;
+ text-decoration-color: var(--link);
+ text-decoration: underline;
+ border-bottom: 2px solid var(--background);
+ }
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ {{- $authors := where .Site.RegularPages "Section" $author.user -}}
+ {{- $items := where .Site.RegularPages ".Params.marked" true -}}
+ {{- $filteredPages := $authors | intersect $items -}}
+ {{- $paginator := .Paginate $filteredPages -}}
+
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "IconLabel" "Back"
+ "Id" "back"
+ "Title" "Marks"
+ "Icon" "arrow-left"
+ "Subtitle" (print (partial "count-marks.html" .) " " "Total")
+ "Href" (or (and (gt $paginator.PageNumber 1) ($paginator.Prev.URL | absURL)) "/")
+ )
+ -}}
+
+ {{- partial "profile.html" . -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- else -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+{{- end -}}
+
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.media.html b/themes/default/layouts/_default/section.media.html
new file mode 100644
index 0000000..ce570c7
--- /dev/null
+++ b/themes/default/layouts/_default/section.media.html
@@ -0,0 +1,65 @@
+{{- define "styles" -}}
+{{- $author := partial "function-authors-data.html" . -}}
+{{- $author = $author.user -}}
+<style>
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
+
+ tab-bar a[href^="{{ "" | absURL }}/{{ $author }}/media"] {
+ color: #111;
+ color: var(--foreground);
+ font-weight: 700;
+ text-decoration-color: #014cc6;
+ text-decoration-color: var(--link);
+ text-decoration: underline;
+ border-bottom: 2px solid var(--background);
+ }
+</style>
+{{- end -}}
+
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Title" "Media"
+ "Subtitle" (print (partial "count-media.html" .) " " "Total")
+ "Icon" "arrow-left"
+ "IconLabel" "Back"
+ "Href" "/"
+ "Id" "back"
+ "Context" .
+ )
+ -}}
+
+ {{- partial "profile.html" . -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ {{- $notFeeds := where .Site.RegularPages "Params.feed" "eq" nil -}}
+ {{- $authors := where .Site.RegularPages "Section" $author.user -}}
+ {{- $filteredPages := $authors | intersect $notFeeds -}}
+ {{- $count := 0 -}}
+
+ {{- range first 100 $filteredPages -}}
+ {{- if eq $count 10 -}}
+ {{- break -}}
+ {{- end -}}
+ {{- if or
+ (in .Content "</video>")
+ (in .Content "</picture>")
+ (in .Content "</youtube-video>")
+ -}}
+ {{- partial "render-embed.html" . -}}
+ {{- $count = add $count 1 -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- if not $count -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/section.webring.html b/themes/default/layouts/_default/section.webring.html
new file mode 100644
index 0000000..58181e1
--- /dev/null
+++ b/themes/default/layouts/_default/section.webring.html
@@ -0,0 +1,66 @@
+{{- $parent := eq (len .Page.Ancestors) 1 -}}
+
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if (and $parent $modified) -}}
+ {{- $items := slice -}}
+ {{- $sources := slice -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ {{- $feeds := partial "function-generate-feeds.html" . -}}
+
+ {{- range $author.feeds.rss -}}
+ {{- $data := split . " " -}}
+ {{- $url := delimit (first 1 $data) "" -}}
+ {{- $sources = $sources | append (string $url) -}}
+ {{- end -}}
+
+ {{- $inner := 1 -}}
+
+ {{- if eq (len $sources) 1 -}}
+ {{- $inner = 3 -}}
+ {{- end -}}
+
+ {{- range $source := (first 3 $sources) -}}
+ {{- range $distinct := first $inner (where $feeds "FeedSourceLink" "eq" $source) -}}
+ {{- $items = $items | append $distinct -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- range (sort $items "FeedDateTime" "desc") -}}
+ <article>
+ <h2>
+ <a
+ data-hover
+ title="{{ .FeedLink }}"
+ href="{{ .FeedLink }}">
+ {{ or .FeedTitle (truncate 50 "..." (or .FeedContentShort .FeedDescriptionShort)) }}
+ </a>
+ </h2>
+ <p>
+ {{ if gt (len .FeedDescriptionShort) (len .FeedContentShort) -}}
+ {{ or .FeedDescriptionShort .FeedTitle }}
+ {{- else -}}
+ {{ or .FeedContentShort .FeedTitle }}
+ {{- end }}
+ <br />
+ <a
+ data-hover
+ title="{{ .FeedSourceDescription }}"
+ href="{{ or .FeedSourceHome .FeedSourceLink }}">
+ {{ .FeedSourceTitle }}
+ </a>
+ </p>
+ <time
+ data-type="default"
+ title="{{ .FeedDateTitle }}"
+ datetime="{{ .FeedDateTime }}">
+ {{ .FeedDate }}
+ </time>
+ </article>
+ {{- end -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/single.embed.html b/themes/default/layouts/_default/single.embed.html
new file mode 100644
index 0000000..73a3add
--- /dev/null
+++ b/themes/default/layouts/_default/single.embed.html
@@ -0,0 +1,26 @@
+{{- $pageContext := . -}}
+{{- $format := "embed.html" -}}
+
+{{- $page := print "public/" (strings.TrimPrefix
+ $pageContext.Page.Site.BaseURL
+ $pageContext.Page.Permalink
+ ) $format
+-}}
+
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" $pageContext
+ "Format" $format
+ )
+-}}
+
+{{- with $embed := resources.Get $page -}}
+ {{- if (in $embed.Content "/data/media/404.png") -}}
+ {{- $modified = true -}}
+ {{- end -}}
+{{- end -}}
+
+{{- if $modified -}}
+ {{- partial "head-embed.html" . -}}
+ {{- .Render "summary" -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/single.html b/themes/default/layouts/_default/single.html
index a32ae01..f3123b3 100644
--- a/themes/default/layouts/_default/single.html
+++ b/themes/default/layouts/_default/single.html
@@ -1,28 +1,81 @@
-{{ define "styles" }}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/") | safeCSS }}
</style>
-{{ end }}
-
-{{ define "middle" }}
-
-{{ partial "navigator-middle.html"
- (dict
- "Title" "Message"
- "Subtitle" "Single"
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
-}}
-
-<micro-thread>
- {{ .Render "summary" }}
-</micro-thread>
-{{ end }}
-
-{{ define "right" }}
- {{- partial "navigator-right.html" . -}}
-{{ end }}
+{{- end -}}
+
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Title" "Post"
+ "Subtitle" "Thread"
+ "Icon" "arrow-left"
+ "IconLabel" "Back"
+ "Href" "/"
+ "Id" "back"
+ "Context" .
+ )
+ -}}
+{{- end -}}
+
+{{- define "middle" -}}
+ <micro-thread>
+ {{- partial "render-embed.html" . -}}
+
+ {{- $prevHref := "/" -}}
+ {{- $nextHref := "/" -}}
+ {{- $prevTitle := "hidden" -}}
+ {{- $nextTitle := "hidden" -}}
+
+ {{- with .Next -}}
+ {{- $nextHref = $.Next.Permalink -}}
+ {{- $nextTitle = $.Next.Summary -}}
+ {{- end -}}
+
+ {{- with .Prev -}}
+ {{- $prevHref = $.Prev.Permalink -}}
+ {{- $prevTitle = $.Prev.Summary -}}
+ {{- end -}}
+
+ {{- with or .Next .Prev -}}
+ <nav data-type="pagination">
+ <a rel="next" href="{{ $nextHref }}" title="{{ $nextTitle }}">
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-left.svg")) }}
+ <header>Newer</header>
+ </a>
+
+ <a rel="prev" href="{{ $prevHref }}" title="{{ $prevTitle }}">
+ <header>Older</header>
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/arrow-right.svg")) }}
+ </a>
+ </nav>
+ {{- end -}}
+
+ {{- $filteredPages := partial "function-filters-content.html" (.Site.RegularPages.Related .) -}}
+ {{- $related := $filteredPages | first 3 -}}
+
+ {{- with $related -}}
+ <related-content>
+ <footer>
+ <samp>
+ Related Tags
+ {{- with $.Params.tags -}}
+ {{- range $tag := first 1 $.Params.tags -}}
+ {{- $link := print ("tags/" | relURL) ($tag | urlize) "/" }}
+ {{ print "---" " " "[#" $tag "](" $link ")" | markdownify -}}
+ {{- end -}}
+ {{- end -}}
+ </samp>
+ </footer>
+ </related-content>
+
+ {{- range $related -}}
+ {{- partial "render-embed.html" . -}}
+ {{- end -}}
+ {{- end -}}
+ </micro-thread>
+{{- end -}}
+
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/single.plain.txt b/themes/default/layouts/_default/single.plain.txt
new file mode 100644
index 0000000..f46e495
--- /dev/null
+++ b/themes/default/layouts/_default/single.plain.txt
@@ -0,0 +1,3 @@
+{{- define "main" -}}
+ {{- partial "function-content.html" . | plainify | htmlUnescape -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/sitemap.xml b/themes/default/layouts/_default/sitemap.xml
index 63f5119..f8ab315 100644
--- a/themes/default/layouts/_default/sitemap.xml
+++ b/themes/default/layouts/_default/sitemap.xml
@@ -1,22 +1,48 @@
-{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
- xmlns:xhtml="http://www.w3.org/1999/xhtml">
- {{ range .Data.Pages }}
- <url>
- <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
- <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
- <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
- <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
- <xhtml:link
- rel="alternate"
- hreflang="{{ .Language.Lang }}"
- href="{{ .Permalink }}"
- />{{ end }}
- <xhtml:link
- rel="alternate"
- hreflang="{{ .Language.Lang }}"
- href="{{ .Permalink }}"
- />{{ end }}
- </url>
+{{- printf `<?xml version="1.0" encoding="utf-8" standalone="yes"?>` | safeHTML }}
+{{ printf `<?xml-stylesheet href="/sitemap.xsl" type="text/xsl"?>` | safeHTML }}
+
+{{- $changefreq := "weekly" -}}
+{{- $priority := 0.5 -}}
+{{- $lastmod := now | time.Format "2006-01-02T15:04:05-07:00" }}
+
+<urlset
+ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+>
+ {{- $filteredPages := partial "function-filters-content.html" .Data.Pages.ByDate.Reverse -}}
+ {{- range $filteredPages }}
+
+ {{- with .Sitemap.ChangeFreq -}}
+ {{- $changefreq = . -}}
+ {{- end -}}
+
+ {{- if ge .Sitemap.Priority 0.0 -}}
+ {{- $priority = .Sitemap.Priority -}}
+ {{- end -}}
+
+ {{- if not .Lastmod.IsZero -}}
+ {{- $lastmod = safeHTML (.Lastmod | time.Format "2006-01-02T15:04:05-07:00") -}}
+ {{- end }}
+
+ <url>
+ <loc>{{ .Permalink }}</loc>
+ <lastmod>{{ $lastmod }}</lastmod>
+ <changefreq>{{ $changefreq }}</changefreq>
+ <priority>{{ $priority }}</priority>
+ {{- if .IsTranslated -}}
+ {{ range .Translations }}
+ <xhtml:link
+ rel="alternate"
+ hreflang="{{ .Language.Lang }}"
+ href="{{ .Permalink }}"
+ />
+ {{- end -}}
+ <xhtml:link
+ rel="alternate"
+ hreflang="{{ .Language.Lang }}"
+ href="{{ .Permalink }}"
+ />
+ {{ end }}
+ </url>
{{ end }}
</urlset>
diff --git a/themes/default/layouts/_default/summary.html b/themes/default/layouts/_default/summary.html
index 4e47898..e820b24 100644
--- a/themes/default/layouts/_default/summary.html
+++ b/themes/default/layouts/_default/summary.html
@@ -1,35 +1,22 @@
-<micro-card {{ if .Weight }}pinned{{ end }} id="{{ partial "card-id.html" . }}">
- {{ if .ExpiryDate }}<micro-expires>{{ end }}
- <micro-summary {{ if .Draft }}draft{{ end }} title="{{- partial "title.html" . -}}">
- <micro-thumbnail>
- {{ partial "profile-picture.html" . }}
- </micro-thumbnail>
- <micro-content>
- <micro-metadata>
- {{ partial "card-meta.html" . }}
- </micro-metadata>
- {{ if .Params.unsafe }}
- <micro-unsafe>
- <details>
- <summary>
- {{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/alert-circle.svg")) }}
- <span>Danger: Unsafe Content. <b><u>Click here</u></b> to show/hide</span>
- </summary>
- </details>
- <micro-unsafe-content>
- {{ end }}
- {{-
- .Content |
- replaceRE "<p>\n<figure>" "<figure>" |
- replaceRE "</figure></p>" "</figure>" |
- safeHTML
- -}}
- {{ if .Params.unsafe }}
- </micro-unsafe-content>
- </micro-unsafe>
- {{ end }}
- <micro-tags>{{ partial "tags.html" . }}</micro-tags>
- </micro-content>
- </micro-summary>
- {{ if .ExpiryDate }}</micro-expires>{{ end }}
+{{- $href := or .Params.Feed.link .Permalink -}}
+{{- $content := partial "function-content.html" . | safeHTML -}}
+{{- $expired := and .ExpiryDate (ge now.Unix .ExpiryDate.Unix) -}}
+
+<micro-card
+ id="{{ partial "card-id.html" . }}"
+ {{ if .Weight }}pinned{{ end }}
+ {{ if .Draft }}draft{{ end }}
+ {{ if .ExpiryDate }}data-expires{{ end }}
+>
+ <a href="{{ $href }}"></a>
+ <header>
+ {{ partial "profile-picture.html" . }}
+ {{ partial "card-meta-header.html" . }}
+ </header>
+ <article aria-label="article">
+ {{- $content -}}
+ <micro-tags>
+ {{- partial "tags.html" (dict "Format" "page" "Context" .) -}}
+ </micro-tags>
+ </article>
</micro-card>
diff --git a/themes/default/layouts/_default/taxonomy.html b/themes/default/layouts/_default/taxonomy.html
index 97b9bd1..5c8e2ba 100644
--- a/themes/default/layouts/_default/taxonomy.html
+++ b/themes/default/layouts/_default/taxonomy.html
@@ -1,62 +1,71 @@
-{{ define "styles" }}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/tags/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/tags/") | safeCSS }}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
+ (dict
+ "Context" .
+ "IconLabel" "Back"
+ "Id" "back"
+ "Title" "Tags"
+ "Icon" "arrow-left"
+ "Subtitle" (print (partial "count-tags.html" .) " " "Total")
+ "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
+ )
+ -}}
+{{- end -}}
- {{ $title := .Title }}
+{{- define "middle" -}}
+ <tag-deck>
+ {{- range .Paginator.Pages -}}
+ {{- $count := lang.FormatNumberCustom 0 (len .Data.Pages) -}}
+ {{- $title := lower .Title -}}
- {{ if eq .Title "Tags" }}
-
- {{ partial "navigator-middle.html"
- (dict
- "Title" "Tags"
- "Subtitle" (partial "count-tags.html" .)
- "Icon" "arrow-left"
- "IconLabel" "Back"
- "Href" "/"
- "Id" "back"
- "Context" .
- )
- }}
-
- {{- $page := 1 -}}
- {{- $count := 0 -}}
-
- {{ range .Paginator.Pages }}
- {{ $title := lower .Title }}
- <item-list>
- <h1><a href="{{ .Site.BaseURL }}/tags/{{ $title }}">#{{ .Title }}</a></h1>
- <ul>
- {{ range .Pages }}
- {{- $count = add $count 1 -}}
- <li>
- <a
- title="{{ partial "title.html" . }}"
- href="{{ .Site.BaseURL }}/tags/{{ $title }}/{{ if gt $page 1 }}page/{{ $page }}/{{ end }}#{{ partial "card-id.html" . }}">
- <span><code>{{ .Date.Format "02 Jan 2006" }}</code></span>
- <span>{{ partial "title.html" . }}</span>
- <span>@{{ partial "author-user.html" . }}</span>
+ {{- range first 1 .Pages -}}
+ {{- $author := partial "function-authors-data.html" . -}}
+ <tag-card>
+ <article>
+ <h2>
+ <code>
+ {{ $count }} in
+ <a data-hover href="{{ "" | absURL }}/tags/{{ $title }}/">
+ #{{ $title }}
+ </a>
+ </code>
+ </h2>
+ <figure>
+ <a href="{{ print ("" | absURL) "/tags/" $title "/#" (partial "card-id.html" .) }}">
+ <picture>
+ {{ partial "author-picture" . }}
+ </picture>
</a>
- </li>
- {{ if eq (mod $count $.Paginator.PageSize) 0 }}
- {{ $page = add $page 1 }}
- {{- end -}}
- {{- end -}}
- {{- $page = 1 -}}
- {{- $count = 0 -}}
- </ul>
- </item-list>
- {{ end }}
-
- {{ partial "pagination.html" . }}
-
- {{ end }}
+ </figure>
+ <time
+ datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}"
+ title="{{ .Date | time.Format "Posted: Monday, January 2, 2006 at 15:04:05 MST" }}"
+ >
+ {{ .Date | time.Format "02 Jan 2006" }}
+ </time>
+ <p>
+ <a data-hover href="{{ print ("" | absURL) "/tags/" $title "/#" (partial "card-id.html" .) }}">
+ {{ partial "meta-title.html" . }}
+ </a>
+ </p>
+ </article>
+ </tag-card>
+ {{- end -}}
+ {{- end -}}
+ </tag-deck>
+{{- end -}}
-{{ end }}
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}
diff --git a/themes/default/layouts/_default/term.html b/themes/default/layouts/_default/term.html
index 8f31575..4f0d92a 100644
--- a/themes/default/layouts/_default/term.html
+++ b/themes/default/layouts/_default/term.html
@@ -1,33 +1,34 @@
-{{ define "styles" }}
+{{- define "styles" -}}
<style>
- {{ partial "styles-navigator.html" (dict "Link" "/tags/") | safeCSS }}
+ {{ partial "navigator.css.html" (dict "Link" "/tags/") | safeCSS }}
</style>
-{{ end }}
+{{- end -}}
-{{ define "middle" }}
-
- {{- $terms := print (lang.FormatNumberCustom 0 (len .Data.Pages)) " " "Messages" -}}
-
- {{ partial "navigator-middle.html"
+{{- define "header" -}}
+ {{- partial "navigator-middle.html"
(dict
- "Title" (print "#" .Title)
- "Subtitle" $terms
- "Icon" "arrow-left"
+ "Context" .
"IconLabel" "Back"
- "Href" "/"
"Id" "back"
- "Context" .
+ "Icon" "arrow-left"
+ "Title" (print "#" .Title)
+ "Subtitle" (print (lang.FormatNumberCustom 0 (len .Data.Pages)) " " "Total")
+ "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/")
)
- }}
-
- {{ range .Paginator.Pages }}
- {{ .Render "summary" }}
- {{ end }}
+ -}}
+{{- end -}}
- {{ partial "pagination.html" . }}
+{{- define "middle" -}}
+ {{- range .Paginator.Pages -}}
+ {{- partial "render-embed.html" . -}}
+ {{- end -}}
+{{- end -}}
-{{ end }}
+{{- define "footer" -}}
+ {{- partial "pagination.html" . -}}
+ {{- partial "footer.html" . -}}
+{{- end -}}
-{{ define "right" }}
- {{- partial "navigator-right-default.html" . -}}
-{{ end }}
+{{- define "right" -}}
+ {{- partial "navigator-right.html" . -}}
+{{- end -}}