diff options
Diffstat (limited to 'themes/default/layouts/_default/taxonomy.html')
-rw-r--r-- | themes/default/layouts/_default/taxonomy.html | 117 |
1 files changed, 63 insertions, 54 deletions
diff --git a/themes/default/layouts/_default/taxonomy.html b/themes/default/layouts/_default/taxonomy.html index 97b9bd1..5c8e2ba 100644 --- a/themes/default/layouts/_default/taxonomy.html +++ b/themes/default/layouts/_default/taxonomy.html @@ -1,62 +1,71 @@ -{{ define "styles" }} +{{- define "styles" -}} <style> - {{ partial "styles-navigator.html" (dict "Link" "/tags/") | safeCSS }} + {{ partial "navigator.css.html" (dict "Link" "/tags/") | safeCSS }} </style> -{{ end }} +{{- end -}} -{{ define "middle" }} +{{- define "header" -}} + {{- partial "navigator-middle.html" + (dict + "Context" . + "IconLabel" "Back" + "Id" "back" + "Title" "Tags" + "Icon" "arrow-left" + "Subtitle" (print (partial "count-tags.html" .) " " "Total") + "Href" (or (and (gt .Paginator.PageNumber 1) (.Paginator.Prev.URL | absURL)) "/") + ) + -}} +{{- end -}} - {{ $title := .Title }} +{{- define "middle" -}} + <tag-deck> + {{- range .Paginator.Pages -}} + {{- $count := lang.FormatNumberCustom 0 (len .Data.Pages) -}} + {{- $title := lower .Title -}} - {{ if eq .Title "Tags" }} - - {{ partial "navigator-middle.html" - (dict - "Title" "Tags" - "Subtitle" (partial "count-tags.html" .) - "Icon" "arrow-left" - "IconLabel" "Back" - "Href" "/" - "Id" "back" - "Context" . - ) - }} - - {{- $page := 1 -}} - {{- $count := 0 -}} - - {{ range .Paginator.Pages }} - {{ $title := lower .Title }} - <item-list> - <h1><a href="{{ .Site.BaseURL }}/tags/{{ $title }}">#{{ .Title }}</a></h1> - <ul> - {{ range .Pages }} - {{- $count = add $count 1 -}} - <li> - <a - title="{{ partial "title.html" . }}" - href="{{ .Site.BaseURL }}/tags/{{ $title }}/{{ if gt $page 1 }}page/{{ $page }}/{{ end }}#{{ partial "card-id.html" . }}"> - <span><code>{{ .Date.Format "02 Jan 2006" }}</code></span> - <span>{{ partial "title.html" . }}</span> - <span>@{{ partial "author-user.html" . }}</span> + {{- range first 1 .Pages -}} + {{- $author := partial "function-authors-data.html" . -}} + <tag-card> + <article> + <h2> + <code> + {{ $count }} in + <a data-hover href="{{ "" | absURL }}/tags/{{ $title }}/"> + #{{ $title }} + </a> + </code> + </h2> + <figure> + <a href="{{ print ("" | absURL) "/tags/" $title "/#" (partial "card-id.html" .) }}"> + <picture> + {{ partial "author-picture" . }} + </picture> </a> - </li> - {{ if eq (mod $count $.Paginator.PageSize) 0 }} - {{ $page = add $page 1 }} - {{- end -}} - {{- end -}} - {{- $page = 1 -}} - {{- $count = 0 -}} - </ul> - </item-list> - {{ end }} - - {{ partial "pagination.html" . }} - - {{ end }} + </figure> + <time + 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 2006" }} + </time> + <p> + <a data-hover href="{{ print ("" | absURL) "/tags/" $title "/#" (partial "card-id.html" .) }}"> + {{ partial "meta-title.html" . }} + </a> + </p> + </article> + </tag-card> + {{- end -}} + {{- end -}} + </tag-deck> +{{- end -}} -{{ end }} +{{- define "footer" -}} + {{- partial "pagination.html" . -}} + {{- partial "footer.html" . -}} +{{- end -}} -{{ define "right" }} - {{- partial "navigator-right-default.html" . -}} -{{ end }} +{{- define "right" -}} + {{- partial "navigator-right.html" . -}} +{{- end -}} |