mirror of
https://github.com/ivabus/www
synced 2024-11-22 01:45:05 +03:00
Single page template for cats/tags
This commit is contained in:
parent
c82358641f
commit
474fde6093
3 changed files with 27 additions and 4 deletions
|
@ -33,9 +33,9 @@
|
|||
{{ end }}
|
||||
<div class="p-4 pb-5">
|
||||
<a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a>
|
||||
<span class="grid-gray">{{ .Date.Format "2006-01-02" }}</span>
|
||||
<span class="grid-gray">Categories: {{ range .Params.categories }}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>, {{ end }}</span>
|
||||
<span class="preview-content small">{{ .Content }}</span>
|
||||
<span class="grid-gray small">Published {{ .Date.Format "02/01/2006" }}</span><br>
|
||||
<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 mt-2">{{ .Content }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
|
23
src/layouts/categories/single.html
Normal file
23
src/layouts/categories/single.html
Normal 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>
|
|
@ -4,7 +4,7 @@
|
|||
<body>
|
||||
{{ partial "navbar.html" . }}
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="container one-box">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul>
|
||||
{{ range .Data.Terms.Alphabetical }}
|
||||
|
|
Loading…
Reference in a new issue