diff options
Diffstat (limited to 'themes/default/layouts/_default/home.archives.html')
-rw-r--r-- | themes/default/layouts/_default/home.archives.html | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/home.archives.html b/themes/default/layouts/_default/home.archives.html new file mode 100644 index 0000000..f443583 --- /dev/null +++ b/themes/default/layouts/_default/home.archives.html @@ -0,0 +1,67 @@ +{{- define "title" -}}Archives — {{ end -}} +{{- define "description" -}}An archive of all items — {{ end -}} +{{- define "styles" -}} +<style> + {{ partial "navigator.css.html" (dict "Link" "/archives/") | safeCSS }} +</style> +{{- end -}} + +{{- define "header" -}} + {{- partial "navigator-middle.html" + (dict + "Context" . + "IconLabel" "Back" + "Id" "back" + "Title" "Archives" + "Icon" "arrow-left" + "Subtitle" (print (partial "count.html" .) " " "Total") + "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/") + ) + -}} +{{- end -}} + +{{- define "middle" -}} + <archive-list> + <time-line> + {{ range (.Paginator.Pages.GroupByDate "2006") }} + {{ range (first 1 .Pages) }} + <h1>{{ .Date | time.Format "2006" }}</h1> + {{ end }} + <ul> + {{ range .Pages }} + {{- $author := .Page.Section -}} + <li> + <a + title="{{ partial "meta-title.html" . }}" + href="{{ .Permalink }}#{{ partial "card-id.html" . }}" + > + <code> + <time + data-type="disabled" + datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}" + title="{{ .Date | time.Format "Posted: Monday January 2 2006 at 15:04:05 MST" }}" + > + {{ .Date | time.Format "02 Jan" }} + </time> + </code> + <section> + <h2>{{ partial "meta-title.html" . }}</h2> + <p>@{{ or .Params.feed.domain $author }}</p> + </section> + </a> + </li> + {{ end }} + </ul> + {{ end }} + </time-line> + </archive-list> +{{- end -}} + +{{- define "footer" -}} + {{- partial "pagination.html" . -}} + {{- partial "footer.html" . -}} +{{- end -}} + +{{- define "right" -}} + {{- partial "navigator-right.html" . -}} +{{- end -}} |