small fixes

This commit is contained in:
teldra 2022-06-15 02:27:58 +02:00
parent 328d4ce69d
commit 30e330e7ba
2 changed files with 14 additions and 4 deletions

View File

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

View File

@ -1,5 +1,5 @@
{{ $title := .title }}
{{ $link := .link }}
{{ $p := .pages }}
{{ if and (.limit) (not .paginate) }}
{{ $p = first .limit .pages }}
@ -15,7 +15,17 @@
{{ if $p }}
<div class="gen_list">
{{ if $title }}<h2>{{ $title }}</h2>{{ end }}
{{ if $title }}
<h2>
{{ if $link }}
<a href="{{ $link | relLangURL }}">
{{ end }}
{{ $title }}
{{ if $link }}
</a>
{{ end }}
</h2>
{{ end }}
{{ range $p }}
<div class="list_item">
{{ $metas := dict "when" .Params.when "price" .Params.price }}