30 lines
916 B
HTML
30 lines
916 B
HTML
{{ define "intro" }}
|
|
{{ if ne .Content "" }}
|
|
{{ partial "snippets/content" (dict "content" .Content) }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
{{ define "content" }}
|
|
{{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
|
|
{{- $paginator := "" -}}
|
|
{{- $partial := .Layout -}}
|
|
{{ $folder := "layout" }}
|
|
{{- $paginate := true -}}
|
|
{{ if eq .Kind "term" }}
|
|
{{- $pages = .Data.Pages -}}
|
|
{{ $partial = "gen_list" }}
|
|
{{ $folder = "news" }}
|
|
{{ else if eq .Kind "taxonomy" }}
|
|
{{ $paginate = false }}
|
|
{{- $pages = .Data.Terms.ByCount -}}
|
|
{{ $partial = "tags_n_categories" }}
|
|
{{ end }}
|
|
{{ if and $folder $partial }}
|
|
{{ $partial = string (printf "%s/%s" $folder $partial) }}
|
|
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|