small fixes

This commit is contained in:
teldra 2022-06-22 16:34:55 +02:00
parent 0d0958e261
commit 1b42ef0135
11 changed files with 11 additions and 31 deletions

View File

@ -6,7 +6,7 @@
{{ end }}
{{ else }}
{{- $pages := .Data.Pages -}}
{{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}
</div>
{{ end }}

View File

@ -7,11 +7,6 @@
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}}
{{- $paginator := "" -}}
{{- $partial := "gen_list" -}}
{{- $paginate := true -}}
{{- $pages = where $pages ".Params.about" "=" true -}}
{{ $partial = string (printf "news/%s" $partial) }}
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}

View File

@ -7,7 +7,7 @@
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}}
{{- $pages = where $pages ".Params.when" "ne" nil -}}
{{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}
{{ define "sidebar" }}

View File

@ -6,12 +6,7 @@
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
{{- $paginator := "" -}}
{{- $partial := "gen_list" -}}
{{- $paginate := true -}}
{{- $pages = where $pages ".Params.featured" "=" true -}}
{{ $partial = string (printf "news/%s" $partial) }}
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}

View File

@ -27,8 +27,8 @@
{{ $feat = i18n $feat }}
{{ end }}
<div class="two_lists">
{{ partial "news/gen_list" (dict "context" . "pages" $featured "title" $feat "limit" "5" )}}
{{ partial "news/gen_list" (dict "context" . "pages" $posts "title" $news "link" "news" "limit" "5" )}}
{{ partial "snippets/gen_list" (dict "context" . "pages" $featured "title" $feat "limit" "5" )}}
{{ partial "snippets/gen_list" (dict "context" . "pages" $posts "title" $news "link" "news" "limit" "5" )}}
</div>
{{ end }}

View File

@ -6,7 +6,7 @@
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}}
{{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}
{{ define "sidebar" }}

View File

@ -7,7 +7,7 @@
{{ define "content" }}
{{- $paginator := "" -}}
{{- $partial := "gen_list" -}}
{{- $partial := "snippets/gen_list" -}}
{{- $paginate := true -}}
{{- $pages := .Data.Pages -}}

View File

@ -21,7 +21,7 @@
{{ $bpxxlarge := "160em" }}
{{ if $pages }}
<div class="gen_list">
<div class="snippets/gen_list">
{{ if $title }}
<h2 style="display: flex; align-items: baseline;">
{{ if $link }}

View File

@ -1,5 +0,0 @@
<style>
{{ partial "css/container" . }}
{{ partial "css/header" . }}
</style>

View File

@ -6,7 +6,7 @@
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}}
{{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}
{{ define "sidebar" }}

View File

@ -6,13 +6,8 @@
{{ define "content" }}
{{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
{{- $paginator := "" -}}
{{- $partial := "gen_list" -}}
{{- $paginate := true -}}
{{- $pages = where $pages ".Params.recurrent" "=" true -}}
{{ $partial = string (printf "news/%s" $partial) }}
{{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }}
{{ partial "snippets/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }}
{{ end }}
{{ define "sidebar" }}