fix: fix usage of terms and taxonomies list templates (#330)
This commit is contained in:
parent
d2668b43f6
commit
a901b3da36
9 changed files with 56 additions and 18 deletions
|
@ -1,14 +1,16 @@
|
|||
{{ define "main" }}
|
||||
{{ range .Paginator.Pages }}
|
||||
<article class="gdoc-markdown gdoc-post">
|
||||
<article class="gdoc-post">
|
||||
<header class="gdoc-post__header">
|
||||
<h1 class="gdoc-post__title">
|
||||
<a href="{{ .RelPermalink }}">{{ partial "utils/title" . }}</a>
|
||||
</h1>
|
||||
</header>
|
||||
<section>
|
||||
|
||||
<section class="gdoc-markdown">
|
||||
{{ .Summary }}
|
||||
</section>
|
||||
|
||||
<div class="gdoc-post__readmore">
|
||||
{{ if .Truncated }}
|
||||
<a
|
||||
|
@ -37,7 +39,7 @@
|
|||
<a
|
||||
class="gdoc-button__link"
|
||||
href="{{ .page.RelPermalink }}"
|
||||
title="All posts tagged with '{{ .name }}'"
|
||||
title="{{ i18n "posts_tagged_with" .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
</a>
|
31
layouts/_default/terms.html
Normal file
31
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{ define "main" }}
|
||||
{{ range .Paginator.Pages.ByTitle }}
|
||||
<article class="gdoc-post">
|
||||
<header class="gdoc-post__header">
|
||||
<h1 class="gdoc-post__title">
|
||||
<a href="{{ .RelPermalink }}">{{ partial "utils/title" . }}</a>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<footer class="gdoc-post__meta flex align-center">
|
||||
<span class="flex align-center no-wrap">
|
||||
{{ $pageCount := len .Pages }}
|
||||
<svg class="icon gdoc_tag"><use xlink:href="#gdoc_tag"></use></svg>
|
||||
<span class="gdoc-post__tag">
|
||||
{{ i18n "posts_count" $pageCount }}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span class="flex align-center no-wrap">
|
||||
<svg class="icon gdoc_star"><use xlink:href="#gdoc_star"></use></svg>
|
||||
<span>
|
||||
{{ $latet := index .Pages.ByDate 0 }}
|
||||
{{ with $latet }}
|
||||
<a href="{{ .RelPermalink }}">{{ partial "utils/title" . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
</span>
|
||||
</footer>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -38,17 +38,9 @@
|
|||
<a
|
||||
class="gdoc-button__link"
|
||||
href="{{ .page.RelPermalink }}"
|
||||
title="All posts tagged with '{{ .name }}'"
|
||||
title="{{ i18n "posts_tagged_with" .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ define "post-author" }}
|
||||
<span class="gdoc-post__tag gdoc-button gdoc-button--regular">
|
||||
<a class="gdoc-button__link" href="{{ .page.RelPermalink }}" title="All posts of this author">
|
||||
{{ .name }}
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<a
|
||||
class="gdoc-button__link"
|
||||
href="{{ .page.RelPermalink }}"
|
||||
title="All posts tagged with '{{ .name }}'"
|
||||
title="{{ i18n "posts_tagged_with" .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue