diff options
Diffstat (limited to 'themes/default/layouts/_default/taxonomy.html')
-rw-r--r-- | themes/default/layouts/_default/taxonomy.html | 121 |
1 files changed, 61 insertions, 60 deletions
diff --git a/themes/default/layouts/_default/taxonomy.html b/themes/default/layouts/_default/taxonomy.html index bcacf3e..e0126d2 100644 --- a/themes/default/layouts/_default/taxonomy.html +++ b/themes/default/layouts/_default/taxonomy.html @@ -1,71 +1,72 @@ -{{ define "styles" }} +{{- define "styles" -}} <style> {{ partial "styles-navigator.html" (dict "Link" "/tags/") | safeCSS }} </style> -{{ end }} +{{- end -}} -{{ define "middle" }} +{{- define "middle" -}} - {{- $title := .Title -}} - {{- $author := partial "function-authors-data.html" . -}} + {{- partial "navigator-middle.html" + (dict + "Title" "Tags" + "Subtitle" (partial "count-tags.html" .) + "Icon" "arrow-left" + "IconLabel" "Back" + "Href" "/" + "Id" "back" + "Context" . + ) + -}} - {{ if eq .Title "Tags" }} + <tag-deck> + {{- range .Paginator.Pages -}} + {{- $count := len .Data.Pages -}} + {{- $title := lower .Title -}} - {{- 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 first 3 .Pages }} - {{- $count = add $count 1 -}} - <li> - <a - title="{{ partial "meta-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 "meta-title.html" . }}</span> - <span>@{{ $author.user }}</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> - </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 }} + </code> + </h2> + <figure> + <a href="{{ print ("" | absURL) "/tags/" $title "/#" (partial "card-id.html" .) }}"> + <picture> + {{ partial "author-picture" . }} + </picture> + </a> + </figure> + <h3> + <a data-hover href="{{ print ("" | absURL) "/" $author.user "/" }}"> + @{{ $author.user }} + </a> + </h3> + <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.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 }} + {{ partial "pagination.html" . }} +{{- end -}} -{{ define "right" }} +{{- define "right" -}} {{- partial "navigator-right.html" . -}} -{{ end }} +{{- end -}} |