Single page template for cats/tags

This commit is contained in:
tsmitty11 2023-05-18 13:25:41 +02:00
parent c82358641f
commit 474fde6093
3 changed files with 27 additions and 4 deletions

View file

@ -33,9 +33,9 @@
{{ end }} {{ end }}
<div class="p-4 pb-5"> <div class="p-4 pb-5">
<a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a> <a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a>
<span class="grid-gray">{{ .Date.Format "2006-01-02" }}</span> <span class="grid-gray small">Published {{ .Date.Format "02/01/2006" }}</span><br>
<span class="grid-gray">Categories: {{ range .Params.categories }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>, {{ end }}</span> <span class="grid-gray small">Categories: {{ range .Params.categories }}<a class="grid-gray" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>, {{ end }}</span>
<span class="preview-content small">{{ .Content }}</span> <span class="preview-content small mt-2">{{ .Content }}</span>
</div> </div>
</div> </div>
</a> </a>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
{{ partial "head.html" . }}
<body>
{{ partial "navbar.html" . }}
<main>
<div class="container">
<h1>Category: {{ .Title }}</h1>
<ul>
{{ range .Site.RegularPages }}
{{ if in .Params.categories .Title }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</main>
<footer>
{{ partial "footer-content.html" . }}
{{ partial "footer.html" . }}
</footer>
</body>
</html>

View file

@ -4,7 +4,7 @@
<body> <body>
{{ partial "navbar.html" . }} {{ partial "navbar.html" . }}
<main> <main>
<div class="container"> <div class="container one-box">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
<ul> <ul>
{{ range .Data.Terms.Alphabetical }} {{ range .Data.Terms.Alphabetical }}