post section and taxonomy
This commit is contained in:
@@ -6,21 +6,21 @@
|
||||
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
|
||||
{{ if isset .Params "topics" }}
|
||||
{{ $count := len .Params.topics }}
|
||||
{{ if gt $count 0 }}
|
||||
{{ if isset .Params "categories" }}
|
||||
{{ $count := len .Params.categories }}
|
||||
{{ if gt $count 0 }}
|
||||
<div>
|
||||
<i class="fa fa-folder fa-fw"></i>
|
||||
{{ range $k, $v := .Params.topics }}
|
||||
<a class="post-taxonomy-topic" href="{{ $baseUrl }}topics/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }} /{{ end }}
|
||||
{{ range $k, $v := .Params.categories }}
|
||||
<a class="post-taxonomy-category" href="{{ $baseUrl }}categories/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }} /{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Params "tags" }}
|
||||
{{ $count := len .Params.tags }}
|
||||
{{ if gt $count 0 }}
|
||||
{{ $count := len .Params.tags }}
|
||||
{{ if gt $count 0 }}
|
||||
<div>
|
||||
<i class="fa fa-tags fa-fw"></i>
|
||||
{{ range $k, $v := .Params.tags }}
|
||||
|
||||
14
layouts/partials/prev-next-post.html
Normal file
14
layouts/partials/prev-next-post.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ if or (.PrevInSection) (.NextInSection) }}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-6">
|
||||
{{ if .PrevInSection }}
|
||||
<a href="{{ .PrevInSection.Permalink }}"><i class="fa fa-chevron-left fa-fw"></i>{{ .PrevInSection.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
{{ if .NextInSection }}
|
||||
<a href="{{ .NextInSection.Permalink }}">{{ .NextInSection.Title }}<i class="fa fa-chevron-right fa-fw"></i></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user