Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruPagge <git@upagge.ru>2021-06-04 22:05:54 +0300
committeruPagge <git@upagge.ru>2021-06-04 22:05:54 +0300
commitf38980024169bde496cdcc50b802d45e730ee713 (patch)
tree46c491bb26af69ef78d406e0ac77d893849244ea
parente0d0b4ad146f397594799d97bdd325f6c906b2d8 (diff)
ads fix
-rw-r--r--layouts/partials/assets.html2
-rw-r--r--layouts/shortcodes/ads.html2
-rw-r--r--layouts/shortcodes/block-media-column.html6
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 -}}
<script>
const ads = "no-adb";
@@ -215,5 +216,6 @@
}
}</script>
{{- 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 }}
<aside>
<div class="{{ if $.Get `circuit` | ne false }}cat-cit{{ end }}">
@@ -15,4 +16,5 @@
</div>
</div>
</aside>
+{{ 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 "<!--split-->" -}}
-<div class="block-media block-media_column">
+{{- $col := len $cols -}}
+<div class="block-media block-media_column" style="width: 100%">
{{- range $cols -}}
- <div class="content-column">
+ <div class="content-column" style="{{if eq $col 3}} width:33%; {{else}} width: 50%;{{end}} display: inline-block">
{{- . | $.Page.RenderString -}}
</div>
{{- end -}}
</div>
-