Browse Source

fixing category format

master
jk 3 years ago
parent
commit
507f68e30f
  1. 6
      themes/nipponalba/layouts/index.html
  2. 2
      themes/nipponalba/layouts/partials/taxonomy/categories.html

6
themes/nipponalba/layouts/index.html

@ -10,13 +10,7 @@
<section class="e-content">{{ .Content }}
</section>
<section class="info">
{{ if eq .Type "article" }}
<span class="blogs_span">{{ with .Page.Params.Blog }}Blog: {{ partial "taxonomy/blog.html" . }}{{ end }}</span><span class="info-date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></span><br/>
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><span class="reading-time">{{ .ReadingTime }}-minute read</span><br/>
<span class="tags_span">{{ with .Page.Params.tag }}Tags: {{ partial "taxonomy/tags.html" . }}{{ end }}</span>
{{ else }}
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><span class="info-date"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></a></span><br/>
{{ end }}
</section>
</article> {{ end }}
</section>

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

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