From f38980024169bde496cdcc50b802d45e730ee713 Mon Sep 17 00:00:00 2001 From: uPagge Date: Fri, 4 Jun 2021 22:05:54 +0300 Subject: ads fix --- layouts/partials/assets.html | 2 ++ layouts/shortcodes/ads.html | 2 ++ layouts/shortcodes/block-media-column.html | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index 5b2159a..522fd2e 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -185,6 +185,7 @@ {{- partial "plugin/script.html" . -}} {{- end -}} +{{- if .Site.Params.Advertising.Enable -}} {{- with .Site.Params.Advertising.adblockHtml -}} {{- end -}} +{{- end -}} {{- partialCached "plugin/analytics.html" . -}} \ No newline at end of file diff --git a/layouts/shortcodes/ads.html b/layouts/shortcodes/ads.html index 3161fe9..243c9ed 100644 --- a/layouts/shortcodes/ads.html +++ b/layouts/shortcodes/ads.html @@ -1,3 +1,4 @@ +{{ if eq $.Site.Params.Advertising.enable true }} {{ with cond $.IsNamedParams ($.Get "slot") "" | default $.Site.Params.Advertising.Google.Slot }} +{{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/block-media-column.html b/layouts/shortcodes/block-media-column.html index 2c367a5..9226227 100644 --- a/layouts/shortcodes/block-media-column.html +++ b/layouts/shortcodes/block-media-column.html @@ -1,9 +1,9 @@ {{- $cols := split .Inner "" -}} -
+{{- $col := len $cols -}} +
{{- range $cols -}} -
+
{{- . | $.Page.RenderString -}}
{{- end -}}
- -- cgit v1.2.3