Browse Source

fixing category and tag lists

master
jk 4 years ago
parent
commit
c2ef59eaa5
  1. 4
      config.toml
  2. 9
      themes/nipponalba/layouts/_default/list.html
  3. 2
      themes/nipponalba/layouts/partials/taxonomy/categories.html
  4. 2
      themes/nipponalba/layouts/partials/taxonomy/tags.html

4
config.toml

@ -34,8 +34,8 @@ defaultContentLanguage="en"
[taxonomies] [taxonomies]
blog = "blog" blog = "blog"
image = "image" image = "image"
tag = "tags"
category = "categories"
tag = "tag"
category = "category"
type = "type" type = "type"
likeof = "likeof" likeof = "likeof"
inreplyto = "inreplyto" inreplyto = "inreplyto"

9
themes/nipponalba/layouts/_default/list.html

@ -2,7 +2,7 @@
<div class="archive"> <div class="archive">
<div class="list-title">{{if not (eq .Name "Blog")}}{{ .Name }}{{ end }}{{if eq .Name "Blog"}}All Blogs{{ end }} <a href="{{ .Permalink }}/index.xml"><i class="fa fa-rss fa-2x fa-fw" aria-hidden="true" title="{{ .Name }} RSS feed"></i></a></div> <div class="list-title">{{if not (eq .Name "Blog")}}{{ .Name }}{{ end }}{{if eq .Name "Blog"}}All Blogs{{ end }} <a href="{{ .Permalink }}/index.xml"><i class="fa fa-rss fa-2x fa-fw" aria-hidden="true" title="{{ .Name }} RSS feed"></i></a></div>
<ul class="list-with-title"> <ul class="list-with-title">
{{ range .Data.Pages.GroupByDate "2006" }}
{{ if eq .Type "article" "blog"}}{{ range .Data.Pages.GroupByDate "2006" }}
<div class="listing-title">{{ .Key }}</div> <div class="listing-title">{{ .Key }}</div>
{{ range .Pages }} {{ range .Pages }}
<ul class="listing"> <ul class="listing">
@ -13,6 +13,13 @@
</div> </div>
{{end}} {{end}}
</div> </div>
</ul>{{ end }}{{end}}{{else}}
{{ range .Pages }}
<ul class="listing">
<div class="listing-item">
{{ if not (eq .Type "note" "photo") }}<div class="listing-post"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</div>{{else}}
<div class="listing-post"><a href="{{ .Permalink }}" title="{{ .Summary }}"><b>{{ humanize .Type }}:</b> {{ .Summary }}</div>{{end}}
</div>
</ul>{{ end }} </ul>{{ end }}
{{ end }}</ul> {{ end }}</ul>
</div> </div>

2
themes/nipponalba/layouts/partials/taxonomy/categories.html

@ -1,6 +1,6 @@
<ul class="categories"> <ul class="categories">
{{- range $index, $el := . -}} {{- range $index, $el := . -}}
<li><a class="category p-category" href="{{ ( printf "categories/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a></li>
<li><a class="category p-category" href="{{ ( printf "category/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a></li>
{{- end -}} {{- end -}}
</ul> </ul>

2
themes/nipponalba/layouts/partials/taxonomy/tags.html

@ -1,6 +1,6 @@
<ul class="tags"> <ul class="tags">
{{- range $index, $el := . -}} {{- range $index, $el := . -}}
<li><a class="tag" href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a></li>
<li><a class="tag" href="{{ ( printf "tag/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a></li>
{{- end -}} {{- end -}}
</ul> </ul>