广告修改

This commit is contained in:
谢宇宁
2026-10-28 17:40:27 +07:00
parent 41a45c8975
commit 9c0695b305
22 changed files with 516 additions and 186 deletions
-17
View File
@@ -50,8 +50,6 @@
<h2 class="visually-hidden">{{if .tabTitle}}{{.tabTitle}}{{else}}热播榜{{end}}作品列表</h2>
<p class="list-count">{{.listCount}}</p>
{{if .list}}
{{$adIdxPc := 0}}
{{$adIdxH5 := 0}}
{{$total := len .list}}
<div class="grid--list">
{{range $i, $item := .list}}
@@ -69,21 +67,6 @@
<h3 class="card__title"><a href="{{playURL $item.Slug $item.ID}}">{{if $item.PlayName}}{{$item.PlayName}}{{else}}{{$item.Title}}{{end}}</a></h3>
<p class="card__meta">{{range $ti, $tag := cardTags $item}}{{if $ti}} {{end}}{{if $tag.URL}}<a href="{{$tag.URL}}" {{externalLinkAttrs $tag.URL}}>{{$tag.Name}}</a>{{else}}{{$tag.Name}}{{end}}{{end}}</p>
</article>
{{$n := add $i 1}}
{{if and $.appConfig.DetailBannerList (lt $n $total)}}
{{if eq (mod $n 12) 0}}
<div class="list-mid-promo only-pc">
{{template "ads" (adSlice $.appConfig.DetailBannerList $adIdxPc 2)}}
</div>
{{$adIdxPc = add $adIdxPc 2}}
{{end}}
{{if eq (mod $n 6) 0}}
<div class="list-mid-promo only-h5">
{{template "ads" (adSlice $.appConfig.DetailBannerList $adIdxH5 2)}}
</div>
{{$adIdxH5 = add $adIdxH5 2}}
{{end}}
{{end}}
{{end}}
</div>
{{template "pagination" .}}