tags in home are links, inline with dates separated by a pipe; dates and tags have appropriate accompanying icons; specific tag section is now titled 'Tag: #sometag'

This commit is contained in:
Gabriele Musco 2021-01-03 13:15:46 +01:00
parent 5bf2ffe70e
commit 5826b560ac
No known key found for this signature in database
GPG key ID: 8539FD3454380B83
4 changed files with 14 additions and 8 deletions

View file

@ -1,13 +1,11 @@
{{ define "main" }}
<h2>
<span>
{{ $title := .Title }}
{{ $section := .Section | humanize }}
{{ if and (ne $section $title) (ne $section "Tags") }}
{{ $section }}:
{{ end }}
{{ if and (eq $section "Tags") (ne $section $title) }}#{{ end }}{{ $title }}
</span>
{{ if and (eq $section "Tags") (ne $section $title) }}Tag: #{{ end }}{{ $title }}
</h2>
<ul>

View file

@ -2,7 +2,10 @@
{{- partial "inject/content-before.html" . -}}
<article>
<h1>{{ .Title }}</h1>
<p class="date">{{ .Date.Format "2006-01-02" }}</p>
<p class="date">
<span title="Date"></span>
{{ .Date.Format "2006-01-02" }}
</p>
<div>{{ .Content }}</div>
{{ if .Params.tags }}
<hr />