summaryrefslogtreecommitdiff
path: root/layouts/shortcodes/bookmarks-all.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/bookmarks-all.html')
-rw-r--r--layouts/shortcodes/bookmarks-all.html23
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 }}