Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiushi Pan <qiu.gits@gmail.com>2018-12-01 00:31:29 +0300
committerQiushi Pan <qiu.gits@gmail.com>2018-12-01 00:31:29 +0300
commit7e582e59446ab3ffe585bb00e59238d817098aa2 (patch)
tree53372d5d93e151fb286bc33ca705974c129d0b22
parent2e083758c900791fd764187ed7e7da2975adf7ef (diff)
Update: read more button for terms abstract view
-rw-r--r--layouts/taxonomy/terms.html.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/taxonomy/terms.html.html b/layouts/taxonomy/terms.html.html
index 72d29b0..2fbe378 100644
--- a/layouts/taxonomy/terms.html.html
+++ b/layouts/taxonomy/terms.html.html
@@ -15,12 +15,16 @@
<!-- single page card -->
<div class="mb-2">
<a href="{{ .URL }}" class="link-gray-dark"><span class="h2">{{ .Title }}</span></a>
- <span class="text-right Counter Counter--gray">{{ .Pages | len }}</span>
+ <span class="text-right Counter Counter--gray">{{ len .Pages }}</span>
</div>
<div class="text-gray">
- {{ range first 10 .Pages }}
+ {{ range first 5 .Pages }}
<a class="btn btn-transparent bg-blue-light link-gray mb-2" href="{{ .URL }}" role="button">{{ .Title }}</a>
{{ end }}
+
+ {{ if gt (len .Pages) 5 }}
+ <a class="btn btn-transparent link-gray mb-2" href="{{ .URL }}" role="button">…more</a>
+ {{ end }}
</div>
</div>
{{ end }}