small fixes

This commit is contained in:
teldra 2022-05-06 14:01:05 +02:00
parent 277d9cba00
commit f41e36f2a3
5 changed files with 12 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -118,3 +118,6 @@ article .readmore {
flex-direction: column;
}
.height32 {
height: 32rem;
}

View File

@ -9,12 +9,12 @@
{{ end }}
<div style="display: flex; flex-wrap: wrap;">
{{ if gt (len $featured) 1 }}
<section style="width: 40%;">
<section class="index_section" style="width: 45%;">
{{ partial "layout/article_list" (dict "context" . "pages" $featured "amount" "5" "title" "Featured") }}
</section>
{{ end }}
{{ if gt (len $posts) 1 }}
<section style="width: 40%;">
<section class="index_section" style="width: 45%;">
{{ partial "layout/article_list" (dict "context" . "pages" $posts "amount" "5" "title" "News") }}
</section>
{{ end }}

View File

@ -6,7 +6,7 @@
{{- $paginator := .context.Paginate $pages -}}
{{ if .paginate }}
$p = $paginator.Pages
{{ $p = $paginator.Pages }}
{{ end }}
{{ if eq $paginator.PageNumber 1 }}
@ -17,8 +17,9 @@
{{- if gt (len $pages) 0 -}}
<section>
{{ if .title }}<h2>{{ .title }}</h2>{{ end }}
{{- $home := .context.Kind }}
{{- range first $amount $p -}}
<article class="article_list" style="height: 32rem;">
<article class="article_list {{- if eq $home "home" }} height32{{- end -}}">
<a href="{{- .Permalink -}}" class="no_underline">
<div class="articletitle">
<h2>{{- .Title -}}</h2>

View File

@ -9,8 +9,10 @@
{{ $img := "none" }}
{{ if eq .Kind "home" }}
{{ $what = "home" }}
{{ else if .File.ContentBaseName }}
{{ $what = .File.ContentBaseName }}
{{ else }}
{{ with .File }}
{{ $what = .File.ContentBaseName }}
{{ end }}
{{ end }}
{{ $banner := printf "/images/banner/%s*" $what }}
{{ if resources.GetMatch $banner }}