diff --git a/assets/images/banner/news.jpg b/assets/images/banner/news.jpg deleted file mode 100644 index 6aac5d6..0000000 Binary files a/assets/images/banner/news.jpg and /dev/null differ diff --git a/themes/buha/assets/css/article.css b/themes/buha/assets/css/article.css index 546eec1..3b7e61b 100644 --- a/themes/buha/assets/css/article.css +++ b/themes/buha/assets/css/article.css @@ -118,3 +118,6 @@ article .readmore { flex-direction: column; } +.height32 { + height: 32rem; +} diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index 4aa57bb..d74811b 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -9,12 +9,12 @@ {{ end }}
{{ if gt (len $featured) 1 }} -
+
{{ partial "layout/article_list" (dict "context" . "pages" $featured "amount" "5" "title" "Featured") }}
{{ end }} {{ if gt (len $posts) 1 }} -
+
{{ partial "layout/article_list" (dict "context" . "pages" $posts "amount" "5" "title" "News") }}
{{ end }} diff --git a/themes/buha/layouts/partials/layout/article_list.html b/themes/buha/layouts/partials/layout/article_list.html index 3b9de7e..eec33f6 100644 --- a/themes/buha/layouts/partials/layout/article_list.html +++ b/themes/buha/layouts/partials/layout/article_list.html @@ -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 -}}
{{ if .title }}

{{ .title }}

{{ end }} + {{- $home := .context.Kind }} {{- range first $amount $p -}} -
+

{{- .Title -}}

diff --git a/themes/buha/layouts/partials/snippets/banner.html b/themes/buha/layouts/partials/snippets/banner.html index d16f181..16dc6d6 100644 --- a/themes/buha/layouts/partials/snippets/banner.html +++ b/themes/buha/layouts/partials/snippets/banner.html @@ -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 }}