feature: added separate list and terms templates, for posts under the taxonomy and different taxonomy terms respectively

This commit is contained in:
2026-02-01 17:56:08 -05:00
parent 9ec5b52cd8
commit 797f6be25f
2 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
{{ define "main" }}
<div id="{{ lower .Title }}" class="page category">
<div>
<h1>{{ .Title }}</h1>
{{ with .Summary }}
<p>{{ . }}</p>
{{ end }}
</div>
{{ if ne .Params.image nil }}
{{ $path := print ".." .Params.image }}
<img src="{{ $path }}" alt="{{ lower .Title }}_image">
{{ else }}
@TODO: 404 image goes here
{{ end }}
</div>
{{ with .Content }}
<div id="content" class="page">
{{ . }}
</div>
{{ end }}
<div id="posts" class="directory">
{{ range .Paginator.Pages }}
<a href="{{ .RelPermalink }}">
<article class="post">
<h2>{{ .LinkTitle }}</h2>
<p>{{ .Summary }}</p>
</article>
</a>
{{ end }}{{ template "_internal/pagination.html" . }}
</div>
{{ end }}

View File

@@ -0,0 +1,24 @@
{{ define "expo" }}
<div id="{{ lower .Title }}" class="expo site {{ lower .Title }}">
<h1 id="title" class="site {{ lower .Title }}">{{ .Title }}</h1>
<p id="summary" class="site {{ lower .Title }}">{{ .Content }}</p>
</div>
{{ end }}
{{ define "main" }}
<div id="{{ lower .Title }}" class="directory">
{{ range .Data.Pages }}
{{ if ne .Params.image nil }}
{{ $path := print "." .Params.image }}
<div style="background-image: linear-gradient(#121212, #121212), url({{ $path }});" class="category">
{{ else }}
<div style="background-image: linear-gradient(#121212, #121212);" class="category">
{{ end }}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<!-- <img src="images/{{ lower .LinkTitle }}" alt=""> -->
{{ with .Summary }}
<p>{{ . }}</p>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}