mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-22 13:17:30 -05:00
Support categories again, but hopefully a bit better
This commit is contained in:
27
layouts/categories/list.html
Normal file
27
layouts/categories/list.html
Normal 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 }}
|
27
layouts/categories/term.html
Normal file
27
layouts/categories/term.html
Normal 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 }}
|
Reference in New Issue
Block a user