blob: dc1c81730c1093904e7fca6b86f0e5717dd49254 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
{{ if isset $.Site.Params "adsensepublisher" }}
{{ with .Params }}
<fieldset class="ad">
<legend><strong>#ad</strong></legend>
<amp-ad type="adsense"
{{ with .class }} class="{{ . }}"{{ end }}
{{ with .alt }} alt="{{ . }}"{{ end }}
{{ with .width }} width="{{ . }}"{{ end }}
{{ with .height }} height="{{ . }}"{{ end }}
{{ with .layout }} layout="{{ . }}"{{ end }}
{{ with .slot }} data-ad-slot="{{ . }}" {{ end }}
data-ad-client="{{ $.Site.Params.adsensePublisher }}">
<div class="ad__fallback" fallback><p>{{ i18n "noAd" }}</p></div>
</amp-ad>
</fieldset>
{{ end }}
{{ else }}
{{ if isset . "context" }}
{{ $publisher := .context.Site.Params.adsensePublisher }}
<fieldset class="ad">
<legend><strong>#ad</strong></legend>
<amp-ad type="adsense"
{{ with .class }} class="{{ . }}"{{ end }}
{{ with .alt }} alt="{{ . }}"{{ end }}
{{ with .width }} width="{{ . }}"{{ end }}
{{ with .height }} height="{{ . }}"{{ end }}
{{ with .layout }} layout="{{ . }}"{{ end }}
{{ with .slot }} data-ad-slot="{{ . }}" {{ end }}
data-ad-client="{{ $publisher }}">
<div class="ad__fallback" fallback><p>{{ i18n "noAd" }}</p></div>
</amp-ad>
</fieldset>
{{ end }}
{{ end }}
|