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

github.com/asurbernardo/amperage.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsur <asur@asurbernardo.com>2020-07-25 18:10:37 +0300
committerAsur <asur@asurbernardo.com>2020-07-25 18:10:37 +0300
commit019c5ee08862de7f6ac1e2969f791155a11d87ed (patch)
tree66c4f61706fbf1078c1d8f922b7b23a5e126a552
parent312aa8913556c137d35bcafb4cebd7a8363abf73 (diff)
Move auto-ads code to its own partial
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/partials/page/auto-ads.html5
2 files changed, 6 insertions, 5 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a9d0800..ea81f18 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -4,11 +4,7 @@
{{- partial "head/base.html" . -}}
</head>
<body>
- {{ with .Site.Params.AdsensePublisher }}
- {{ if eq $.Site.Params.AutoAdsEnabled true }}
- <amp-auto-ads type="adsense" data-ad-client="{{ . }}"></amp-auto-ads>
- {{ end }}
- {{ end }}
+ {{- partial "page/auto-ads.html" -}}
{{- partial "page/install-sw.html" . -}}
{{- partial "page/analytics.html" . -}}
{{- partial "structured-data/base.html" . -}}
diff --git a/layouts/partials/page/auto-ads.html b/layouts/partials/page/auto-ads.html
new file mode 100644
index 0000000..5fe26a8
--- /dev/null
+++ b/layouts/partials/page/auto-ads.html
@@ -0,0 +1,5 @@
+{{ with .Site.Params.AdsensePublisher }}
+ {{ if eq $.Site.Params.AutoAdsEnabled true }}
+ <amp-auto-ads type="adsense" data-ad-client="{{ . }}"></amp-auto-ads>
+ {{ end }}
+{{ end }} \ No newline at end of file