diff options
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r-- | layouts/_default/list.html | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ecac06c..7c774d5 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -11,26 +11,40 @@ SPDX-License-Identifier: MIT {{ if in .Params.categories "book" }} <section class="toc"> <ol> + {{ range .Page.Translations | append .Page }} {{ range sort .Pages "Weight" }} - <li> - <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a> - {{ partial "post-language-switcher.html" . }} - {{ partial "post-info.html" . }} - </li> + <li> + <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a> + {{ partial "post-info.html" . }} + </li> {{ end }} - <ol> + {{ end }} + <ol> </section> - {{ else }} + {{ else if in .Params.categories "blog" }} <section class="feed"> + <ol reversed> + {{ range sort .Pages "Date" "desc" }} + <li> + <time datetime="{{ .Date }}">{{ .Date.Format "2006-01-02" }}</time>: + <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a> + {{ partial "post-language-switcher.html" . }} + {{ partial "post-info.html" . }} + </li> + {{ end }} <ol> + </section> + {{ else }} + <section class="list"> + <ul> {{ range sort .Pages "Date" }} - <li> - <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a> - {{ partial "post-language-switcher.html" . }} - {{ partial "post-info.html" . }} - </li> + <li> + <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a> + {{ partial "post-language-switcher.html" . }} + {{ partial "post-info.html" . }} + </li> {{ end }} - <ol> + <ul> </section> {{ end }} {{ end }} |