Tag and Categorias templates
This commit is contained in:
parent
43ddf545bf
commit
83b9fd18ee
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" -}}
|
||||
<ul class="posts">
|
||||
<h1>Category: {{ .Title }}</h1>
|
||||
{{ $regularPages := .Data.Pages -}}
|
||||
{{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
|
||||
{{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
|
||||
|
||||
{{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
|
||||
|
||||
{{ range $pages -}}
|
||||
<li>
|
||||
<span>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<time class="pull-right post-list" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
</span>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
|
@ -1,11 +1,19 @@
|
|||
{{ define "main" -}}
|
||||
<ul class="posts">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ range .Data.Pages -}}
|
||||
{{ $regularPages := .Data.Pages -}}
|
||||
{{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
|
||||
{{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
|
||||
|
||||
{{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
|
||||
|
||||
{{ range $pages -}}
|
||||
<li>
|
||||
<span>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ if eq .Kind "page" }}
|
||||
<time class="pull-right post-list" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
{{ end }}
|
||||
</span>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" -}}
|
||||
<ul class="posts">
|
||||
<h1>Tag: {{ .Title }}</h1>
|
||||
{{ $regularPages := .Data.Pages -}}
|
||||
{{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
|
||||
{{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
|
||||
|
||||
{{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
|
||||
|
||||
{{ range $pages -}}
|
||||
<li>
|
||||
<span>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
<time class="pull-right post-list" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
</span>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
Loading…
Reference in New Issue