详情页评论改推荐列表
This commit is contained in:
@@ -1,69 +0,0 @@
|
||||
{{define "playComments"}}
|
||||
<link rel="stylesheet" href="/static/css/playComments.css">
|
||||
{{/* 播放页评论区:首屏 4 条,超出显示「查看更多评论」客户端翻页 */}}
|
||||
{{$c := .chapter}}
|
||||
{{$pageSize := .commentSize}}
|
||||
{{$total := .commentTotal}}
|
||||
{{$shown := len .comments}}
|
||||
<div
|
||||
class="play-comments"
|
||||
data-play-comments
|
||||
data-comment-page="{{if .commentPage}}{{.commentPage}}{{else}}1{{end}}"
|
||||
data-comment-size="{{if gt $pageSize 0}}{{$pageSize}}{{else}}4{{end}}"
|
||||
data-comment-total="{{$total}}"
|
||||
data-comment-loaded="{{$shown}}"
|
||||
data-object-id="{{.commentObjectID}}"
|
||||
data-object-type="{{.commentObjectType}}"
|
||||
>
|
||||
<div class="play-comments__head">
|
||||
<h2 class="play-comments__title">评论</h2>
|
||||
<span class="play-comments__count" data-comment-total-label>{{if gt $total 0}}{{$total}} 条{{else if and $c (gt $c.CountComment 0)}}{{$c.CountComment}} 条{{else if and .video (gt .video.CountComment 0)}}{{.video.CountComment}} 条{{else}}暂无评论{{end}}</span>
|
||||
</div>
|
||||
|
||||
<ul class="play-comment-list" data-comment-list>
|
||||
{{range .comments}}
|
||||
<li class="play-comment" data-comment-id="{{.ID}}">
|
||||
{{$avatar := commentAvatar .UserAvatar}}
|
||||
{{if .UserAvatar}}
|
||||
<img decoding="async" loading="lazy" class="play-comment__avatar lazy" src="/static/images/placeholder.png?v=2" data-src="{{$avatar}}" alt="评论用户头像">
|
||||
{{else}}
|
||||
<img decoding="async" loading="lazy" class="play-comment__avatar" src="/static/images/placeholder.png?v=2" data-src="{{$avatar}}" alt="评论用户头像">
|
||||
{{end}}
|
||||
<div class="play-comment__body">
|
||||
<div class="play-comment__meta">
|
||||
<span class="play-comment__name">{{if .UserName}}{{.UserName}}{{else}}匿名用户{{end}}</span>
|
||||
<span class="play-comment__time">{{formatCommentTime .CreatedAt}}</span>
|
||||
</div>
|
||||
<p class="play-comment__text">{{.Text}}</p>
|
||||
{{range .Children}}
|
||||
<div class="play-comment__reply">
|
||||
{{if .UserName}}{{.UserName}}{{else}}用户{{end}}{{if .ReplyUserName}} 回复 {{.ReplyUserName}}{{end}}:{{.Text}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="play-comment__actions">
|
||||
<span class="play-comment__action">
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/heart.svg" alt="点赞数">
|
||||
<span>{{.CountLike}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="play-comment play-comment--empty">
|
||||
<p class="play-comment__text">暂无评论</p>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
<button
|
||||
class="play-comments__more"
|
||||
type="button"
|
||||
data-comment-more
|
||||
{{if le $total $shown}}hidden{{end}}
|
||||
>
|
||||
查看更多评论
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
|
||||
</button>
|
||||
</div>
|
||||
<script defer src="/static/js/pages/playComments.js?v=5"></script>
|
||||
{{end}}
|
||||
@@ -49,10 +49,6 @@
|
||||
<summary>如何联系客服或洽谈合作?<span class="help-faq__chevron" aria-hidden="true"></span></summary>
|
||||
<p>请发送邮件至 support@huanguoai.net,我们会尽快回复。</p>
|
||||
</details>
|
||||
<details class="help-faq__item">
|
||||
<summary>如何注销账号?<span class="help-faq__chevron" aria-hidden="true"></span></summary>
|
||||
<p>请通过意见反馈或客服邮箱提交注销申请。</p>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<aside class="help-aside">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<script src="/static/js/common/compat.js?v=4"></script>
|
||||
<link rel="stylesheet" href="/static/css/base.css?v=2">
|
||||
<link rel="stylesheet" href="/static/common/DPlayer.min.css">
|
||||
<link rel="stylesheet" href="/static/css/play.css?v=26">
|
||||
<link rel="stylesheet" href="/static/css/play.css?v=27">
|
||||
<script defer src="/static/common/hls.min.js"></script>
|
||||
<script defer src="/static/common/DPlayer.min.js?v=2"></script>
|
||||
</head>
|
||||
@@ -331,8 +331,40 @@
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<section class="play-dual" aria-label="评论与热榜">
|
||||
{{template "playComments" .}}
|
||||
<section class="play-dual" aria-label="推荐与热榜">
|
||||
{{if .guessLike}}
|
||||
<section class="play-like" aria-label="猜你喜欢">
|
||||
<div class="play-like__head">
|
||||
<div class="play-like__titles">
|
||||
<h2 class="play-like__title">猜你喜欢</h2>
|
||||
<span class="play-like__desc only-pc">根据本剧题材推荐</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="play-like__refresh"
|
||||
data-guess-refresh
|
||||
data-playlet-id="{{.playlet.ID}}"
|
||||
data-page="{{.guessPage}}"
|
||||
data-page-size="{{if .guessPageSize}}{{.guessPageSize}}{{else}}6{{end}}"
|
||||
data-total="{{.guessTotal}}"
|
||||
>
|
||||
换一批
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
|
||||
</button>
|
||||
</div>
|
||||
<div class="play-like__grid" id="play-like" data-guess-grid>
|
||||
{{range .guessLike}}
|
||||
<article class="card card--play">
|
||||
<a class="card__cover lazy" href="{{playURL .Slug .ID}}" style="{{cssCoverPlaceholder}}" data-src="{{.Cover}}">
|
||||
{{if .TotalEpisode}}<span class="card__ep">全 {{.TotalEpisode}} 集</span>{{else}}<span class="card__ep">{{updateStatusText .UpdateStatus}}</span>{{end}}
|
||||
</a>
|
||||
<h3 class="card__title"><a href="{{playURL .Slug .ID}}">{{playletDisplayName .PlayName .Title}}</a></h3>
|
||||
<p class="card__meta">{{range $ti, $tag := cardTags .}}{{if $ti}} {{end}}{{if $tag.URL}}<a href="{{$tag.URL}}" {{externalLinkAttrs $tag.URL}}>{{$tag.Name}}</a>{{else}}{{$tag.Name}}{{end}}{{end}}</p>
|
||||
</article>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<aside class="play-hot" aria-label="热门短剧">
|
||||
<div class="play-hot__head">
|
||||
@@ -362,46 +394,12 @@
|
||||
</div>
|
||||
</li>
|
||||
{{else}}
|
||||
<li><p class="play-comment__text" style="padding:12px 0;color:var(--muted, #888)">暂无热榜数据</p></li>
|
||||
<li><p class="play-hot__empty" style="margin:0;padding:12px 0;color:var(--text-dim)">暂无热榜数据</p></li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
{{if .guessLike}}
|
||||
<section class="play-like" aria-label="猜你喜欢">
|
||||
<div class="play-like__head">
|
||||
<div class="play-like__titles">
|
||||
<h2 class="play-like__title">猜你喜欢</h2>
|
||||
<span class="play-like__desc only-pc">根据本剧题材推荐</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="play-like__refresh"
|
||||
data-guess-refresh
|
||||
data-playlet-id="{{.playlet.ID}}"
|
||||
data-page="{{.guessPage}}"
|
||||
data-page-size="{{if .guessPageSize}}{{.guessPageSize}}{{else}}6{{end}}"
|
||||
data-total="{{.guessTotal}}"
|
||||
>
|
||||
换一批
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
|
||||
</button>
|
||||
</div>
|
||||
<div class="play-like__grid" id="play-like" data-guess-grid>
|
||||
{{range .guessLike}}
|
||||
<article class="card card--play">
|
||||
<a class="card__cover lazy" href="{{playURL .Slug .ID}}" style="{{cssCoverPlaceholder}}" data-src="{{.Cover}}">
|
||||
{{if .TotalEpisode}}<span class="card__ep">全 {{.TotalEpisode}} 集</span>{{else}}<span class="card__ep">{{updateStatusText .UpdateStatus}}</span>{{end}}
|
||||
</a>
|
||||
<h3 class="card__title"><a href="{{playURL .Slug .ID}}">{{playletDisplayName .PlayName .Title}}</a></h3>
|
||||
<p class="card__meta">{{range $ti, $tag := cardTags .}}{{if $ti}} {{end}}{{if $tag.URL}}<a href="{{$tag.URL}}" {{externalLinkAttrs $tag.URL}}>{{$tag.Name}}</a>{{else}}{{$tag.Name}}{{end}}{{end}}</p>
|
||||
</article>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<div class="play-promo play-promo--bottom">
|
||||
{{if .advitise}}{{template "ads" (adSlice .advitise.DetailBannerList 2 2)}}{{end}}
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<script src="/static/js/common/compat.js?v=4"></script>
|
||||
<link rel="stylesheet" href="/static/css/base.css?v=2">
|
||||
<link rel="stylesheet" href="/static/common/DPlayer.min.css">
|
||||
<link rel="stylesheet" href="/static/css/play.css?v=26">
|
||||
<link rel="stylesheet" href="/static/css/play.css?v=27">
|
||||
<script defer src="/static/common/hls.min.js"></script>
|
||||
<script defer src="/static/common/DPlayer.min.js?v=2"></script>
|
||||
</head>
|
||||
@@ -181,8 +181,40 @@
|
||||
{{if .advitise}}{{template "ads" (adSlice .advitise.DetailBannerList 0 2)}}{{end}}
|
||||
</div>
|
||||
|
||||
<section class="play-dual" aria-label="评论与热榜">
|
||||
{{template "playComments" .}}
|
||||
<section class="play-dual" aria-label="推荐与热榜">
|
||||
{{if .guessLike}}
|
||||
<section class="play-like" aria-label="猜你喜欢">
|
||||
<div class="play-like__head">
|
||||
<div class="play-like__titles">
|
||||
<h2 class="play-like__title">猜你喜欢</h2>
|
||||
<span class="play-like__desc only-pc">根据本剧题材推荐</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="play-like__refresh"
|
||||
data-guess-refresh
|
||||
data-playlet-id="{{.guessPlayletID}}"
|
||||
data-page="{{.guessPage}}"
|
||||
data-page-size="{{if .guessPageSize}}{{.guessPageSize}}{{else}}6{{end}}"
|
||||
data-total="{{.guessTotal}}"
|
||||
>
|
||||
换一批
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
|
||||
</button>
|
||||
</div>
|
||||
<div class="play-like__grid" id="play-like" data-guess-grid>
|
||||
{{range .guessLike}}
|
||||
<article class="card card--play">
|
||||
<a class="card__cover lazy" href="{{playURL .Slug .ID}}" style="{{cssCoverPlaceholder}}" data-src="{{.Cover}}">
|
||||
{{if .TotalEpisode}}<span class="card__ep">全 {{.TotalEpisode}} 集</span>{{else}}<span class="card__ep">{{updateStatusText .UpdateStatus}}</span>{{end}}
|
||||
</a>
|
||||
<h3 class="card__title"><a href="{{playURL .Slug .ID}}">{{playletDisplayName .PlayName .Title}}</a></h3>
|
||||
<p class="card__meta">{{range $ti, $tag := cardTags .}}{{if $ti}} {{end}}{{if $tag.URL}}<a href="{{$tag.URL}}" {{externalLinkAttrs $tag.URL}}>{{$tag.Name}}</a>{{else}}{{$tag.Name}}{{end}}{{end}}</p>
|
||||
</article>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<aside class="play-hot" aria-label="热门短剧">
|
||||
<div class="play-hot__head">
|
||||
@@ -212,46 +244,12 @@
|
||||
</div>
|
||||
</li>
|
||||
{{else}}
|
||||
<li><p class="play-comment__text" style="padding:12px 0;color:var(--muted, #888)">暂无热榜数据</p></li>
|
||||
<li><p class="play-hot__empty" style="margin:0;padding:12px 0;color:var(--text-dim)">暂无热榜数据</p></li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
{{if .guessLike}}
|
||||
<section class="play-like" aria-label="猜你喜欢">
|
||||
<div class="play-like__head">
|
||||
<div class="play-like__titles">
|
||||
<h2 class="play-like__title">猜你喜欢</h2>
|
||||
<span class="play-like__desc only-pc">根据本剧题材推荐</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="play-like__refresh"
|
||||
data-guess-refresh
|
||||
data-playlet-id="{{.guessPlayletID}}"
|
||||
data-page="{{.guessPage}}"
|
||||
data-page-size="{{if .guessPageSize}}{{.guessPageSize}}{{else}}6{{end}}"
|
||||
data-total="{{.guessTotal}}"
|
||||
>
|
||||
换一批
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
|
||||
</button>
|
||||
</div>
|
||||
<div class="play-like__grid" id="play-like" data-guess-grid>
|
||||
{{range .guessLike}}
|
||||
<article class="card card--play">
|
||||
<a class="card__cover lazy" href="{{playURL .Slug .ID}}" style="{{cssCoverPlaceholder}}" data-src="{{.Cover}}">
|
||||
{{if .TotalEpisode}}<span class="card__ep">全 {{.TotalEpisode}} 集</span>{{else}}<span class="card__ep">{{updateStatusText .UpdateStatus}}</span>{{end}}
|
||||
</a>
|
||||
<h3 class="card__title"><a href="{{playURL .Slug .ID}}">{{playletDisplayName .PlayName .Title}}</a></h3>
|
||||
<p class="card__meta">{{range $ti, $tag := cardTags .}}{{if $ti}} {{end}}{{if $tag.URL}}<a href="{{$tag.URL}}" {{externalLinkAttrs $tag.URL}}>{{$tag.Name}}</a>{{else}}{{$tag.Name}}{{end}}{{end}}</p>
|
||||
</article>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
<div class="play-promo play-promo--bottom">
|
||||
{{if .advitise}}{{template "ads" (adSlice .advitise.DetailBannerList 2 2)}}{{end}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user