Change categories, tags from pills to text

master
Will Faught 1 year ago
parent 1d09c50d17
commit a1ec679931

@ -25,8 +25,10 @@
<p class="lead text-center" id="paige-description">{{ . }}</p> <p class="lead text-center" id="paige-description">{{ . }}</p>
{{ end }} {{ end }}
{{ if or $authors $categories $date $readingtime $series $tags }}
<div class="mb-3">
{{ if or $categories $tags }} {{ if or $categories $tags }}
<p class="text-center" id="paige-keywords"> <p class="mb-0 text-center text-secondary" id="paige-keywords">
{{ $terms := slice }} {{ $terms := slice }}
{{ range $categories }} {{ range $categories }}
@ -37,49 +39,49 @@
{{ $terms = $terms | append (dict "name" . "url" (printf "tags/%v/" . | relLangURL | string)) }} {{ $terms = $terms | append (dict "name" . "url" (printf "tags/%v/" . | relLangURL | string)) }}
{{ end }} {{ end }}
{{ range sort $terms "name" }} {{ range $i, $term := sort $terms "name" -}}
{{ $name := .name }} {{- if gt $i 0 }}, {{ end -}}
{{ with site.GetPage .url }} {{- $title := $term.name -}}
{{ $name = .Title }}
{{ end }}
<a class="badge paige-keyword text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ $name }}</a> {{- with (site.GetPage $term.url).Title -}}
{{ end }} {{- $title = . -}}
{{- end -}}
<a class="link-secondary" href="{{ .url | safeURL }}">{{ $title }}</a>
{{- end }}
</p> </p>
{{ end }} {{ end }}
{{ if or $authors $date $readingtime $series }}
<div class="mb-3">
{{ with $series }} {{ with $series }}
<p class="mb-0 text-center text-secondary" id="paige-series"> <p class="mb-0 text-center text-secondary" id="paige-series">
{{ range $i, $name := . }} {{ range $i, $name := . -}}
{{ if gt $i 0 }}, {{ end }} {{- if gt $i 0 }}, {{ end -}}
{{ with site.GetPage (print "series/" $name) }} {{- with site.GetPage (print "series/" $name) -}}
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title | default $name }}</a> <a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title | default $name }}</a>
{{ else }} {{- else -}}
{{ $name }} {{- $name -}}
{{ end }} {{- end -}}
{{ end }} {{- end }}
</p> </p>
{{ end }} {{ end }}
{{ with $authors }} {{ with $authors }}
<p class="mb-0 text-center text-secondary" id="paige-authors"> <p class="mb-0 text-center text-secondary" id="paige-authors">
{{ range $i, $author := . }} {{ range $i, $author := . -}}
{{ if gt $i 0 }}, {{ end }} {{- if gt $i 0 }}, {{ end -}}
{{ with $author.id }} {{- with $author.id -}}
{{ with site.GetPage (print "authors/" .) }} {{- with site.GetPage (print "authors/" .) -}}
<a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title | default $author.name }}</a> <a class="link-secondary" href="{{ .RelPermalink }}">{{ .Title | default $author.name }}</a>
{{ else }} {{- else -}}
{{ $author.name }} {{- $author.name -}}
{{ end }} {{- end -}}
{{ else }} {{- else -}}
{{ $author.name }} {{- $author.name -}}
{{ end }} {{- end -}}
{{ end }} {{- end }}
</p> </p>
{{ end }} {{ end }}

@ -60,7 +60,7 @@
{{ end }} {{ end }}
{{ if or $categories $tags }} {{ if or $categories $tags }}
<p class="mb-0 paige-keywords text-center"> <p class="mb-0 paige-keywords text-center text-secondary">
{{ $terms := slice }} {{ $terms := slice }}
{{ range $categories }} {{ range $categories }}
@ -71,15 +71,17 @@
{{ $terms = $terms | append (dict "name" . "url" (printf "tags/%v/" . | relLangURL | string)) }} {{ $terms = $terms | append (dict "name" . "url" (printf "tags/%v/" . | relLangURL | string)) }}
{{ end }} {{ end }}
{{ range sort $terms "name" }} {{ range $i, $term := sort $terms "name" -}}
{{ $name := .name }} {{- if gt $i 0 }}, {{ end -}}
{{ with site.GetPage .url }} {{- $title := $term.name -}}
{{ $name = .Title }}
{{ end }}
<a class="badge paige-keyword text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ $name }}</a> {{- with (site.GetPage $term.url).Title -}}
{{ end }} {{- $title = . -}}
{{- end -}}
<a class="link-secondary" href="{{ .url | safeURL }}">{{ $title }}</a>
{{- end }}
</p> </p>
{{ end }} {{ end }}

Loading…
Cancel
Save