aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/taxonomy.html
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-08-27 22:38:42 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-08-27 22:38:42 +0800
commit3c6cb7f29631dfcdd954e7cbd5d2370efe7eb827 (patch)
treed374e090981dda28452dbd13400e377b9cc06277 /layouts/_default/taxonomy.html
๐ŸŽ‰ first commit
Diffstat (limited to 'layouts/_default/taxonomy.html')
-rw-r--r--layouts/_default/taxonomy.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
new file mode 100644
index 0000000..b2e4643
--- /dev/null
+++ b/layouts/_default/taxonomy.html
@@ -0,0 +1,47 @@
+{{ define "title" }}{{ .Title }} ยท {{ .Site.Title }}{{ end }}
+
+{{ define "content"}}
+{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate") }}
+<section id="archive" class="archive">
+ {{ if not $paginator.HasPrev }}
+ {{ if eq .Data.Plural "tags" }}
+ <div class="archive-title tag">
+ <h2 class="archive-name">{{ .Title }}</h2>
+ </div>
+ {{ else if eq .Data.Plural "categories" }}
+ <div class="archive-title category">
+ <h2 class="archive-name">{{ .Title }}</h2>
+ </div>
+ {{ end }}
+ {{ end }}
+
+ {{ range $paginator.Pages }}
+ <div class="archive-post">
+ <span class="archive-post-time">
+ {{ .Date.Format "2006-01-02" }}
+ </span>
+ <span class="archive-post-title">
+ <a href="{{ .URL }}" class="archive-post-link">
+ {{ .Title }}
+ </a>
+ </span>
+ </div>
+ {{ end }}
+</section>
+<!-- pagination -->
+<nav class="pagination">
+ {{- $lang := .Site.Data.even.default -}}
+ {{ with $paginator.Prev }}
+ <a class="prev" href="{{ .URL }}">
+ <i class="iconfont icon-left"></i>
+ <span class="prev-text">{{ $lang.posts.prev }}</span>
+ </a>
+ {{- end }}
+ {{ with $paginator.Next }}
+ <a class="next" href="{{ .URL }}">
+ <span class="next-text">{{ $lang.posts.next }}</span>
+ <i class="iconfont icon-right"></i>
+ </a>
+ {{- end }}
+</nav>
+{{ end }} \ No newline at end of file