广告添加

This commit is contained in:
谢宇宁
2026-10-29 20:45:09 +07:00
parent e9882465a8
commit d8f4a132af
29 changed files with 588 additions and 255 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
{{define "contentPromo"}}
{{template "squarePromo" dict "Ads" .appConfig.DetailTopList "SlotKey" "detail_top" "SlotName" "详情顶部广告" "Label" "推广内容" "PCOnly" "1"}}
{{/* 播放页小图标:后台位置 12(AList) */}}
{{template "squarePromo" dict "Ads" .appConfig.AList "SlotKey" "play_icons" "SlotName" "播放页小图标" "Label" "推广"}}
{{end}}
{{define "contentOfficialInfo"}}
@@ -34,11 +35,12 @@
{{end}}
{{end}}
{{/* 详情横幅:后台位置 3(本站字段 videoTopList),素材 720×150 */}}
{{define "contentAds"}}
{{if .appConfig.DetailBannerList}}
<div class="content-ad-stack" aria-label="广告">
{{range $ad := .appConfig.DetailBannerList}}
<a {{if $ad.Link}}href="{{$ad.Link}}" target="_blank" rel="sponsored nofollow noopener noreferrer"{{else}}aria-disabled="true"{{end}} data-creative-id="{{$ad.ID}}">
<a {{if $ad.Link}}href="{{$ad.Link}}" target="_blank" rel="sponsored nofollow noopener noreferrer"{{else}}aria-disabled="true"{{end}} data-creative-id="{{$ad.ID}}"{{if $ad.ClickTrackable}} data-ads-id="{{$ad.ClickID}}" data-ads-location="{{$ad.Location}}"{{end}}>
<img class="lazy" src="/static/images/placeholder.png?v=2" data-src="{{$ad.Images}}" alt="{{$ad.Title}}" title="{{$ad.Title}}" />
</a>
{{end}}