diff --git a/config.toml b/config.toml index 3b9144f3..9052575e 100644 --- a/config.toml +++ b/config.toml @@ -31,6 +31,8 @@ featured = 'featured' mainMenu = ['about'] searchSections = ['news'] + placeholder_image = "/images/l.jpg" + # data for your imprint and contact page [params.imprintdata] tel = "(+) 49 5141 907 927" diff --git a/themes/buha/assets/images/placeholder_article.jpg b/themes/buha/assets/images/placeholder_article.jpg new file mode 100644 index 00000000..4af2b7c7 Binary files /dev/null and b/themes/buha/assets/images/placeholder_article.jpg differ diff --git a/themes/buha/layouts/partials/single/article.html b/themes/buha/layouts/partials/single/article.html index c523bd71..e3ed240d 100644 --- a/themes/buha/layouts/partials/single/article.html +++ b/themes/buha/layouts/partials/single/article.html @@ -8,7 +8,9 @@ {{ partial "structure/article_meta" (dict "context" . "visible" "all") }} {{ $small := "solo" }} {{ $big := "solo" }} - {{- if and (.Resources.ByType "image") (.Content) -}} + {{ $placeholder := "/images/placeholder_article.jpg" }} + {{ $img := resources.Get $placeholder }} + {{- if or (.Resources.ByType "image") (.Content) ($img) -}} {{ $small = "multiple_small" }} {{ $big = "multiple_big" }} {{ else }} @@ -24,6 +26,11 @@