diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index 2cfc0cb..3a500e4 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -4,12 +4,14 @@ /* Post layout (in list pages) */ -.page-list ul { +.page-list ul, +.series-taxonomy ul { list-style: none; padding: 0; } -.page-list li { +.page-list li, +.series-taxonomy li { padding-top: 8px; padding-left: 24px; padding-right: 24px; @@ -18,7 +20,8 @@ background-color: #222; } -.page-list li+li { +.page-list li+li, +.series-taxonomy > ul > li+li { margin: 40px 0; } @@ -59,6 +62,24 @@ +/* Series list format */ +.series-pages ul { + display: flex; + gap: 10px; + flex-flow: row wrap; + list-style: none; + padding: 0; + background-color: #111; + padding: 8px; + border-radius: 16px; +} + +.series-pages li { + flex: 1; +} + + + /* Subsection formatting */ .section { margin-bottom: 40px; diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 9bb7d63..d7617c0 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -5,7 +5,7 @@ {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} - {{ partial "post-metadata.html" . }} + {{ partial "post-metadata-short.html" . }} {{ with .Resources.GetMatch "feature" }}
diff --git a/layouts/partials/authors-meta-item.html b/layouts/partials/authors-meta-item.html new file mode 100644 index 0000000..1f90598 --- /dev/null +++ b/layouts/partials/authors-meta-item.html @@ -0,0 +1,19 @@ +{{ with .Params.authors }} + + {{ partial "icon.html" "user-circle" }} + + {{ if index $.Site.Taxonomies "authors" }} + + {{ $authors := slice }} + {{ range . }} + {{ $url := (printf "authors/%s" (. | anchorize)) | absLangURL }} + {{ $authors = $authors | append (printf `%s` $url . | safeHTML) }} + {{ end }} + {{ delimit $authors ", " }} + + {{ else }} + {{ delimit . ", " }} + + {{ end }} + +{{ end }} diff --git a/layouts/partials/post-metadata-short.html b/layouts/partials/post-metadata-short.html new file mode 100644 index 0000000..c208da3 --- /dev/null +++ b/layouts/partials/post-metadata-short.html @@ -0,0 +1,18 @@ +{{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime }} +
+ {{ if .Date }} + + {{ end }} + + {{ partial "authors-meta-item.html" . }} + {{ partial "translations-meta-item.html" . }} + {{ partial "readingtime-meta-item.html" . }} + {{ partial "series-meta-item.html" . }} + {{ partial "tags-meta-item.html" . }} +
+{{ end }} diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index 3a99a62..e24c67c 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -1,4 +1,4 @@ -{{ if or .Date .IsTranslated .Site.Params.readingtime .Site.Params.repoURL }} +{{ if or .Date .Params.authors .IsTranslated .Site.Params.readingtime .Site.Params.gitFileURL }}
{{ if .Date }} {{ end }} - {{ with .Params.authors }} - - {{ end }} - - {{ if .IsTranslated }} - - {{ end }} - - {{ if ne .Site.Params.readingtime false }} - - {{ end }} - - {{ with .Site.Params.gitFileURL }} - - {{ end }} - - {{ with .Params.series }} -
- {{ range ($.GetTerms "series") }} - - {{ end }} -
- {{ end }} - -
- {{ range (.GetTerms "tags") }} - - {{ end }} -
+ {{ partial "authors-meta-item.html" . }} + {{ partial "translations-meta-item.html" . }} + {{ partial "readingtime-meta-item.html" . }} + {{ partial "viewsource-meta-item.html" . }} + {{ partial "series-meta-item.html" . }} + {{ partial "tags-meta-item.html" . }}
{{ end }} diff --git a/layouts/partials/readingtime-meta-item.html b/layouts/partials/readingtime-meta-item.html new file mode 100644 index 0000000..071622c --- /dev/null +++ b/layouts/partials/readingtime-meta-item.html @@ -0,0 +1,6 @@ +{{ if ne .Site.Params.readingtime false }} + + {{ partial "icon.html" "clock" }} + {{ i18n "readingtime" .ReadingTime }} + +{{ end }} diff --git a/layouts/partials/series-meta-item.html b/layouts/partials/series-meta-item.html new file mode 100644 index 0000000..7ea186b --- /dev/null +++ b/layouts/partials/series-meta-item.html @@ -0,0 +1,10 @@ +{{ with .Params.series }} +
+ {{ range ($.GetTerms "series") }} + + {{ end }} +
+{{ end }} diff --git a/layouts/partials/tags-meta-item.html b/layouts/partials/tags-meta-item.html new file mode 100644 index 0000000..a1ca840 --- /dev/null +++ b/layouts/partials/tags-meta-item.html @@ -0,0 +1,8 @@ +
+ {{ range (.GetTerms "tags") }} + + {{ end }} +
diff --git a/layouts/partials/translations-meta-item.html b/layouts/partials/translations-meta-item.html new file mode 100644 index 0000000..5ac2f38 --- /dev/null +++ b/layouts/partials/translations-meta-item.html @@ -0,0 +1,8 @@ +{{ if .IsTranslated }} + + {{ partial "icon.html" "world" }} + {{ range .Translations }} + {{ .Language }} + {{ end }} + +{{ end }} diff --git a/layouts/partials/viewsource-meta-item.html b/layouts/partials/viewsource-meta-item.html new file mode 100644 index 0000000..baf8a60 --- /dev/null +++ b/layouts/partials/viewsource-meta-item.html @@ -0,0 +1,13 @@ +{{ with .Site.Params.gitFileURL }} + + {{ with $.Site.Params.gitFileIcon }} + {{ partial "icon.html" . }} + {{ else }} + {{ partial "icon.html" "file" }} + {{ end }} + + + View source + + +{{ end }} diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html index dc2abc6..68d53d7 100644 --- a/layouts/taxonomy/list.html +++ b/layouts/taxonomy/list.html @@ -23,13 +23,64 @@ {{ if eq .Kind "taxonomy" }} - + +{{ if eq .Data.Singular "series" }} +
+ +
+{{ else }} +
+ +
+{{ end }} {{ else }}