summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/taxonomy.html81
-rw-r--r--layouts/taxonomy/categories.terms.html.html67
-rw-r--r--layouts/taxonomy/tags.terms.html.html17
-rw-r--r--layouts/taxonomy/term.html (renamed from layouts/_default/term.html)0
4 files changed, 84 insertions, 81 deletions
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
deleted file mode 100644
index e4ad0753..00000000
--- a/layouts/_default/taxonomy.html
+++ /dev/null
@@ -1,81 +0,0 @@
-{{ define "main" }}
-<article class="taxonomy">
- {{ partial "header.html" . }}
- {{ partial "components/postnav.html" . }}
-
- <!-- Display Tags -->
- {{ if eq .Type "tags" }}
- <section class="taxonomy-tags">
- {{ range sort .Site.Taxonomies.tags "Count" "desc" }}
- <a href="{{ .Page.RelPermalink }}" class="taxonomy-tags-item">
- <span class="tag-name">#{{ .Page.LinkTitle }}</span>
- <span class="tag-count">{{ .Count }}</span>
- </a>
- {{ end }}
- </section>
- {{ end }}
-
- <!-- Display Categories -->
- {{ if eq .Type "categories" }}
- {{ partial "components/welcome.html" . }}
- {{ $featured := slice "稻草人周刊" "年终总结" "揽物日志" "极客死亡计划书" }}
- <h2>周期性刊物</h2>
- <section class="taxonomy-categories">
- {{ range sort .Site.Taxonomies.categories ".Count" "desc" }}
- {{ if in $featured .Page.Title }}
- <div class="taxonomy-categories-item">
- <h3 class="category-title">
- <a href="{{ .Page.RelPermalink }}">
- {{ with .Page.Params.icon }}<span>{{ . }}</span>{{ end }} {{ .Page.LinkTitle }}
- </a>
- </h3>
- <p class="category-description">{{ .Page.Params.description | markdownify }}</p>
- <ul class="category-articles">
- {{ range first 6 .Pages }}
- <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
- {{ end }}
- </ul>
- {{ if gt .Count 6 }}
- <a class="category-link"
- href="{{ .Page.RelPermalink }}"
- >阅读所有 {{ .Count }} 篇文章</a>
- {{ end }}
- </div>
- {{ end }}
- {{ end }}
- </section>
-
- <!-- Render Other Categories -->
- <h2>文章系列</h2>
- <section class="taxonomy-categories">
- {{ range sort .Site.Taxonomies.categories ".Count" "desc" }}
- {{ if not (in $featured .Page.Title) }}
- <div class="taxonomy-categories-item">
- <h3 class="category-title">
- <a href="{{ .Page.RelPermalink }}">
- {{ with .Page.Params.icon }}<span>{{ . }}</span>{{ end }} {{ .Page.LinkTitle }}
- </a>
- </h3>
- <p class="category-description">{{ .Page.Params.description | markdownify }}</p>
- <ul class="category-articles">
- {{ range first 6 .Pages }}
- <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
- {{ end }}
- </ul>
- {{ if gt .Count 6 }}
- <a class="category-link"
- href="{{ .Page.RelPermalink }}"
- >阅读所有 {{ .Count }} 篇文章</a>
- {{ end }}
- </div>
- {{ end }}
- {{ end }}
- </section>
-
- <p class="uncategorized-link-container">
- <a class="uncategorized-link" href="/categories/uncategorized/">查看随笔</a>
- </p>
- {{ end }}
-</article>
-{{ partial "footer.html" . }}
-{{ end }}
diff --git a/layouts/taxonomy/categories.terms.html.html b/layouts/taxonomy/categories.terms.html.html
new file mode 100644
index 00000000..5b6748d0
--- /dev/null
+++ b/layouts/taxonomy/categories.terms.html.html
@@ -0,0 +1,67 @@
+{{ define "main" }}
+<article class="taxonomy">
+ {{ partial "header.html" . }}
+ {{ partial "components/postnav.html" . }}
+
+ <!-- Display Categories -->
+ {{ partial "components/welcome.html" . }}
+ {{ $featured := slice "稻草人周刊" "年终总结" "揽物日志" "极客死亡计划书" }}
+ <h2>周期性刊物</h2>
+ <section class="taxonomy-categories">
+ {{ range sort .Site.Taxonomies.categories ".Count" "desc" }}
+ {{ if in $featured .Page.Title }}
+ <div class="taxonomy-categories-item">
+ <h3 class="category-title">
+ <a href="{{ .Page.RelPermalink }}">
+ {{ with .Page.Params.icon }}<span>{{ . }}</span>{{ end }} {{ .Page.LinkTitle }}
+ </a>
+ </h3>
+ <p class="category-description">{{ .Page.Params.description | markdownify }}</p>
+ <ul class="category-articles">
+ {{ range first 6 .Pages }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ {{ if gt .Count 6 }}
+ <a class="category-link"
+ href="{{ .Page.RelPermalink }}"
+ >阅读所有 {{ .Count }} 篇文章</a>
+ {{ end }}
+ </div>
+ {{ end }}
+ {{ end }}
+ </section>
+
+ <!-- Render Other Categories -->
+ <h2>文章系列</h2>
+ <section class="taxonomy-categories">
+ {{ range sort .Site.Taxonomies.categories ".Count" "desc" }}
+ {{ if not (in $featured .Page.Title) }}
+ <div class="taxonomy-categories-item">
+ <h3 class="category-title">
+ <a href="{{ .Page.RelPermalink }}">
+ {{ with .Page.Params.icon }}<span>{{ . }}</span>{{ end }} {{ .Page.LinkTitle }}
+ </a>
+ </h3>
+ <p class="category-description">{{ .Page.Params.description | markdownify }}</p>
+ <ul class="category-articles">
+ {{ range first 6 .Pages }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ {{ if gt .Count 6 }}
+ <a class="category-link"
+ href="{{ .Page.RelPermalink }}"
+ >阅读所有 {{ .Count }} 篇文章</a>
+ {{ end }}
+ </div>
+ {{ end }}
+ {{ end }}
+ </section>
+
+ <p class="uncategorized-link-container">
+ <a class="uncategorized-link" href="/categories/uncategorized/">查看随笔</a>
+ </p>
+</article>
+{{ partial "footer.html" . }}
+{{ end }}
diff --git a/layouts/taxonomy/tags.terms.html.html b/layouts/taxonomy/tags.terms.html.html
new file mode 100644
index 00000000..025a63d7
--- /dev/null
+++ b/layouts/taxonomy/tags.terms.html.html
@@ -0,0 +1,17 @@
+{{ define "main" }}
+<article class="taxonomy">
+ {{ partial "header.html" . }}
+ {{ partial "components/postnav.html" . }}
+
+ <!-- Display Tags -->
+ <section class="taxonomy-tags">
+ {{ range sort .Site.Taxonomies.tags "Count" "desc" }}
+ <a href="{{ .Page.RelPermalink }}" class="taxonomy-tags-item">
+ <span class="tag-name">#{{ .Page.LinkTitle }}</span>
+ <span class="tag-count">{{ .Count }}</span>
+ </a>
+ {{ end }}
+ </section>
+</article>
+{{ partial "footer.html" . }}
+{{ end }}
diff --git a/layouts/_default/term.html b/layouts/taxonomy/term.html
index 4d6fe390..4d6fe390 100644
--- a/layouts/_default/term.html
+++ b/layouts/taxonomy/term.html