Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
36 lines
967 B
HTML
36 lines
967 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-ad-id="{{$ad.ID}}"
|
|
data-creative-id="{{$ad.ID}}"
|
|
data-ad-slot-key="{{if $.SlotKey}}{{$.SlotKey}}{{else}}home_nine_grid{{end}}"
|
|
data-ad-slot-name="{{if $.SlotName}}{{$.SlotName}}{{else}}首页横幅广告{{end}}"
|
|
data-ad-type="banner"
|
|
data-advertising-name="{{$ad.Title}}"
|
|
>
|
|
<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}}
|