{{- .Title -}}
@@ -28,5 +34,6 @@
{{ if .paginate }}
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
{{ end }}
+
{{ end }}
{{ end }}
diff --git a/themes/buha/layouts/partials/snippets/banner.html b/themes/buha/layouts/partials/snippets/banner.html
index 731fbdca..d16f181a 100644
--- a/themes/buha/layouts/partials/snippets/banner.html
+++ b/themes/buha/layouts/partials/snippets/banner.html
@@ -4,9 +4,25 @@
{{ if not $title }}
{{ $title = .Title }}
{{ end }}
-
-{{ $img := resources.Get "/images/banner/banner_1.jpg" }}
-{{ if .Resources.Match "banner*" }}
- {{ $img = (.Resources.GetMatch "banner*") }}
+
+{{ $what := "none" }}
+{{ $img := "none" }}
+{{ if eq .Kind "home" }}
+ {{ $what = "home" }}
+{{ else if .File.ContentBaseName }}
+ {{ $what = .File.ContentBaseName }}
+{{ end }}
+{{ $banner := printf "/images/banner/%s*" $what }}
+{{ if resources.GetMatch $banner }}
+ {{ $img = resources.GetMatch $banner }}
+{{ end }}
+
+{{ if resources.GetMatch $banner }}
+
{{ $title }}
+{{ else if .Resources.Match "banner*" }}
+ {{ $img = (.Resources.GetMatch "banner*") }}
+
{{ $title }}
+{{ else }}
+
{{ $title }}
+ {{ $banner }}
{{ end }}
-
{{ $title }}