diff options
author | mms <git@sapka.me> | 2024-12-03 21:54:54 +0100 |
---|---|---|
committer | mms <git@sapka.me> | 2024-12-03 21:54:54 +0100 |
commit | deac28735f843aa4a2bcab309b343caa2bfffbb1 (patch) | |
tree | e9ac45e0c59e64a2bf56affb5203cb8c1aed54c9 /layouts | |
parent | 1fa238ef9c2044b28853b49f347bd8afd0683c2d (diff) |
links
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/bookmarks-all.html | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/layouts/shortcodes/bookmarks-all.html b/layouts/shortcodes/bookmarks-all.html index 4520ad4..6b9eb47 100644 --- a/layouts/shortcodes/bookmarks-all.html +++ b/layouts/shortcodes/bookmarks-all.html @@ -1,19 +1,18 @@ {{- $caption := .Inner }} {{ $lastLetter := "Dupa" }} +{{ $oldDate := "aaa" }} {{ with resources.Get "more/bookmarks.yml"}} {{ with . | transform.Unmarshal }} -<ul> {{ range (sort .bookmarks ".date" "desc") }} - <li> - {{ .date }} - - - <a href="{{ .url }}">{{ .title }}</a> - ({{ .host }}) - {{ if .source_url }} - (via <a href="{{ .source_url }}">{{ .source_host }}</a>) - {{ end }} - - {{ end }} -</ul> + {{ if not (eq $oldDate .date) }} + {{ if not (eq $oldDate "aaa") }} </ul>{{ end }} + <h3>{{ .date }}</h3> + <ul> + {{ end }} + {{ $oldDate = .date }} + <li><a href="{{ .url }}">{{ .title }}</a> + ({{ .host }}) + {{ if .source_url }}(via <a href="{{ .source_url }}">{{ .source_host }}</a>){{ end }} + {{ end }} {{ end }} {{ end }} |