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

@ -22,7 +22,7 @@ a {
text-decoration: none; text-decoration: none;
border-bottom: 2px solid $fg_color; border-bottom: 2px solid $fg_color;
&:hover { &:hover {
border-bottom: 2px solid $accent_color; border-color: $accent_color !important;
} }
} }
@ -128,8 +128,9 @@ pre code {
padding: 0 padding: 0
} }
.date { .date, .date a {
color: $dim_fg_color; color: $dim_fg_color;
border-color: $dim_fg_color;
font-size: .9em; font-size: .9em;
} }

View File

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

View File

@ -2,7 +2,10 @@
{{- partial "inject/content-before.html" . -}} {{- partial "inject/content-before.html" . -}}
<article> <article>
<h1>{{ .Title }}</h1> <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> <div>{{ .Content }}</div>
{{ if .Params.tags }} {{ if .Params.tags }}
<hr /> <hr />

View File

@ -11,10 +11,14 @@
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>
</h3> </h3>
<p class="date"> <p class="date">
<span title="Date"></span>
{{ .Date.Format "2006-01-02" }} {{ .Date.Format "2006-01-02" }}
{{ if .Params.tags }} {{ if .Params.tags }}
<br /> | <!-- Pipe character as visual separator between date and tags-->
<small>{{ range .Params.tags }}#{{ . }} {{ end }}</small> <span title="Tags"></span>
{{ range .Params.tags }}
<a href="/tags/{{ . }}">#{{ . }}</a>
{{ end }}
{{ end }} {{ end }}
</p> </p>
<div class="articlePreview"> <div class="articlePreview">