summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/_default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/blowfish/layouts/_default')
-rw-r--r--themes/blowfish/layouts/_default/list.html2
-rw-r--r--themes/blowfish/layouts/_default/rss.xml10
-rw-r--r--themes/blowfish/layouts/_default/single.html17
-rw-r--r--themes/blowfish/layouts/_default/taxonomy.html3
-rw-r--r--themes/blowfish/layouts/_default/term.html12
5 files changed, 27 insertions, 17 deletions
diff --git a/themes/blowfish/layouts/_default/list.html b/themes/blowfish/layouts/_default/list.html
index 9720468..7cc9238 100644
--- a/themes/blowfish/layouts/_default/list.html
+++ b/themes/blowfish/layouts/_default/list.html
@@ -30,10 +30,10 @@
var oid = "views_{{ $path }}"
var oid_likes = "likes_{{ $path }}"
</script>
- {{ end }}
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
+ {{ end }}
</header>
<section class="{{ if $toc -}}
mt-12
diff --git a/themes/blowfish/layouts/_default/rss.xml b/themes/blowfish/layouts/_default/rss.xml
index 741dcd7..eab2409 100644
--- a/themes/blowfish/layouts/_default/rss.xml
+++ b/themes/blowfish/layouts/_default/rss.xml
@@ -17,11 +17,11 @@
<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>
- <language>{{ site.LanguageCode }}</language>{{ with .Site.Author.email }}
- <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
- <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
+ <language>{{ site.LanguageCode }}</language>{{ with .Site.Params.Author.email }}
+ <managingEditor>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Params.Author.email }}
+ <webMaster>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
{{ if .Site.Params.footer.showCopyright | default true -}}
- <copyright>{{ with replace .Site.Params.copyright "{ year }" now.Year }}{{.}}{{ else }}© {{ now.Format "2006" }} {{ .Site.Author.name }}{{- end }}</copyright>
+ <copyright>{{ with replace .Site.Params.copyright "{ year }" now.Year }}{{.}}{{ else }}© {{ now.Format "2006" }} {{ .Site.Params.Author.name }}{{- end }}</copyright>
{{- end }}
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
@@ -32,7 +32,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
- {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
+ {{ with .Site.Params.Author.email }}<author>{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
{{ range ( where .Site.RegularPages ".RelPermalink" .RelPermalink | first 1 ) }}
diff --git a/themes/blowfish/layouts/_default/single.html b/themes/blowfish/layouts/_default/single.html
index ad07f7d..c0de7c4 100644
--- a/themes/blowfish/layouts/_default/single.html
+++ b/themes/blowfish/layouts/_default/single.html
@@ -46,7 +46,7 @@
{{- if $authorData -}}
{{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }}
- {{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }}
+ {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }}
{{ end }}
{{ end }}
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
@@ -81,6 +81,17 @@
<div class="article-content max-w-prose mb-20">
{{ .Content }}
+ {{ $defaultReplyByEmail := .Site.Params.replyByEmail }}
+ {{ $replyByEmail := default $defaultReplyByEmail .Params.replyByEmail }}
+ {{ if $replyByEmail }}
+ <strong class="block mt-8">
+ <a target="_blank"
+ class="m-1 rounded bg-neutral-300 p-1.5 text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
+ href="mailto:{{ .Site.Params.Author.email }}?subject={{ replace (printf "Reply to %s" .Title) "\"" "'" }}">
+ Reply by Email
+ </a>
+ </strong>
+ {{ end }}
</div>
{{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }}
@@ -95,7 +106,7 @@
{{- if $authorData -}}
{{ range $taxonomyname, $taxonomy := $taxonomies }}
{{ if (eq $taxonomyname $author) }}
- {{ $taxonomyLink = delimit (slice $baseURL "/authors/" $author) "" }}
+ {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }}
{{ end }}
{{ end }}
{{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }}
@@ -124,10 +135,10 @@
var oid = "views_{{ $path }}"
var oid_likes = "likes_{{ $path }}"
</script>
- {{ end }}
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
+ {{ end }}
</section>
<footer class="pt-8 max-w-prose print:hidden">
diff --git a/themes/blowfish/layouts/_default/taxonomy.html b/themes/blowfish/layouts/_default/taxonomy.html
index b7a38c8..94859a6 100644
--- a/themes/blowfish/layouts/_default/taxonomy.html
+++ b/themes/blowfish/layouts/_default/taxonomy.html
@@ -28,7 +28,6 @@
{{ .Content }}
</div>
</section>
- {{ end }}
<script>
var oid = "views_taxonomy_{{ .Data.Plural }}"
var oid_likes = "likes_taxonomy_{{ .Data.Plural }}"
@@ -36,7 +35,7 @@
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
-
+ {{ end }}
{{ if .Site.Params.taxonomy.cardView }}
diff --git a/themes/blowfish/layouts/_default/term.html b/themes/blowfish/layouts/_default/term.html
index db33bd7..ae8c702 100644
--- a/themes/blowfish/layouts/_default/term.html
+++ b/themes/blowfish/layouts/_default/term.html
@@ -1,6 +1,6 @@
{{ define "main" }}
-{{ .Scratch.Set "scope" "list" }}
+{{ .Scratch.Set "scope" "term" }}
{{ if .Site.Params.term.showHero | default false }}
{{ $heroStyle := print "partials/hero/" .Site.Params.term.heroStyle ".html" }}
{{ if templates.Exists $heroStyle }}
@@ -26,7 +26,6 @@
<div class="min-w-0 min-h-0 max-w-prose">
{{ .Content }}
</div>
- {{ end }}
<script>
var oid = "views_term_{{ .Data.Term }}"
var oid_likes = "likes_term_{{ .Data.Term }}"
@@ -34,14 +33,15 @@
{{ $jsPage := resources.Get "js/page.js" }}
{{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
+ {{ end }}
</section>
{{ if gt .Pages 0 }}
- {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }}
- {{ $cardViewScreenWidth := .Site.Params.list.cardViewScreenWidth | default false }}
- {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }}
+ {{ $cardView := .Params.cardView | default (.Site.Params.term.cardView | default false) }}
+ {{ $cardViewScreenWidth := .Site.Params.term.cardViewScreenWidth | default false }}
+ {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.term.groupByYear | default false) }}
{{ if not $cardView }}
@@ -121,7 +121,7 @@
{{ else }}
<section class="mt-10 prose dark:prose-invert">
<p class="py-8 border-t">
- <em>{{ i18n "list.no_articles" | emojify }}</em>
+ <em>{{ i18n "term.no_articles" | emojify }}</em>
</p>
</section>
{{ end }}