aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-01-06 03:57:02 -0500
committertdro <tdro@noreply.example.com>2023-01-06 04:16:39 -0500
commit036d5bd8bd2bfc2a77c43f8dbfa8e90ae8ee8b76 (patch)
tree7550133ef57e7ff86a5db9a0195266cc92dcce56 /themes
parent6f40c9a8d7263f82eb97009897502588f7236ce2 (diff)
downloadcanory-036d5bd8bd2bfc2a77c43f8dbfa8e90ae8ee8b76.tar.gz
canory-036d5bd8bd2bfc2a77c43f8dbfa8e90ae8ee8b76.tar.bz2
canory-036d5bd8bd2bfc2a77c43f8dbfa8e90ae8ee8b76.zip
themes/default/layouts/partials/author-list: Generate once0.11.10
Let it appear on second generation
Diffstat (limited to 'themes')
-rw-r--r--themes/default/layouts/_default/home.authors.section.html11
-rw-r--r--themes/default/layouts/partials/author-card.html5
-rw-r--r--themes/default/layouts/partials/author-list.html18
-rw-r--r--themes/default/layouts/shortcodes/version.html2
4 files changed, 24 insertions, 12 deletions
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..8b868f9
--- /dev/null
+++ b/themes/default/layouts/_default/home.authors.section.html
@@ -0,0 +1,11 @@
+{{- $authors := partial "function-authors-slice.html" . -}}
+
+{{- range $author := first 3 (shuffle $authors) -}}
+{{- $data := index $.Site.Data $author | default "default" -}}
+{{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
+{{- partial "author-card.html" (dict
+ "Data" $data
+ "Date" $date
+ )
+-}}
+{{- end -}}
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html
index 243d360..6f771b7 100644
--- a/themes/default/layouts/partials/author-card.html
+++ b/themes/default/layouts/partials/author-card.html
@@ -22,7 +22,10 @@
{{- $height = $metadata.picture.profileHeight -}}
{{- end -}}
-{{- if not (fileExists (print "public/" $source)) -}}
+{{- if or
+ (not (path.Ext .Data.picture.profile))
+ (not (fileExists (print "public/" (partial "function-paths.html" "media") "/" .Data.user)))
+-}}
{{- $source = "/data/media/404.png" -}}
{{- $sourceset = "" -}}
{{- end -}}
diff --git a/themes/default/layouts/partials/author-list.html b/themes/default/layouts/partials/author-list.html
index bd87ad5..44b55aa 100644
--- a/themes/default/layouts/partials/author-list.html
+++ b/themes/default/layouts/partials/author-list.html
@@ -1,16 +1,14 @@
-{{- $authors := partial "function-authors-slice.html" . -}}
+{{- $authors := print "public/authors.html" -}}
<author-list>
<h1>Authors</h1>
<aside>
- {{- range $author := first 3 (shuffle $authors) -}}
- {{- $data := index $.Site.Data $author | default "default" -}}
- {{- $date := (index (first 1 (where $.Site.Pages.ByDate.Reverse "Section" $author)) 0).Date -}}
- {{- partial "author-card.html" (dict
- "Data" $data
- "Date" $date
- )
- -}}
- {{- end -}}
+ {{- with $authors = resources.Get $authors -}}
+ {{- $authors.Content | safeHTML -}}
+ {{- else -}}
+ <footer>
+ <code>No authors found!</code>
+ </footer>
+ {{- end -}}
</aside>
</author-list>
diff --git a/themes/default/layouts/shortcodes/version.html b/themes/default/layouts/shortcodes/version.html
index debd59a..f712c51 100644
--- a/themes/default/layouts/shortcodes/version.html
+++ b/themes/default/layouts/shortcodes/version.html
@@ -1,4 +1,4 @@
-{{- $version := "0.11.9" -}}
+{{- $version := "0.11.10" -}}
{{- $number := default false (.Get "number" | default (.Get 0)) -}}
{{- $clone := default false (.Get "clone" | default (.Get 1)) -}}
{{- $hugo := default false (.Get "hugo" | default (.Get 2)) -}}