mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-12-22 10:52:19 +00:00
layout: tweak tags presentation
This commit is contained in:
parent
8f31818370
commit
cdbbe5d1ed
1 changed files with 11 additions and 6 deletions
|
@ -5,27 +5,32 @@
|
|||
<p>
|
||||
{{ if .Params.date }}<table><tr><td>posted:</td><td>{{ $postDate }}</td></tr>{{- if ne $postDate $updateDate }}<tr><td>updated:</td><td>{{ $updateDate }}</td></tr>{{ end }}</table>{{ end }}
|
||||
</p>
|
||||
<p>
|
||||
<hr>
|
||||
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
|
||||
<h2>On this page</h2>
|
||||
<p>
|
||||
<h3>On this page</h3>
|
||||
{{ .TableOfContents }}
|
||||
<hr>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{- with .Params.tags -}}
|
||||
<a href="/tags">tags</a>:<br>
|
||||
<p>
|
||||
<h3>Tags</h3>
|
||||
[<a href="/tags">all</a>]
|
||||
{{- range . }}
|
||||
{{- $tag := urlize . -}}
|
||||
[<a href='{{ absLangURL (printf "tags/%s" $tag) }}' title="{{ . }}">{{ . }}</a>]
|
||||
{{- end }}
|
||||
<br><br>
|
||||
<hr>
|
||||
{{- end }}
|
||||
</p>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Params "series" }}
|
||||
{{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }}
|
||||
{{- $relatedLimit := default 8 .Site.Params.numberOfRelatedPosts }}
|
||||
<h2>More {{ .Params.series }}</h2>
|
||||
<h3>More {{ .Params.series }}</h3>
|
||||
<ul>
|
||||
{{- range first $relatedLimit $related }}
|
||||
<li>
|
||||
|
@ -45,7 +50,7 @@
|
|||
{{- $featured := default 8 .Site.Params.numberOfFeaturedPosts }}
|
||||
{{- $featuredPosts := first $featured (where $posts "Params.featured" true)}}
|
||||
{{- with $featuredPosts }}
|
||||
<h2>Featured Posts</h2>
|
||||
<h3>Featured Posts</h3>
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li>
|
||||
|
|
Loading…
Reference in a new issue