diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-02-22 20:01:22 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-02-22 20:01:22 +0100 |
| commit | 4b534dd48131b3e04336e61c66556afe59f5fc2a (patch) | |
| tree | c80891e28eb12c285c370d4f000d25d010300ae4 /templates | |
| parent | cd8e0d19f542c7463707f5bcce329d8d55350314 (diff) | |
| download | mitjafelicijan.com-4b534dd48131b3e04336e61c66556afe59f5fc2a.tar.gz | |
Better tags
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 2 | ||||
| -rw-r--r-- | templates/index.html | 6 | ||||
| -rw-r--r-- | templates/note.html | 6 | ||||
| -rw-r--r-- | templates/post.html | 9 |
4 files changed, 19 insertions, 4 deletions
diff --git a/templates/base.html b/templates/base.html index 3fbaf8e..ff39b57 100644 --- a/templates/base.html +++ b/templates/base.html | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | table { width: 100%; } | 20 | table { width: 100%; } |
| 21 | figure { margin: 0; } | 21 | figure { margin: 0; } |
| 22 | .flow { max-width: 1100px; column-count: 2; column-gap: 1em; } | 22 | .flow { max-width: 1100px; column-count: 2; column-gap: 1em; } |
| 23 | .tags { display: inline-flex; gap: 0.2em; padding-right: 0.2em; font-family: monospace; } | ||
| 24 | .tags mark { padding: 0 0.2em; font-size: small; } | ||
| 23 | @media only screen and (max-width: 860px) { | 25 | @media only screen and (max-width: 860px) { |
| 24 | body { display: block; } | 26 | body { display: block; } |
| 25 | main { margin: 1em 0; } | 27 | main { margin: 1em 0; } |
diff --git a/templates/index.html b/templates/index.html index 57f9b40..be725f5 100644 --- a/templates/index.html +++ b/templates/index.html | |||
| @@ -21,8 +21,10 @@ | |||
| 21 | {{ range .Pages }} | 21 | {{ range .Pages }} |
| 22 | {{ if and (not .Draft) (or (eq .Type "note") (eq .Type "post")) }} | 22 | {{ if and (not .Draft) (or (eq .Type "note") (eq .Type "post")) }} |
| 23 | <li> | 23 | <li> |
| 24 | {{ if eq .Type "note" }} | 24 | {{ if .Meta.tags }} |
| 25 | {{ range .Meta.tags }}<mark>{{ . }}</mark>{{ end }} | 25 | <div class="tags"> |
| 26 | {{ range .Meta.tags }}<mark>{{ . }}</mark>{{ end }} | ||
| 27 | </div> | ||
| 26 | {{ end }} | 28 | {{ end }} |
| 27 | <a href="{{ .RelPermalink }}">{{ .Title }}</a> | 29 | <a href="{{ .RelPermalink }}">{{ .Title }}</a> |
| 28 | </li> | 30 | </li> |
diff --git a/templates/note.html b/templates/note.html index ce72921..62ac5f0 100644 --- a/templates/note.html +++ b/templates/note.html | |||
| @@ -20,7 +20,11 @@ | |||
| 20 | {{ range .Pages | filterbytype "note" | random 15 }} | 20 | {{ range .Pages | filterbytype "note" | random 15 }} |
| 21 | {{ if not .Draft }} | 21 | {{ if not .Draft }} |
| 22 | <li> | 22 | <li> |
| 23 | {{ range .Meta.tags }}<mark>{{ . }}</mark>{{ end }} | 23 | {{ if .Meta.tags }} |
| 24 | <div class="tags"> | ||
| 25 | {{ range .Meta.tags }}<mark>{{ . }}</mark>{{ end }} | ||
| 26 | </div> | ||
| 27 | {{ end }} | ||
| 24 | <a href="{{ .RelPermalink }}">{{ .Title }}</a> | 28 | <a href="{{ .RelPermalink }}">{{ .Title }}</a> |
| 25 | </li> | 29 | </li> |
| 26 | {{ end }} | 30 | {{ end }} |
diff --git a/templates/post.html b/templates/post.html index 13feb66..4458e8f 100644 --- a/templates/post.html +++ b/templates/post.html | |||
| @@ -19,7 +19,14 @@ | |||
| 19 | <meta itemprop="name" content="Other post"> | 19 | <meta itemprop="name" content="Other post"> |
| 20 | {{ range .Pages | filterbytype "post" | random 15 }} | 20 | {{ range .Pages | filterbytype "post" | random 15 }} |
| 21 | {{ if not .Draft }} | 21 | {{ if not .Draft }} |
| 22 | <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> | 22 | <li> |
| 23 | {{ if .Meta.tags }} | ||
| 24 | <div class="tags"> | ||
| 25 | {{ range .Meta.tags }}<mark>{{ . }}</mark>{{ end }} | ||
| 26 | </div> | ||
| 27 | {{ end }} | ||
| 28 | <a href="{{ .RelPermalink }}">{{ .Title }}</a> | ||
| 29 | </li> | ||
| 23 | {{ end }} | 30 | {{ end }} |
| 24 | {{ end }} | 31 | {{ end }} |
| 25 | </ul> | 32 | </ul> |
