diff --git a/i18n/en.yaml b/i18n/en.yaml index a4cf262..b41fff9 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -23,6 +23,10 @@ browser_no_video_support: no_posts: other: "No posts here!" +post_count: + one: "{{ . }} post" + other: "{{ . }} posts" + table_of_contents: other: "Table of Contents" diff --git a/layouts/_default/author-summary.html b/layouts/_default/author-summary.html new file mode 100644 index 0000000..1eb194b --- /dev/null +++ b/layouts/_default/author-summary.html @@ -0,0 +1,16 @@ +
+

+ {{ .Title | markdownify }} + {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} +

+ + {{ partial "author-metadata.html" . }} + +
+ {{ partial "description-or-summary.html" . }} +
+ +
+ {{ i18n "read_more" }} → +
+
diff --git a/layouts/authors/list.html b/layouts/authors/list.html new file mode 100644 index 0000000..2b1d50d --- /dev/null +++ b/layouts/authors/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} +

+ {{ partial "icon.html" "user-circle" }} + {{ .Title | markdownify }} +

+ +
+ +
+{{ end }} diff --git a/layouts/authors/term.html b/layouts/authors/term.html new file mode 100644 index 0000000..97e96ef --- /dev/null +++ b/layouts/authors/term.html @@ -0,0 +1,25 @@ +{{ define "main" }} +

+ {{ partial "icon.html" "user-circle" }} + {{ .Title | markdownify }} + {{ partial "rss-link.html" . }} +

+ + {{ partial "author-metadata.html" . }} + + {{ .Content }} + +
+ +
+ + {{ partial "pagination.html" . }} +{{ end }} diff --git a/layouts/partials/author-metadata.html b/layouts/partials/author-metadata.html index 83656cc..64d62dc 100644 --- a/layouts/partials/author-metadata.html +++ b/layouts/partials/author-metadata.html @@ -1,9 +1,17 @@ -{{ with .Params.authors }} +
+ {{/* Calculate the total word count */}} + {{ $total_words := 0 }} + {{ range .Data.Pages }} + {{ $total_words = add $total_words .WordCount }} + {{ end }} - + + {{ partial "icon.html" "newspaper" }} + {{ i18n "post_count" (len .Data.Pages) }} + -{{ range . }} - -{{ end }} - -{{ end }} + + {{ partial "icon.html" "align-left" }} + {{ i18n "wordcount" $total_words }} + +
diff --git a/layouts/partials/term-description.html b/layouts/partials/term-description.html deleted file mode 100644 index a8f9231..0000000 --- a/layouts/partials/term-description.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ with .Description }} -
-

{{ . | markdownify }}

-
-{{ end }} diff --git a/layouts/series/term.html b/layouts/series/term.html index 5ffee0f..b292c1a 100644 --- a/layouts/series/term.html +++ b/layouts/series/term.html @@ -5,7 +5,7 @@ {{ partial "rss-link.html" . }} - {{ partial "term-description.html" . }} + {{ partial "description-or-summary.html" . }}