31 lines
700 B
HTML
31 lines
700 B
HTML
{{define "homeAdRow"}}
|
|
{{$ads := .Ads}}
|
|
{{if $ads}}
|
|
<link rel="stylesheet" href="/static/css/homeAdRow.css?v=3" />
|
|
<div
|
|
class="home-ad-row{{if .ExtraClass}} {{.ExtraClass}}{{end}}"
|
|
aria-label="{{if .Label}}{{.Label}}{{else}}广告{{end}}"
|
|
>
|
|
{{range $ad := $ads}}
|
|
<a
|
|
class="home-ad-banner"
|
|
{{if $ad.Link}}href="{{$ad.Link}}"
|
|
target="_blank"
|
|
rel="sponsored nofollow noopener noreferrer"
|
|
{{else}}aria-disabled="true"
|
|
{{end}}
|
|
data-creative-id="{{$ad.ID}}"
|
|
>
|
|
<img
|
|
class="lazy"
|
|
src="/static/images/placeholder.png?v=2"
|
|
data-src="{{$ad.Images}}"
|
|
alt="{{$ad.Title}}"
|
|
title="{{$ad.Title}}"
|
|
/>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|