Files
web_huangguo_web/app/templates/base/homeAdRow.html
T
fish03andClaude Opus 5.5 bef9f8b4ed Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 14:43:16 +07:00

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}}