feature: added separate list and terms templates, for posts under the taxonomy and different taxonomy terms respectively
This commit is contained in:
31
themes/sukaato/layouts/categories/list.html
Normal file
31
themes/sukaato/layouts/categories/list.html
Normal 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 }}
|
||||
24
themes/sukaato/layouts/categories/terms.html
Normal file
24
themes/sukaato/layouts/categories/terms.html
Normal 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 }}
|
||||
Reference in New Issue
Block a user