Compare commits

...

3 Commits

13 changed files with 135 additions and 15 deletions

View File

@ -10,6 +10,9 @@ draft: true
authors:
- {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }}
categories:
- archetype-stuff
tags:
- awesome

View File

@ -0,0 +1,15 @@
---
title: {{ replace .Name "-" " " | title }}
---
A short summary of what the category is about.
<!--more-->
Optionally provide more information about the category here. This part will only
show on the category page, not on the category list page.
If you delete this section, DO NOT delete the summary separator (`<!--more-->`)
or else the summary won't be shown.

View File

@ -113,6 +113,7 @@
margin-bottom: 15px;
}
.categories,
.tags,
.series {
margin-top: 10px;
@ -133,6 +134,41 @@
/* Category list format */
.category-list ul {
display: flex;
flex-direction: column;
list-style: none;
gap: 10px;
padding: 0;
}
.category-list li {
display: flex;
flex-direction: row;
gap: 20px;
background-color: var(--background-2);
padding: 8px 12px;
border-radius: 8px;
}
@media (max-width: 360px) {
.category-list li {
flex-direction: column;
gap: 0;
}
}
.category-list li > a,
.category-list li > p {
}
.category-list p {
margin: 0;
}
/* Tags list format */
.tag-list ul {
display: flex;

View File

@ -7,6 +7,7 @@ params:
readingtime: true
taxonomies:
category: categories
tag: tags
author: authors
series: series

View File

@ -0,0 +1,27 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "folder" }}
{{ .Title | markdownify }}
</h1>
<div class="category-list">
{{ with .Data.Terms.Alphabetical }}
<ul>
{{ range . }}
{{ with .Page }}
<li>
<a href="{{ .Permalink }}">
<p>{{ .Title | markdownify }}</p>
</a>
{{ partial "description-or-summary.html" . }}
</li>
{{ end }}
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ end }}

View File

@ -0,0 +1,27 @@
{{ define "main" }}
<h1>
{{ partial "icon.html" "folder" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ with .Content }}
{{ . }}
{{ end }}
<div class="page-list">
{{ with .Paginator.Pages }}
<ul>
{{ range . }}
<li>{{ .Render "summary/post" }}</li>
{{ end }}
</ul>
{{ else }}
<div>
{{ i18n "no_posts" }}
</div>
{{ end }}
</div>
{{ partial "pagination.html" . }}
{{ end }}

View File

@ -0,0 +1,11 @@
{{ with (.GetTerms "categories") }}
{{ $categories := slice }}
{{ range . }}
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }}
<div class="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
{{ partial "icon.html" "folder" }}
{{ delimit $categories ", " }}
</div>
{{ end }}

View File

@ -25,6 +25,7 @@
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/viewsource.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>
{{ end }}

View File

@ -13,6 +13,7 @@
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/series.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>
{{ end }}

View File

@ -7,7 +7,9 @@
{{ partial "post-metadata/series.html" . }}
{{ partial "description-or-summary.html" . }}
{{ with .Content }}
{{ . }}
{{ end }}
<div class="page-list">
{{ with .Paginator.Pages.Reverse }}

View File

@ -5,7 +5,10 @@
{{ partial "rss-link.html" . }}
</h1>
{{ partial "description-or-summary.html" . }}
{{ with .Content }}
{{ . }}
{{ end }}
<div class="page-list">
{{ with .Paginator.Pages }}
<ul>

View File

@ -1,11 +1,6 @@
{{ define "main" }}
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
{{ partial "icon.html" "filter" }}
{{ .Title | markdownify }}
</h1>

View File

@ -1,16 +1,14 @@
{{ define "main" }}
<h1>
{{ if eq .Data.Singular "tag" }}
{{ partial "icon.html" "tag" }}
{{ else }}
{{ partial "icon.html" "filter" }}
{{ end }}
{{ partial "icon.html" "filter" }}
{{ .Title | markdownify }}
{{ partial "rss-link.html" . }}
</h1>
{{ partial "description-or-summary.html" . }}
{{ with .Content }}
{{ . }}
{{ end }}
<div class="page-list">
{{ with .Paginator.Pages }}
<ul>