广告添加
This commit is contained in:
@@ -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}}
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
hidden
|
||||
>
|
||||
{{if $dialog.Link}}
|
||||
<a class="dialog-ad-media" href="{{$dialog.Link}}" target="_blank" rel="sponsored nofollow noopener noreferrer" aria-label="{{if $dialog.Title}}{{$dialog.Title}}{{else}}查看广告{{end}}" data-creative-id="{{$dialog.ID}}">
|
||||
<a class="dialog-ad-media" href="{{$dialog.Link}}" target="_blank" rel="sponsored nofollow noopener noreferrer" aria-label="{{if $dialog.Title}}{{$dialog.Title}}{{else}}查看广告{{end}}" data-creative-id="{{$dialog.ID}}"{{if $dialog.ClickTrackable}} data-ads-id="{{$dialog.ClickID}}" data-ads-location="{{$dialog.Location}}"{{end}}>
|
||||
<img class="dialog-ad-image" src="/static/images/placeholder.png?v=2" data-dialog-ad-src="{{$dialog.Images}}" alt="{{$dialog.Title}}" title="{{$dialog.Title}}" decoding="async" />
|
||||
</a>
|
||||
{{else}}
|
||||
<div class="dialog-ad-media">
|
||||
<div class="dialog-ad-media"{{if $dialog.ClickTrackable}} data-ads-id="{{$dialog.ClickID}}" data-ads-location="{{$dialog.Location}}"{{end}}>
|
||||
<img class="dialog-ad-image" src="/static/images/placeholder.png?v=2" data-dialog-ad-src="{{$dialog.Images}}" alt="{{$dialog.Title}}" title="{{$dialog.Title}}" decoding="async" />
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -34,6 +34,6 @@
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<script defer src="/static/js/pages/dialogAd.js?v=5"></script>
|
||||
<script defer src="/static/js/pages/dialogAd.js?v=6"></script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<button class="eight-pop-btn eight-pop-btn--exit" type="button" data-eight-pop-exit>我未满18岁-退出</button>
|
||||
</div>
|
||||
</div>
|
||||
<button class="eight-pop-close" type="button" data-eight-pop-exit aria-label="关闭并退出访问">
|
||||
<button class="eight-pop-close" type="button" data-eight-pop-confirm aria-label="关闭并进入网站">
|
||||
<img src="/static/images/figma-age/close.svg" width="36" height="36" alt="" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/js/pages/eightPop.js?v=4"></script>
|
||||
<script src="/static/js/pages/eightPop.js?v=5"></script>
|
||||
{{end}}
|
||||
|
||||
@@ -166,7 +166,8 @@
|
||||
</div>
|
||||
|
||||
<script defer src="/static/js/common/request.js?v=3"></script>
|
||||
<script defer src="/static/js/common/adClick.js?v=1"></script>
|
||||
<script defer src="/static/common/imgDecypt.js?v=2"></script>
|
||||
<script defer src="/static/js/pages/header.js?v=10"></script>
|
||||
<script defer src="/static/js/pages/dialogLoader.js?v=7"></script>
|
||||
{{template "toast" .}} {{template "eightPop" .}} {{template "dialogAd" .}} {{end}}
|
||||
{{template "toast" .}} {{template "eightPop" .}} {{template "dialogAd" .}} {{template "nineGridDialog" .}} {{end}}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{{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}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{define "nineGridDialog"}}
|
||||
{{/* 九宫格弹窗:后台位置 2(nineGridList),在年龄确认、弹窗广告之后弹出 */}}
|
||||
{{if .appConfig.NineGridList}}
|
||||
<link rel="stylesheet" href="/static/css/nineGridDialog.css?v=1" />
|
||||
<div class="nine-grid-mask" id="nineGridDialog" data-nine-grid hidden>
|
||||
<div class="nine-grid-panel" role="dialog" aria-modal="true" aria-label="推荐应用">
|
||||
<div class="nine-grid-list">
|
||||
{{range $ad := .appConfig.NineGridList}}
|
||||
<a
|
||||
class="nine-grid-item"
|
||||
{{if $ad.Link}}href="{{$ad.Link}}" target="_blank" rel="sponsored nofollow noopener noreferrer"{{else}}aria-disabled="true"{{end}}
|
||||
data-nine-grid-item
|
||||
data-creative-id="{{$ad.ID}}"
|
||||
{{if $ad.ClickTrackable}}data-ads-id="{{$ad.ClickID}}" data-ads-location="{{$ad.Location}}"{{end}}
|
||||
hidden
|
||||
>
|
||||
<img class="nine-grid-icon" src="/static/images/placeholder.png?v=2" data-nine-grid-src="{{$ad.Images}}" alt="{{$ad.Title}}" title="{{$ad.Title}}" decoding="async" />
|
||||
<span class="nine-grid-name">{{if $ad.Title}}{{$ad.Title}}{{else}}推荐应用{{end}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<button class="nine-grid-close" type="button" data-nine-grid-close aria-label="关闭">
|
||||
<img src="/static/images/figma-dialog-ad/close.svg" width="36" height="36" alt="" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script defer src="/static/js/pages/nineGridDialog.js?v=1"></script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -18,6 +18,7 @@
|
||||
{{else}}aria-disabled="true"
|
||||
{{end}}
|
||||
data-creative-id="{{$ad.ID}}"
|
||||
{{if $ad.ClickTrackable}}data-ads-id="{{$ad.ClickID}}" data-ads-location="{{$ad.Location}}"{{end}}
|
||||
>
|
||||
<span class="square-promo__cover">
|
||||
<img
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<script type="application/ld+json">{{.jsonLD}}</script>
|
||||
{{end}}
|
||||
<link rel="stylesheet" href="/static/css/index.css?v=27">
|
||||
<link rel="stylesheet" href="/static/css/detail.css?v=31">
|
||||
<link rel="stylesheet" href="/static/css/detail.css?v=32">
|
||||
<link rel="stylesheet" href="/static/css/detailHero.css?v=5">
|
||||
<link rel="stylesheet" href="/static/css/dramaTile.css?v=1" />
|
||||
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "squarePromo" dict "Ads" .appConfig.DetailTopList "SlotKey" "home_detail_top" "SlotName" "首页方块广告" "Label" "广告"}}
|
||||
{{/* 首页小图标:后台位置 13(BList) */}}
|
||||
{{template "squarePromo" dict "Ads" .appConfig.BList "SlotKey" "home_icons" "SlotName" "首页小图标" "Label" "推广"}}
|
||||
|
||||
{{range $catIndex, $category := .homeCategoryData}}
|
||||
{{if contains $category.Name "热榜"}}
|
||||
@@ -177,7 +178,6 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "homeAdRow" dict "Ads" ($.appConfig.NineGridRow $catIndex) "SlotKey" "home_nine_grid" "SlotName" "首页横幅广告" "Label" "广告"}}
|
||||
{{end}}
|
||||
|
||||
{{if .homeRecommendThemes}}
|
||||
|
||||
@@ -61,16 +61,6 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "pagination" .}}
|
||||
{{template "homeAdRow" dict "Ads" .appConfig.NineGridList "SlotKey" "list_nine_grid" "SlotName" "片库横幅广告" "Label" "广告"}}
|
||||
{{if .appConfig.BottomBanner}}
|
||||
<div class="list-ad-list" aria-label="广告">
|
||||
{{range $ad := .appConfig.BottomBanner}}
|
||||
<a class="list-ad" {{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}}" width="758" height="94">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</main>
|
||||
{{template "footer" .}}
|
||||
|
||||
@@ -106,7 +106,9 @@
|
||||
{{template "pageConsole" .}}
|
||||
<noscript><div><img src="https://mc.yandex.ru/watch/113733101" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
||||
<script defer src="/static/common/imgDecypt.js?v=2"></script>
|
||||
<script defer src="/static/js/common/adClick.js?v=1"></script>
|
||||
{{template "dialogAd" .}}
|
||||
{{template "nineGridDialog" .}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
<script type="application/ld+json">{{.jsonLD}}</script>
|
||||
{{end}}
|
||||
<link rel="stylesheet" href="/static/css/index.css?v=27">
|
||||
<link rel="stylesheet" href="/static/css/detail.css?v=31">
|
||||
<link rel="stylesheet" href="/static/css/play.css?v=29">
|
||||
<link rel="stylesheet" href="/static/css/detail.css?v=32">
|
||||
<link rel="stylesheet" href="/static/css/play.css?v=30">
|
||||
<link rel="stylesheet" href="/static/css/dramaTile.css?v=1" />
|
||||
<link rel="stylesheet" href="/static/common/DPlayer.min.css">
|
||||
<script defer src="/static/common/hls.min.js"></script>
|
||||
|
||||
@@ -66,16 +66,6 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "pagination" .}}
|
||||
{{template "homeAdRow" dict "Ads" .appConfig.NineGridList "SlotKey" "rank_nine_grid" "SlotName" "排行榜横幅广告" "Label" "广告"}}
|
||||
{{if .appConfig.BottomBanner}}
|
||||
<div class="rank-ad-list" aria-label="广告">
|
||||
{{range $ad := .appConfig.BottomBanner}}
|
||||
<a class="rank-ad" {{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}}" width="758" height="94">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</main>
|
||||
{{template "footer" .}}
|
||||
|
||||
@@ -57,16 +57,6 @@
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "pagination" .}}
|
||||
{{template "homeAdRow" dict "Ads" .appConfig.NineGridList "SlotKey" "series_nine_grid" "SlotName" "剧集横幅广告" "Label" "广告"}}
|
||||
{{if .appConfig.BottomBanner}}
|
||||
<div class="list-ad-list" aria-label="广告">
|
||||
{{range $ad := .appConfig.BottomBanner}}
|
||||
<a class="list-ad" {{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}}" width="758" height="94">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</main>
|
||||
{{template "footer" .}}
|
||||
|
||||
@@ -47,17 +47,7 @@
|
||||
|
||||
{{template "pagination" .}}
|
||||
|
||||
{{template "homeAdRow" dict "Ads" .appConfig.NineGridList "SlotKey" "topic_nine_grid" "SlotName" "专题横幅广告" "Label" "广告"}}
|
||||
|
||||
{{if .appConfig.BottomBanner}}
|
||||
<div class="theme-index-ads" aria-label="广告">
|
||||
{{range $ad := .appConfig.BottomBanner}}
|
||||
<a class="theme-index-ad" {{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}}" width="758" height="94" />
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</main>
|
||||
{{template "footer" .}}
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user