Initial commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
谢宇宁
2026-09-29 11:47:47 +07:00
co-authored by Claude Opus 5.5
commit 0fbdba5ccf
622 changed files with 72105 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
{{define "accountPagination"}}
{{with .paging}}{{if gt .Total 1}}
<nav class="account-pagination" aria-label="列表分页">
{{if .PrevURL}}<a href="{{.PrevURL}}" {{externalLinkAttrs .PrevURL}}>上一页</a>{{end}}
<span>第 {{.Current}} / {{.Total}} 页 · 共 {{.Count}} 部</span>
{{if .NextURL}}<a href="{{.NextURL}}" {{externalLinkAttrs .NextURL}}>下一页</a>{{end}}
</nav>
{{end}}{{end}}
{{end}}
+15
View File
@@ -0,0 +1,15 @@
{{define "ads"}}
{{/* 入参为 advitise.detailbannerList 的切片,字段与接口一致:images / link / title
类名避免 ads/ad-slot:夸克等浏览器内置广告拦截会隐藏这类选择器 */}}
{{if .}}
<link rel="stylesheet" href="/static/css/promo.css?v=1">
<section class="promo-rail" aria-label="推荐">
{{range .}}
<a class="promo-card" href="{{if .Link}}{{.Link}}{{else}}#{{end}}" data-track-ad="external"{{if .Link}} data-ad-clickable="1"{{end}} data-ad-id="{{if .AdvertiseCode}}{{.AdvertiseCode}}{{else}}{{.ID}}{{end}}" data-creative-id="" data-ad-location="{{.Location}}" data-ad-slot-key="{{if .AdvertiseLocationCode}}{{.AdvertiseLocationCode}}{{else if .Location}}{{.Location}}{{end}}" data-ad-slot-name="{{if .AdvertiseLocationName}}{{.AdvertiseLocationName}}{{else if .Location}}广告位{{.Location}}{{end}}" data-ad-title="{{if .Title}}{{.Title}}{{else}}推荐{{end}}" data-ad-type="banner"{{if .Link}} target="_blank" rel="sponsored nofollow noopener"{{end}}>
<img decoding="async" loading="eager" class="lazy" src="/static/images/placeholder.png?v=2" data-src="{{.Images}}" data-lazy-eager="1" alt="{{if .Title}}{{.Title}}{{else}}推荐{{end}}">
<span class="tag tag--dark promo-card__tag">广告</span>
</a>
{{end}}
</section>
{{end}}
{{end}}
+64
View File
@@ -0,0 +1,64 @@
{{define "dialogAd"}}
{{if .appConfig.DialogList}}
<link rel="stylesheet" href="/static/css/dialogAd.css?v=6" />
<div
class="dialog-ad-mask"
id="dialogAd"
data-dialog-ad
hidden
>
{{range $index, $dialog := .appConfig.DialogList}}
<div
class="dialog-ad-panel"
data-dialog-ad-item
data-dialog-ad-index="{{$index}}"
data-dialog-ad-id="{{if $dialog.AdvertiseCode}}{{$dialog.AdvertiseCode}}{{else}}{{$dialog.ID}}{{end}}"
data-track-ad="external-dialog"
data-ad-id="{{if $dialog.AdvertiseCode}}{{$dialog.AdvertiseCode}}{{else}}{{$dialog.ID}}{{end}}"
data-creative-id=""
data-ad-location="{{$dialog.Location}}"
data-ad-slot-key="{{if $dialog.AdvertiseLocationCode}}{{$dialog.AdvertiseLocationCode}}{{else if $dialog.Location}}{{$dialog.Location}}{{end}}"
data-ad-slot-name="{{if $dialog.AdvertiseLocationName}}{{$dialog.AdvertiseLocationName}}{{else if $dialog.Location}}弹窗广告位{{$dialog.Location}}{{else}}弹窗广告位{{end}}"
data-ad-type="interstitial"
{{if $dialog.Link}}data-ad-clickable="1"{{end}}
role="dialog"
aria-modal="true"
aria-label="{{if $dialog.Title}}{{$dialog.Title}}{{else}}广告{{end}}"
hidden
>
<div class="dialog-ad-card">
<div class="dialog-ad-cover">
{{if $dialog.Link}}
<a class="dialog-ad-media" href="{{$dialog.Link}}" target="_blank" rel="sponsored nofollow noopener" aria-label="{{if $dialog.Title}}{{$dialog.Title}}{{else}}查看广告{{end}}" data-dialog-ad-link>
<img loading="lazy" 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">
<img loading="lazy" 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}}
<span class="tag tag--dark dialog-ad-tag">广告</span>
<button class="dialog-ad-close" type="button" data-dialog-ad-close data-ad-close aria-label="关闭广告">
<img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" width="18" height="18" alt="关闭">
</button>
</div>
<div class="dialog-ad-foot">
<div class="dialog-ad-copy">
<p class="dialog-ad-title">{{if $dialog.Title}}{{$dialog.Title}}{{else}}精彩推荐{{end}}</p>
<p class="dialog-ad-desc">每日展示一次</p>
</div>
{{if $dialog.Link}}
<a class="dialog-ad-cta" href="{{$dialog.Link}}" target="_blank" rel="sponsored nofollow noopener" data-dialog-ad-link>
<img decoding="async" loading="lazy" class="dialog-ad-cta__icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/play_hollow.svg" width="18" height="18" alt="播放">
立即前往
</a>
{{end}}
</div>
</div>
</div>
{{end}}
</div>
<script defer src="/static/js/pages/dialogAd.js?v=9"></script>
{{end}}
{{end}}
+29
View File
@@ -0,0 +1,29 @@
{{define "downloadPop"}}
{{/* 下载弹窗:链接取值与首页 app-cta 一致 → .config.AppAddr */}}
{{$appAddr := .config.AppAddr}}
<link rel="stylesheet" href="/static/css/downloadPop.css?v=2">
<div
class="download-pop"
data-download-pop
data-app-addr="{{$appAddr}}"
role="dialog"
aria-modal="true"
aria-labelledby="download-pop-title"
>
<div class="download-pop__mask" data-download-close aria-hidden="true"></div>
<div class="download-pop__panel">
<button class="download-pop__close" type="button" data-download-close aria-label="关闭">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="">
</button>
<div class="download-pop__copy">
<h2 class="download-pop__title" id="download-pop-title">下载黄果短剧 App</h2>
<p class="download-pop__desc">点击后前往黄果短剧下载页,手机打开会自动识别设备并推荐安装方式</p>
</div>
<a class="download-pop__download" href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}}>
<img decoding="async" loading="lazy" class="download-pop__download-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/download.svg" alt="">
点击下载
</a>
</div>
</div>
<script defer src="/static/js/pages/downloadPop.js?v=3"></script>
{{end}}
+27
View File
@@ -0,0 +1,27 @@
{{define "eighteen"}}
<link rel="stylesheet" href="/static/css/eighteen.css">
<script>
(function () {
try {
if (localStorage.getItem("hg_age_ok") === "1") {
document.documentElement.classList.add("eighteen-ok");
}
} catch (e) {}
})();
</script>
<div class="eighteen" data-eighteen role="dialog" aria-modal="true" aria-labelledby="eighteen-title">
<div class="eighteen__mask" aria-hidden="true"></div>
<div class="eighteen__dialog">
<div class="eighteen__badge" aria-hidden="true">18+</div>
<h2 class="eighteen__title" id="eighteen-title">这是个成人网站</h2>
<p class="eighteen__desc">本网站包含有年龄限制的内容,包括裸体和露骨色情素材的内容。点击继续即表示您确认您已年满 18 岁,或在您访问本网站时所在的司法管辖区已是成年人。</p>
<button class="btn btn--primary eighteen__enter" type="button" data-eighteen-enter>
我已年满 18 岁,进入
</button>
<button class="eighteen__exit" type="button" data-eighteen-exit>
我未满 18 岁,退出
</button>
</div>
</div>
<script src="/static/js/eighteen.js" defer></script>
{{end}}
+82
View File
@@ -0,0 +1,82 @@
{{define "footer"}}
<link rel="stylesheet" href="/static/css/footer.css?v=5">
<footer class="site-footer">
<div class="site-footer__inner">
<div class="site-footer__top">
<div class="site-footer__brand">
<div class="brand">
<img decoding="async" loading="lazy" class="brand__logo brand__logo--lg" src="/static/images/placeholder.png?v=2" data-src="/static/logo.png" alt="黄果短剧">
</div>
<p class="block__subtitle">每一帧都能解你的色</p>
<div class="social">
{{if .config.TwitterAddr}}
<a class="social__item" href="{{.config.TwitterAddr}}" target="_blank" rel="sponsored nofollow noopener" aria-label="X" data-navigation-key="footer_x" data-navigation-name="X">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/brand-x.svg" alt="X">
</a>
{{end}}
{{if .config.TGGroup}}
<a class="social__item" href="{{.config.TGGroup}}" target="_blank" rel="sponsored nofollow noopener" aria-label="Telegram" data-navigation-key="footer_telegram" data-navigation-name="Telegram">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/brand-telegram.svg" alt="Telegram">
</a>
{{else if .config.Telegram}}
<a class="social__item" href="{{.config.Telegram}}" target="_blank" rel="sponsored nofollow noopener" aria-label="Telegram" data-navigation-key="footer_telegram" data-navigation-name="Telegram">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/brand-telegram.svg" alt="Telegram">
</a>
{{else if .config.TelegramAdd}}
<a class="social__item" href="{{.config.TelegramAdd}}" target="_blank" rel="sponsored nofollow noopener" aria-label="Telegram" data-navigation-key="footer_telegram" data-navigation-name="Telegram">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/brand-telegram.svg" alt="Telegram">
</a>
{{end}}
</div>
</div>
<div class="site-footer__links">
<nav class="footer-col" aria-label="浏览">
<h3>浏览</h3>
{{range .categoryList}}
{{$isDownload := navIsDownload .URLValue .Name}}
<a href="{{if $isDownload}}{{if $.appConfig.AppAddr}}{{$.appConfig.AppAddr}}{{else}}/download-app{{end}}{{else}}{{navHref .URLValue}}{{end}}"{{if and $isDownload $.appConfig.AppAddr}} target="_blank" rel="sponsored nofollow noopener"{{else if not $isDownload}} {{externalLinkAttrs (navHref .URLValue)}}{{end}} data-navigation-key="{{.URLValue}}" data-navigation-name="{{.Name}}">{{.Name}}</a>
{{end}}
</nav>
<nav class="footer-col" aria-label="帮助">
<h3>帮助</h3>
<a href="/about" data-navigation-key="footer_about" data-navigation-name="关于我们">关于我们</a>
<a href="/help" data-navigation-key="footer_help" data-navigation-name="常见问题">常见问题</a>
<a href="/feedback" data-navigation-key="footer_feedback" data-navigation-name="意见反馈">意见反馈</a>
<a href="{{.config.CustomerServiceHost}}"{{if .config.CustomerServiceHost}} target="_blank" rel="sponsored nofollow noopener"{{end}} data-navigation-key="footer_contact" data-navigation-name="联系我们">联系我们</a>
</nav>
<nav class="footer-col" aria-label="条款">
<h3>条款</h3>
<a href="/terms" data-navigation-key="footer_terms" data-navigation-name="用户条款">用户条款</a>
<a href="/privacy" data-navigation-key="footer_privacy" data-navigation-name="隐私政策">隐私政策</a>
<a href="/2257" data-navigation-key="footer_2257" data-navigation-name="2257 合规声明">2257 合规声明</a>
<a href="/dmca" data-navigation-key="footer_dmca" data-navigation-name="DMCA 版权声明">DMCA 版权声明</a>
</nav>
<div class="footer-download">
{{$appAddr := .appConfig.AppAddr}}
<div class="qr-box"{{if $appAddr}} data-qr="{{$appAddr}}"{{end}} aria-label="扫码下载">
{{if not $appAddr}}
<img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" alt="扫码下载">
{{end}}
</div>
<div class="footer-download__copy">
<strong>扫码下载 App</strong>
<p>iOS / Android 海量短剧每日更新</p>
<a class="btn btn--primary btn--sm" href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}} data-navigation-key="footer_download" data-navigation-name="下载 APP">
<img decoding="async" loading="lazy" class="icon icon--sm" src="/static/images/placeholder.png?v=2" data-src="/static/images/download.svg" alt="下载">
下载 APP
</a>
</div>
</div>
</div>
</div>
<hr class="site-footer__rule">
<div class="site-footer__legal">
<p>© 2026 黄果短剧 HUANGGUO&nbsp; <span class="site-footer__rights">All rights reserved.</span><span class="site-footer__mobile-adult">仅限 18 岁以上成年人</span></p>
<p><span class="site-footer__adult">仅限 18 岁以上成年人&nbsp; </span>本网站所呈现之所有人员,于拍摄当时均已年满 18 岁,符合 18 U.S.C. 第 2257 章规定</p>
</div>
</div>
</footer>
<noscript><div><img src="https://mc.yandex.ru/watch/112951899" style="position:absolute; left:-9999px;" alt=""></div></noscript>
<script defer src="/static/common/qrcode.min.js"></script>
<script defer src="/static/js/common/qr.js?v=1"></script>
{{end}}
+294
View File
@@ -0,0 +1,294 @@
{{define "header"}}
{{$appAddr := .appConfig.AppAddr}}
<link rel="stylesheet" href="/static/css/header.css?v=11">
<header class="site-header">
<div class="site-header__left">
<button class="site-header__icon-btn only-h5" type="button" aria-label="菜单" data-drawer-open>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu.svg" alt="菜单">
</button>
<a class="brand" href="/" data-navigation-key="home" data-navigation-name="首页">
<img decoding="async" loading="lazy" class="brand__logo" src="/static/images/placeholder.png?v=2" data-src="/static/logo.png" alt="黄果短剧">
</a>
<nav class="nav only-pc" aria-label="主导航">
{{range .categoryList}}
{{if navHasMegaMenu .URLValue}}
<div class="nav__item-wrap">
<a class="nav__item{{if navIsActive .URLValue $.requestPath}} is-active{{end}}" href="{{navHref .URLValue}}" {{externalLinkAttrs (navHref .URLValue)}} aria-haspopup="true" data-navigation-key="{{.URLValue}}" data-navigation-name="{{.Name}}">{{.Name}}</a>
<div class="nav__mega" role="menu" aria-label="{{.Name}}快捷筛选">
<div class="nav__mega-col nav__mega-col--themes">
<p class="nav__mega-label">题材</p>
<div class="nav__mega-chips">
{{$themeSeg := listThemeSegment $.requestPath}}
{{range $.themeList}}
<a class="nav__mega-chip{{if or (eq $themeSeg .Slug) (eq $themeSeg (printf "%d" .ID))}} is-active{{end}}" href="{{allListURL .Slug .ID 0 1 1}}" role="menuitem" data-navigation-key="mega_theme_{{.ID}}" data-navigation-name="题材:{{.Name}}">{{.Name}}</a>
{{end}}
</div>
</div>
<div class="nav__mega-col nav__mega-col--status">
<p class="nav__mega-label">状态</p>
<div class="nav__mega-chips">
{{$status := listUpdateStatus $.requestPath}}
<a class="nav__mega-chip{{if eq $status 0}} is-active{{end}}" href="{{allListURL "" 0 0 1 1}}" role="menuitem" data-navigation-key="mega_status_all" data-navigation-name="状态:全部">全部</a>
<a class="nav__mega-chip{{if eq $status 1}} is-active{{end}}" href="{{allListURL "" 0 1 1 1}}" role="menuitem" data-navigation-key="mega_status_serializing" data-navigation-name="状态:连载中">连载中</a>
<a class="nav__mega-chip{{if eq $status 2}} is-active{{end}}" href="{{allListURL "" 0 2 1 1}}" role="menuitem" data-navigation-key="mega_status_completed" data-navigation-name="状态:已完结">已完结</a>
</div>
</div>
<div class="nav__mega-col nav__mega-col--links">
<p class="nav__mega-label">快捷入口</p>
{{range $i, $cfg := $.homeConfigPlaylets}}
<a class="nav__mega-link" href="{{moreListURL $cfg.Slug $cfg.ID 0 "" 0 1}}" role="menuitem" data-navigation-key="mega_section_{{$cfg.ID}}" data-navigation-name="快捷入口:{{$cfg.Name}}">
{{if eq $cfg.Name "预告片"}}
<img decoding="async" loading="lazy" class="icon icon--sm" src="/static/images/placeholder.png?v=2" data-src="/static/images/film2.svg" alt="短剧入口">
{{else}}
<img decoding="async" loading="lazy" class="icon icon--sm" src="/static/images/placeholder.png?v=2" data-src="{{navMegaIcon $i}}" alt="{{$cfg.Name}}入口">
{{end}}
{{$cfg.Name}}
</a>
{{end}}
</div>
</div>
</div>
{{else}}
{{$isDownload := navIsDownload .URLValue .Name}}
<a class="nav__item{{if navIsActive .URLValue $.requestPath}} is-active{{end}}" href="{{if $isDownload}}{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}{{else}}{{navHref .URLValue}}{{end}}"{{if and $isDownload $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{else if not $isDownload}} {{externalLinkAttrs (navHref .URLValue)}}{{end}} data-navigation-key="{{.URLValue}}" data-navigation-name="{{.Name}}">{{.Name}}</a>
{{end}}
{{end}}
</nav>
</div>
<div class="site-header__right">
<form class="search only-pc" action="/search" method="get" role="search" data-path-search data-header-search>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/search.svg" alt="搜索">
<input class="search__input" type="search" placeholder="搜索剧名 / 演员 / 标签" autocomplete="off" data-header-search-input{{if .query}} value="{{.query}}"{{end}} aria-autocomplete="list" aria-expanded="false" aria-controls="header-search-dropdown">
<button class="search__clear" type="button" aria-label="清除搜索词" data-header-search-clear{{if not .query}} hidden{{end}}>
<img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="关闭">
</button>
<div class="search-dropdown" id="header-search-dropdown" data-header-search-dropdown hidden>
<div class="search-dropdown__idle" data-header-search-idle>
<section class="search-dropdown__history" aria-label="搜索历史" data-header-search-history hidden>
<div class="search-dropdown__head">
<h2 class="search-dropdown__label">搜索历史</h2>
<button class="search-dropdown__clear" type="button" aria-label="清除搜索历史" data-header-history-clear>
<img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="清除">
</button>
</div>
<div class="search-dropdown__chips" data-header-history-chips></div>
</section>
{{if .searchTrends}}
<section class="search-dropdown__hot" aria-label="热门搜索">
<h2 class="search-dropdown__label">热门搜索</h2>
<ol class="search-dropdown__list">
{{range .searchTrends}}
<li class="search-dropdown__item">
<a class="search-dropdown__link" href="{{searchResultsURL .Title}}">
<span class="search-dropdown__rank{{if le .Rank 3}} is-top{{end}}">{{.Rank}}</span>
<span class="search-dropdown__name">{{.Title}}</span>
{{if .Badge}}
<span class="search-dropdown__badge{{if eq .Badge "新"}} search-dropdown__badge--new{{else}} search-dropdown__badge--hot{{end}}">{{.Badge}}</span>
{{end}}
<span class="search-dropdown__heat">{{.Heat}}</span>
</a>
</li>
{{end}}
</ol>
</section>
{{end}}
</div>
<div class="search-dropdown__suggest" data-header-search-suggest hidden aria-label="搜索联想"></div>
</div>
</form>
<a class="site-header__icon-btn only-h5" href="/search-mobile" aria-label="搜索" data-navigation-key="header_search" data-navigation-name="搜索">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/search_h5.svg" alt="搜索">
</a>
<a class="btn btn--ghost site-header__download" href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}} data-navigation-key="header_download" data-navigation-name="下载 APP">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/download.svg" alt="下载">
<span>下载 APP</span>
</a>
{{if not .isLoggedIn}}
<button class="btn btn--primary site-header__login" type="button" data-login-open>登录</button>
{{else}}
<div class="user-menu" data-user-menu>
<button class="user-chip" type="button" aria-haspopup="menu" aria-expanded="false" data-user-menu-toggle>
{{if .avatar}}
<img decoding="async" loading="lazy" class="user-chip__avatar lazy" src="/static/images/placeholder.png?v=2" data-src="{{.avatar}}" data-header-avatar alt="用户头像">
{{else}}
<img decoding="async" loading="lazy" class="user-chip__avatar" src="/static/images/placeholder.png?v=2" data-header-avatar alt="默认用户头像">
{{end}}
<span class="user-chip__name only-pc">{{if .userName}}{{.userName}}{{else}}游客{{end}}</span>
<span class="user-chip__coin only-pc">
<img decoding="async" loading="lazy" class="icon icon--sm" src="/static/images/placeholder.png?v=2" data-src="/static/images/coin.png" alt="金币">
<span data-header-recharge>{{if .rechargeText}}{{.rechargeText}}{{else}}0{{end}}</span>
</span>
<img decoding="async" loading="lazy" class="icon icon--sm user-chip__caret only-pc" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</button>
<div class="user-menu__dropdown" role="menu">
<div class="user-menu__profile">
{{if .avatar}}
<img decoding="async" loading="lazy" class="user-menu__avatar lazy" src="/static/images/placeholder.png?v=2" data-src="{{.avatar}}" data-header-avatar alt="用户头像">
{{else}}
<img decoding="async" loading="lazy" class="user-menu__avatar" src="/static/images/placeholder.png?v=2" data-header-avatar alt="默认用户头像">
{{end}}
<div class="user-menu__meta">
<strong>{{if .userName}}{{.userName}}{{else}}游客{{end}}</strong>
<span>{{if .userId}}ID {{.userId}}{{else}}ID —{{end}}</span>
</div>
</div>
<div class="user-menu__list">
{{if not .isRegistered}}
<button class="user-menu__item" type="button" role="menuitem" data-login-open>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/user.svg" alt="用户">
<span class="user-menu__label">账号登录</span>
<img decoding="async" loading="lazy" class="icon icon--sm user-menu__arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</button>
<button class="user-menu__item" type="button" role="menuitem" data-register-open>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/gift-dim.svg" alt="绑定账号">
<span class="user-menu__label">绑定账号</span>
<img decoding="async" loading="lazy" class="icon icon--sm user-menu__arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</button>
{{end}}
<a class="user-menu__item" href="/profile" role="menuitem" data-navigation-key="user_profile" data-navigation-name="个人中心">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu_grzx.svg" alt="个人中心">
<span class="user-menu__label">个人中心</span>
<img decoding="async" loading="lazy" class="icon icon--sm user-menu__arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</a>
<a class="user-menu__item" href="/favorites" role="menuitem" data-navigation-key="user_favorites" data-navigation-name="我的收藏">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu_sc.svg" alt="我的收藏">
<span class="user-menu__label">我的收藏</span>
{{if .favoriteCount}}<span class="user-menu__extra">{{.favoriteCount}}</span>{{end}}
<img decoding="async" loading="lazy" class="icon icon--sm user-menu__arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</a>
<a class="user-menu__item" href="/history" role="menuitem" data-navigation-key="user_history" data-navigation-name="观看历史">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu_gkls.svg" alt="观看历史">
<span class="user-menu__label">观看历史</span>
<img decoding="async" loading="lazy" class="icon icon--sm user-menu__arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</a>
<a class="user-menu__item" href="/recharge" role="menuitem" data-navigation-key="user_recharge" data-navigation-name="金币充值">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu_jbcz.svg" alt="金币充值">
<span class="user-menu__label">金币充值</span>
<span class="user-menu__extra" data-header-recharge>{{if .rechargeText}}{{.rechargeText}}{{else}}0{{end}}</span>
<img decoding="async" loading="lazy" class="icon icon--sm user-menu__arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</a>
</div>
<hr class="user-menu__rule">
<button class="user-menu__item user-menu__item--logout" type="button" role="menuitem" data-account-switch>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/logout.svg" alt="切换账号">
<span class="user-menu__label">切换账号</span>
</button>
</div>
</div>
{{end}}
</div>
</header>
<div class="drawer" data-drawer>
<div class="drawer__mask" data-drawer-close></div>
<aside class="drawer__panel" id="site-drawer" role="dialog" aria-modal="true" aria-label="侧边导航">
<div class="drawer__head">
<div class="drawer__brand-row">
<a class="brand" href="/" data-navigation-key="drawer_home" data-navigation-name="首页">
<img decoding="async" loading="lazy" class="brand__logo" src="/static/images/placeholder.png?v=2" data-src="/static/logo.png" alt="黄果短剧">
</a>
<button class="drawer__close" type="button" aria-label="关闭" data-drawer-close>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="关闭">
</button>
</div>
{{if not .isLoggedIn}}
<button class="drawer__user drawer__user--login" type="button" data-login-open>
<img decoding="async" loading="lazy" class="drawer__avatar" src="/static/images/placeholder.png?v=2" alt="默认用户头像">
<div class="drawer__user-info">
<strong>登录 / 注册</strong>
<span class="drawer__coin">登录后同步收藏与进度</span>
</div>
<img decoding="async" loading="lazy" class="icon icon--sm drawer__user-arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</button>
{{else}}
<a class="drawer__user" href="/profile" data-navigation-key="drawer_profile" data-navigation-name="个人中心">
{{if .avatar}}
<img decoding="async" loading="lazy" class="drawer__avatar lazy" src="/static/images/placeholder.png?v=2" data-src="{{.avatar}}" data-header-avatar alt="用户头像">
{{else}}
<img decoding="async" loading="lazy" class="drawer__avatar" src="/static/images/placeholder.png?v=2" data-header-avatar alt="默认用户头像">
{{end}}
<div class="drawer__user-info">
<strong>{{if .userName}}{{.userName}}{{else}}游客{{end}}</strong>
<span class="drawer__coin">
<img decoding="async" loading="lazy" class="icon icon--sm" src="/static/images/placeholder.png?v=2" data-src="/static/images/coin.png" alt="金币">
<span data-header-recharge>{{if .rechargeText}}{{.rechargeText}}{{else}}0{{end}}</span> 金币
</span>
</div>
<img decoding="async" loading="lazy" class="icon icon--sm drawer__user-arrow" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项">
</a>
{{end}}
</div>
<hr class="drawer__rule">
<nav class="drawer__nav" aria-label="页面导航">
{{range .categoryList}}
{{$isDownload := navIsDownload .URLValue .Name}}
<a class="drawer__nav-item{{if navIsActive .URLValue $.requestPath}} is-active{{end}}" href="{{if $isDownload}}{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}{{else}}{{navHref .URLValue}}{{end}}"{{if and $isDownload $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{else if not $isDownload}} {{externalLinkAttrs (navHref .URLValue)}}{{end}} data-navigation-key="{{.URLValue}}" data-navigation-name="{{.Name}}">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="{{navDrawerIcon .URLValue}}" alt="{{.Name}}入口">
{{.Name}}
</a>
{{end}}
</nav>
<hr class="drawer__rule">
<div class="drawer__tags">
<p class="drawer__tags-label">题材</p>
<div class="drawer__tag-list">
{{range .themeList}}
<a class="drawer__tag" href="{{allListURL .Slug .ID 0 1 1}}" data-navigation-key="drawer_theme_{{.ID}}" data-navigation-name="题材:{{.Name}}">{{.Name}}</a>
{{end}}
</div>
</div>
<div class="drawer__links">
{{if and .isLoggedIn (not .isRegistered)}}
<button class="drawer__link" type="button" data-login-open>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/user.svg" alt="用户">
账号登录
</button>
<button class="drawer__link" type="button" data-register-open>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/gift-dim.svg" alt="绑定账号">
绑定账号
</button>
{{end}}
<a class="drawer__link" href="/favorites" data-navigation-key="drawer_favorites" data-navigation-name="我的收藏">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu_sc.svg" alt="我的收藏">
我的收藏
</a>
<a class="drawer__link" href="/history" data-navigation-key="drawer_history" data-navigation-name="观看历史">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/menu_gkls.svg" alt="观看历史">
观看历史
</a>
</div>
<div class="drawer__foot">
<a class="btn btn--ghost drawer__download" href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}} data-navigation-key="drawer_download" data-navigation-name="下载 APP">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/download.svg" alt="下载">
下载 APP
</a>
{{if .isLoggedIn}}
<button class="drawer__logout" type="button" data-account-switch>
<img decoding="async" loading="lazy" class="icon icon--sm" src="/static/images/placeholder.png?v=2" data-src="/static/images/logout.svg" alt="切换账号">
切换账号
</button>
{{end}}
</div>
</aside>
</div>
<script defer src="/static/js/common/cookie.js?v=1"></script>
<script defer src="/static/js/common/request.js?v=6"></script>
<script defer src="/static/js/common/auth.js?v=3"></script>
<script defer src="/static/common/imgDecypt.js?v=9"></script>
<script defer src="/static/js/header.js?v=13"></script>
<script defer src="/static/js/pages/loginPop.js?v=5"></script>
<script defer src="/static/js/pages/registerPop.js?v=7"></script>
{{template "eighteen" .}}
{{template "dialogAd" .}}
{{template "loginPop" .}}
{{template "registerPop" .}}
{{template "toast" .}}
<script defer src="/static/js/common/sharePage.js?v=1"></script>
{{end}}
+93
View File
@@ -0,0 +1,93 @@
{{define "loginPop"}}
<link rel="stylesheet" href="/static/css/loginPop.css?v=5">
<div
class="login-pop"
data-login-pop
role="dialog"
aria-modal="true"
aria-labelledby="login-pop-title"
>
<div class="login-pop__mask" data-login-close aria-hidden="true"></div>
<div class="login-pop__panel">
<button class="login-pop__close" type="button" data-login-close aria-label="关闭">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="关闭">
</button>
<div class="login-pop__intro">
<h2 class="login-pop__title" id="login-pop-title" data-login-title>登录黄果短剧</h2>
<p class="login-pop__desc" data-login-desc>登录后可收藏作品、解锁付费剧集并查看观看历史</p>
</div>
<form
class="login-pop__form"
action="/api/auth/login"
method="post"
data-login-form
novalidate
>
<label class="login-pop__field" data-field="account">
<span class="login-pop__label">账号</span>
<span class="login-pop__control">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/user.svg" alt="用户" aria-hidden="true">
<input
class="login-pop__input"
type="text"
name="account"
autocomplete="username"
placeholder="请输入账号"
maxlength="16"
required
>
</span>
<span class="login-pop__error" data-field-error="account" hidden>
<img decoding="async" loading="lazy" class="login-pop__error-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" aria-hidden="true">
<span data-field-error-text></span>
</span>
</label>
<label class="login-pop__field" data-field="password">
<span class="login-pop__label">密码</span>
<span class="login-pop__control">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/lock-dim.svg" alt="密码" aria-hidden="true">
<input
class="login-pop__input"
type="password"
name="password"
autocomplete="current-password"
placeholder="请输入登录密码"
maxlength="16"
data-login-password
required
>
<button class="login-pop__toggle" type="button" data-login-toggle aria-label="显示密码">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/eye.svg" alt="显示或隐藏密码" data-login-toggle-icon>
</button>
</span>
<span class="login-pop__error" data-field-error="password" hidden>
<img decoding="async" loading="lazy" class="login-pop__error-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" aria-hidden="true">
<span data-field-error-text></span>
</span>
</label>
<div class="login-pop__meta">
<label class="login-pop__remember">
<input class="login-pop__checkbox" type="checkbox" name="remember" checked>
<span class="login-pop__check" aria-hidden="true"></span>
<span>记住登录状态</span>
</label>
</div>
<button class="btn btn--primary login-pop__submit" type="submit" data-login-submit>登录</button>
</form>
<div class="login-pop__rule" aria-hidden="true"></div>
<p class="login-pop__legal">
登录即表示你已年满 18 岁并同意
<a href="/terms">《用户条款》</a>
与
<a href="/privacy">《隐私政策》</a>
</p>
</div>
</div>
{{end}}
+41
View File
@@ -0,0 +1,41 @@
{{define "pagination"}}
<link rel="stylesheet" href="/static/css/pagination.css">
{{with .pagination}}
{{if .Visible}}
<nav class="pagination" aria-label="分页">
{{if .HasPrev}}
<a class="pagination__btn pagination__btn--prev" href="{{.PrevURL}}" {{externalLinkAttrs .PrevURL}} aria-label="上一页">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">上一页</span>
</a>
{{else}}
<span class="pagination__btn pagination__btn--prev is-disabled" aria-disabled="true">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">上一页</span>
</span>
{{end}}
{{range .Items}}
{{if .Dots}}
<span class="pagination__ellipsis" aria-hidden="true">{{.Label}}</span>
{{else}}
<a class="pagination__page{{if .Active}} is-active{{end}}" href="{{.URL}}" {{externalLinkAttrs .URL}}>{{.Label}}</a>
{{end}}
{{end}}
{{if .HasNext}}
<a class="pagination__btn" href="{{.NextURL}}" {{externalLinkAttrs .NextURL}} aria-label="下一页">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">下一页</span>
</a>
{{else}}
<span class="pagination__btn is-disabled" aria-disabled="true">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">下一页</span>
</span>
{{end}}
{{if .TotalText}}
<span class="pagination__total">{{.TotalText}}</span>
{{end}}
</nav>
{{end}}
{{end}}
{{end}}
+115
View File
@@ -0,0 +1,115 @@
{{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}}"
>
<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>
<div
class="play-composer"
data-play-composer
data-object-id="{{.commentObjectID}}"
data-object-type="{{.commentObjectType}}"
data-logged-in="{{if .isLoggedIn}}1{{else}}0{{end}}"
>
<div class="play-composer__avatar" aria-hidden="true">
{{if .avatar}}
<img decoding="async" loading="lazy" class="play-composer__avatar-img lazy" src="/static/images/placeholder.png?v=2" data-src="{{.avatar}}" alt="当前用户头像">
{{else}}
<img decoding="async" loading="lazy" class="play-composer__avatar-img" src="/static/images/placeholder.png?v=2" data-src="/static/images/profile/avatar.png" alt="默认用户头像">
{{end}}
</div>
<div class="play-composer__field">
<input
class="play-composer__input"
type="text"
maxlength="200"
placeholder="{{if .isLoggedIn}}说点什么…{{else}}登录后发表评论{{end}}"
aria-label="发表评论"
data-comment-input
{{if not .isLoggedIn}}readonly{{end}}
>
<span class="play-composer__count" data-comment-count>0 / 200</span>
</div>
{{if .isLoggedIn}}
<button class="btn btn--primary play-composer__send" type="button" data-comment-send>发布</button>
{{else}}
<button class="btn btn--primary play-composer__login" type="button" data-login-open>登录</button>
{{end}}
</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">
<button
class="play-comment__action{{if eq .IsLike 1}} is-active{{end}}"
type="button"
aria-label="点赞"
data-comment-like="{{.ID}}"
data-liked="{{if eq .IsLike 1}}1{{else}}2{{end}}"
data-like-raw="{{.CountLike}}"
>
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/heart.svg" alt="点赞">
<span data-like-count>{{.CountLike}}</span>
</button>
<button
class="play-comment__action"
type="button"
data-comment-reply
data-comment-id="{{.ID}}"
data-parents-id="{{.ID}}"
data-reply-name="{{if .UserName}}{{.UserName}}{{else}}匿名用户{{end}}"
>回复</button>
</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=4"></script>
{{end}}
+43
View File
@@ -0,0 +1,43 @@
{{define "playLinks"}}
{{/* 官方入口:GET /api/app/config/info → config / newAddressInfo(经 appConfig 合并) */}}
{{$cfg := .appConfig}}
<link rel="stylesheet" href="/static/css/playLinks.css">
<section class="play-links" aria-label="官方入口">
<div class="play-links__row">
<div class="play-links__item">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/link_globe.svg" alt="最新网址">
<span class="play-links__label">官方入口</span>
<a class="play-links__value" href="{{if $cfg.NewURLAddr}}{{$cfg.NewURLAddr}}{{else}}#{{end}}"{{if $cfg.NewURLAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}}>{{if $cfg.NewURLAddr}}{{navDisplayURL $cfg.NewURLAddr}}{{else}}-{{end}}</a>
</div>
<div class="play-links__item">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/link_refresh-cw.svg" alt="备用网址">
<span class="play-links__label">最新地址发布页</span>
<a class="play-links__value" href="{{if $cfg.NewURLAddr1}}{{$cfg.NewURLAddr1}}{{else}}#{{end}}"{{if $cfg.NewURLAddr1}} target="_blank" rel="sponsored nofollow noopener"{{end}}>{{if $cfg.NewURLAddr1}}{{navDisplayURL $cfg.NewURLAddr1}}{{else}}-{{end}}</a>
</div>
<div class="play-links__item">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/link_shield.svg" alt="永久地址">
<span class="play-links__label">备用访问地址</span>
<a class="play-links__value" href="{{if $cfg.NewURLAddr2}}{{$cfg.NewURLAddr2}}{{else}}#{{end}}"{{if $cfg.NewURLAddr2}} target="_blank" rel="sponsored nofollow noopener"{{end}}>{{if $cfg.NewURLAddr2}}{{navDisplayURL $cfg.NewURLAddr2}}{{else}}-{{end}}</a>
</div>
</div>
<div class="play-links__row">
<div class="play-links__item">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/link_award.svg" alt="防失联地址">
<span class="play-links__label">海外永久地址</span>
<a class="play-links__value" href="{{if $cfg.ForeverURLAddr}}{{$cfg.ForeverURLAddr}}{{else}}#{{end}}"{{if $cfg.ForeverURLAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}}>{{if $cfg.ForeverURLAddr}}{{navDisplayURL $cfg.ForeverURLAddr}}{{else}}-{{end}}</a>
</div>
<div class="play-links__item">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/link_smartphone.svg" alt="App 下载地址">
<span class="play-links__label">官方 App 下载</span>
{{$app := $cfg.OfficialAppAddr}}{{if not $app}}{{$app = $cfg.AppAddr}}{{end}}
<a class="play-links__value" href="{{if $app}}{{$app}}{{else}}#{{end}}"{{if $app}} target="_blank" rel="sponsored nofollow noopener"{{end}}>{{if $app}}{{navDisplayURL $app}}{{else}}-{{end}}</a>
</div>
<div class="play-links__item">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/link_send.svg" alt="Telegram 群组">
<span class="play-links__label">官方 Telegram 群</span>
{{$tg := $cfg.TGGroup}}{{if not $tg}}{{$tg = $cfg.Telegram}}{{end}}
<a class="play-links__value" href="{{if $tg}}{{$tg}}{{else}}#{{end}}"{{if $tg}} target="_blank" rel="sponsored nofollow noopener"{{end}}>{{if $tg}}点击加入{{else}}-{{end}}</a>
</div>
</div>
</section>
{{end}}
+87
View File
@@ -0,0 +1,87 @@
{{define "rechargeModal"}}
{{/* 金币充值弹窗:GET /api/app/recharge/package/list → coinList */}}
<div class="recharge-modal" data-recharge-modal hidden
data-unlock-cost="{{if .unlockCost}}{{.unlockCost}}{{else}}0{{end}}"
data-balance="{{if .balance}}{{.balance}}{{else}}0{{end}}"
>
<div class="recharge-modal__backdrop" data-recharge-close aria-hidden="true"></div>
<section class="recharge-modal__panel" role="dialog" aria-modal="true" aria-labelledby="recharge-modal-title" tabindex="-1">
<div class="recharge-modal__handle" aria-hidden="true"></div>
<div class="recharge-modal__head">
<div class="recharge-modal__heading">
<h2 id="recharge-modal-title">金币充值</h2>
{{$unlockCost := 0}}{{with .unlockCost}}{{$unlockCost = .}}{{end}}
{{if gt $unlockCost 0}}
<p class="recharge-modal__subtitle recharge-modal__subtitle--desktop">本集需 {{$unlockCost}} 金币,当前余额 {{if .balanceText}}{{.balanceText}}{{else}}{{.balance}}{{end}} 金币</p>
<p class="recharge-modal__subtitle recharge-modal__subtitle--mobile">本集需 {{$unlockCost}} 金币,当前余额 {{if .balanceText}}{{.balanceText}}{{else}}{{.balance}}{{end}} 金币</p>
{{else}}
<p class="recharge-modal__subtitle recharge-modal__subtitle--desktop">当前余额 {{if .balanceText}}{{.balanceText}}{{else}}{{.balance}}{{end}} 金币</p>
<p class="recharge-modal__subtitle recharge-modal__subtitle--mobile">当前余额 {{if .balanceText}}{{.balanceText}}{{else}}{{.balance}}{{end}} 金币</p>
{{end}}
</div>
<div class="recharge-modal__balance" aria-label="当前余额 {{if .balanceText}}{{.balanceText}}{{else}}{{.balance}}{{end}} 金币">
<span class="recharge-modal__coin recharge-modal__coin--balance" aria-hidden="true"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/coin-star.svg" alt="金币"></span>
<strong data-recharge-balance>{{if .balanceText}}{{.balanceText}}{{else}}{{.balance}}{{end}}</strong>
</div>
<button class="recharge-modal__close" type="button" data-recharge-close aria-label="关闭充值弹窗">
<img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/close.svg" alt="关闭充值窗口">
</button>
</div>
<div class="recharge-modal__packages" role="group" aria-label="选择充值套餐" data-recharge-packages>
{{range $i, $pkg := .rechargePackages}}
<button
class="recharge-modal__package{{if $pkg.Active}} is-selected{{end}}"
type="button"
data-recharge-package
data-package-id="{{$pkg.ID}}"
data-price="{{$pkg.PriceText}}"
data-coins="{{$pkg.TotalCoinText}}"
data-pay-methods="{{$pkg.PayMethodsJSON}}"
aria-pressed="{{if $pkg.Active}}true{{else}}false{{end}}"
>
<span class="recharge-modal__package-top">
<span class="recharge-modal__package-name">
<span class="recharge-modal__coin" aria-hidden="true"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/coin-star.svg" alt="金币"></span>
{{if $pkg.TotalCoinText}}{{$pkg.TotalCoinText}} 金币{{else}}{{$pkg.Name}}{{end}}
</span>
<img decoding="async" loading="lazy" class="recharge-modal__selected-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/check-circle.svg" alt="已选择">
</span>
{{if $pkg.Hint}}<span class="recharge-modal__package-detail">{{$pkg.Hint}}</span>{{end}}
<strong class="recharge-modal__package-price">¥{{$pkg.PriceText}}</strong>
</button>
{{else}}
<p class="recharge-modal__empty" data-recharge-packages-empty>暂无可购买的金币套餐</p>
{{end}}
</div>
<div class="recharge-modal__methods" role="group" aria-label="选择支付方式" data-recharge-methods>
{{range $i, $m := .rechargePayMethods}}
<button
class="recharge-modal__method{{if $m.Active}} is-selected{{end}}"
type="button"
data-recharge-method="{{$m.Type}}"
aria-pressed="{{if $m.Active}}true{{else}}false{{end}}"
>
<span class="recharge-modal__method-check" aria-hidden="true"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/check.svg" alt="安全支付"></span>
<span class="recharge-modal__method-copy"><span>{{$m.TypeName}}</span><small>即时到账</small></span>
</button>
{{else}}
<p class="recharge-modal__empty" data-recharge-methods-empty>请先选择套餐</p>
{{end}}
</div>
{{$payPrice := "0"}}
{{range .rechargePackages}}{{if .Active}}{{$payPrice = .PriceText}}{{end}}{{end}}
<button class="recharge-modal__pay" type="button" data-recharge-pay{{if not .rechargePackages}} disabled{{end}}>立即支付&nbsp; <span data-recharge-amount>¥{{$payPrice}}</span></button>
<p class="recharge-modal__status" data-recharge-status role="status" hidden></p>
<div class="recharge-modal__foot">
<span>支付即表示同意《充值协议》</span>
{{$appAddr := .appConfig.AppAddr}}
<a href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}}><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/download.svg" alt="下载 App">下载 App 免费看</a>
</div>
</section>
</div>
{{if .rechargePackageResponse}}
{{end}}
{{end}}
+124
View File
@@ -0,0 +1,124 @@
{{define "registerPop"}}
<link rel="stylesheet" href="/static/css/registerPop.css?v=5">
<div
class="register-pop"
data-register-pop
role="dialog"
aria-modal="true"
aria-labelledby="register-pop-title"
>
<div class="register-pop__mask" data-register-close aria-hidden="true"></div>
<div class="register-pop__panel">
<button class="register-pop__close" type="button" data-register-close aria-label="关闭">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/close.svg" alt="关闭">
</button>
<div class="register-pop__intro">
<h2 class="register-pop__title" id="register-pop-title">绑定账号</h2>
<p class="register-pop__desc">绑定后即可使用账号密码登录并保留当前数据</p>
</div>
<form
class="register-pop__form"
action="/api/auth/register"
method="post"
data-register-form
novalidate
>
<label class="register-pop__field" data-field="account">
<span class="register-pop__label">账号</span>
<span class="register-pop__control">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/user.svg" alt="用户" aria-hidden="true">
<input
class="register-pop__input"
type="text"
name="account"
autocomplete="username"
placeholder="6 到 20 位字母或数字"
minlength="6"
maxlength="20"
pattern="[A-Za-z0-9]{6,20}"
required
>
</span>
<span class="register-pop__error" data-field-error="account" hidden>
<img decoding="async" loading="lazy" class="register-pop__error-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" aria-hidden="true">
<span data-field-error-text></span>
</span>
</label>
<label class="register-pop__field" data-field="password">
<span class="register-pop__label">密码</span>
<span class="register-pop__control">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/lock-dim.svg" alt="密码" aria-hidden="true">
<input
class="register-pop__input"
type="password"
name="password"
autocomplete="new-password"
placeholder="8 位以上,含字母与数字"
minlength="8"
maxlength="64"
data-register-password
required
>
<button class="register-pop__toggle" type="button" data-register-toggle="password" aria-label="显示密码">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/eye.svg" alt="显示或隐藏密码" data-register-toggle-icon="password">
</button>
</span>
<span class="register-pop__error" data-field-error="password" hidden>
<img decoding="async" loading="lazy" class="register-pop__error-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" aria-hidden="true">
<span data-field-error-text></span>
</span>
</label>
<label class="register-pop__field" data-field="passwordConfirm">
<span class="register-pop__label">确认密码</span>
<span class="register-pop__control">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/lock-dim.svg" alt="密码" aria-hidden="true">
<input
class="register-pop__input"
type="password"
name="passwordConfirm"
autocomplete="new-password"
placeholder="再次输入密码"
minlength="8"
maxlength="64"
data-register-password-confirm
required
>
<button class="register-pop__toggle" type="button" data-register-toggle="confirm" aria-label="显示密码">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/eye.svg" alt="显示或隐藏密码" data-register-toggle-icon="confirm">
</button>
</span>
<span class="register-pop__error" data-field-error="passwordConfirm" hidden>
<img decoding="async" loading="lazy" class="register-pop__error-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" aria-hidden="true">
<span data-field-error-text></span>
</span>
</label>
<label class="register-pop__agree" data-field="agree">
<input class="register-pop__checkbox" type="checkbox" name="agree" required>
<span class="register-pop__check" aria-hidden="true"></span>
<span>
我已年满 18 岁,并同意
<a href="/terms">《用户条款》</a>
与
<a href="/privacy">《隐私政策》</a>
</span>
</label>
<span class="register-pop__error" data-field-error="agree" hidden>
<img decoding="async" loading="lazy" class="register-pop__error-icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" aria-hidden="true">
<span data-field-error-text></span>
</span>
<button class="btn btn--primary register-pop__submit" type="submit" data-register-submit>绑定</button>
</form>
<p class="register-pop__switch">
<span>已有账号?</span>
<a href="/login" data-login-open>立即登录</a>
</p>
</div>
</div>
{{end}}
+30
View File
@@ -0,0 +1,30 @@
{{define "seoCommon"}}
<meta name="description" content="{{.metaDescription}}">
{{if .metaKeywords}}<meta name="keywords" content="{{.metaKeywords}}">{{end}}
<meta name="robots" content="{{.robots}}">
<meta name="googlebot" content="{{.robots}}">
<!-- Search engine site verification -->
<meta name="google-site-verification" content="{{if .isNavPage}}HuzjZRHdb1AdA0Y8Ziby5zikHoBn_99t9mpOXnADvL8{{else}}VEhl0na6ZwYZgkdcdz8BcCR4LpYGFm97zbp62YqJHX4{{end}}">
<meta name="yandex-verification" content="{{if .isNavPage}}f5f965a1c5d31a69{{else}}56acf08532be3060{{end}}">
<meta name="msvalidate.01" content="57A5999E9B5167EE9039265EBCA2AE3A">
{{if .canonicalURL}}<link rel="canonical" href="{{.canonicalURL}}">{{end}}
{{if .paginationPrevURL}}<link rel="prev" href="{{.paginationPrevURL}}">{{end}}
{{if .paginationNextURL}}<link rel="next" href="{{.paginationNextURL}}">{{end}}
<meta property="og:locale" content="zh_CN">
<meta property="og:type" content="{{.ogType}}">
<meta property="og:site_name" content="{{.siteName}}">
<meta property="og:title" content="{{.metaTitle}}">
<meta property="og:description" content="{{.metaDescription}}">
{{if .canonicalURL}}<meta property="og:url" content="{{.canonicalURL}}">{{end}}
{{if .ogImage}}<meta property="og:image" content="{{.ogImage}}">{{end}}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{.metaTitle}}">
<meta name="twitter:description" content="{{.metaDescription}}">
{{if .ogImage}}<meta name="twitter:image" content="{{.ogImage}}">{{end}}
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml" sizes="any">
<link rel="icon" href="/static/favicon.png" type="image/png">
<link rel="apple-touch-icon" href="/static/favicon.png">
{{if .jsonLD}}<script type="application/ld+json">{{.jsonLD}}</script>{{end}}
<script src="/static/js/common/channel.js?v=1"></script>
{{template "trackerInit" .}}
{{end}}
+7
View File
@@ -0,0 +1,7 @@
{{define "subpageHeader"}}
<header class="subpage-header">
<a class="subpage-header__button" href="{{.backHref}}" {{externalLinkAttrs .backHref}} aria-label="返回"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/back.svg" alt="返回"></a>
<strong class="subpage-header__title">{{.pageHeading}}</strong>
<a class="subpage-header__button" href="{{.helpHref}}" {{externalLinkAttrs .helpHref}} aria-label="帮助"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/recharge/help.svg" alt="充值帮助"></a>
</header>
{{end}}
+19
View File
@@ -0,0 +1,19 @@
{{define "toast"}}
<link rel="stylesheet" href="/static/css/toast.css?v=4">
<div
class="site-toast"
id="site-toast"
data-toast
role="status"
aria-live="polite"
aria-atomic="true"
hidden
>
<div class="site-toast__panel" data-toast-panel>
<img decoding="async" loading="lazy" class="site-toast__icon" data-toast-icon-success src="/static/images/placeholder.png?v=2" data-src="/static/images/check-circle.svg" alt="操作成功" hidden>
<img decoding="async" loading="lazy" class="site-toast__icon" data-toast-icon-error src="/static/images/placeholder.png?v=2" data-src="/static/images/error-tip.svg" alt="错误提示" hidden>
<p class="site-toast__text" data-toast-text></p>
</div>
</div>
<script defer src="/static/js/common/toast.js?v=2"></script>
{{end}}
+36
View File
@@ -0,0 +1,36 @@
{{define "trackerInit"}}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{if .isNavPage}}G-L3YLSKHDFJ{{else}}G-Z582WY8LN9{{end}}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{if .isNavPage}}G-L3YLSKHDFJ{{else}}G-Z582WY8LN9{{end}}');
</script>
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function(m,e,t,r,i,k,a){
m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
})(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id={{if .isNavPage}}112952789{{else}}112951899{{end}}', 'ym');
ym({{if .isNavPage}}112952789{{else}}112951899{{end}}, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", referrer: document.referrer, url: location.href, accurateTrackBounce:true, trackLinks:true});
</script>
<!-- /Yandex.Metrika counter -->
<script>
window.__TRACKER_BOOT__ = {
appId: "{{.trackerAppId}}",
encryptedConfig: {{InJSONScript .appConfig.ReportSDKConfig}},
appVersion: "1.0.0",
pageKey: "{{.pageKey}}",
pageName: "{{.pageName}}",
userType: "{{if .isVip}}vip{{else}}normal{{end}}"
};
</script>
<script defer src="/static/common/web-sdk-v1.2.0.js?v=1"></script>
<script defer src="/static/js/tracker.js?v=1"></script>
{{end}}
+46
View File
@@ -0,0 +1,46 @@
{{define "userCenterHero"}}
<div class="profile-hero">
<div class="profile-hero__inner">
<div class="profile-identity">
<img decoding="async" loading="lazy" class="profile-identity__avatar{{if .avatar}} lazy{{end}}" src="/static/images/placeholder.png?v=2"{{if .avatar}} data-src="{{.avatar}}"{{end}} alt="个人头像">
<div class="profile-identity__copy">
<div class="profile-identity__name">{{if .userName}}{{.userName}}{{else}}未登录{{end}}</div>
<p class="profile-identity__meta">{{if .userID}}ID {{.userID}}{{else}}登录后查看账户资料{{end}}</p>
<a class="profile-identity__edit" href="/setting" aria-label="编辑资料">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M3 1.5v3m0 3v7M8 1.5v7m0 3v3m5-13v3m0 3v7M1.5 4.5h3m2 4h3m2-4h3" stroke="currentColor" stroke-linecap="round" stroke-width="1.3"/></svg>
编辑资料
</a>
</div>
</div>
<div class="profile-wallet">
<div class="profile-wallet__copy">
<p class="profile-wallet__label"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/coin.png" alt="金币">金币余额</p>
<strong class="profile-wallet__amount">{{if .balance}}{{.balance}}{{else}}—{{end}}</strong>
<p class="profile-wallet__hint">按集解锁付费剧集&nbsp; 永久观看</p>
</div>
<div class="profile-wallet__actions">
<a class="profile-wallet__recharge" href="/recharge">去充值</a>
<a class="profile-wallet__details" href="/recharge#recharge-history">交易明细</a>
</div>
</div>
</div>
<div class="profile-stats" aria-label="观看统计">
<div class="profile-stat"><strong class="profile-stat__value">{{if .historyCount}}{{.historyCount}}{{else}}—{{end}}</strong><span class="profile-stat__label">观看</span></div>
<div class="profile-stat"><strong class="profile-stat__value">{{if .favoriteCount}}{{.favoriteCount}}{{else}}—{{end}}</strong><span class="profile-stat__label">收藏</span></div>
<div class="profile-stat"><strong class="profile-stat__value">{{if .chasingCount}}{{.chasingCount}}{{else}}—{{end}}</strong><span class="profile-stat__label">追剧中</span></div>
<div class="profile-stat"><strong class="profile-stat__value">{{if .boughtChapterCount}}{{.boughtChapterCount}}{{else}}—{{end}}</strong><span class="profile-stat__label">已购剧集</span></div>
</div>
</div>
{{end}}
{{define "userCenterTabs"}}
<nav class="profile-tabs" aria-label="个人中心导航">
<div class="profile-tabs__inner">
<a class="profile-tabs__link{{if eq .accountTab "profile"}} is-active{{end}}" href="/profile"{{if eq .accountTab "profile"}} aria-current="page"{{end}} data-navigation-key="account_profile" data-navigation-name="个人中心">个人中心</a>
<a class="profile-tabs__link{{if eq .accountTab "history"}} is-active{{end}}" href="/history"{{if eq .accountTab "history"}} aria-current="page"{{end}} data-navigation-key="account_history" data-navigation-name="观看历史">观看历史</a>
<a class="profile-tabs__link{{if eq .accountTab "favorites"}} is-active{{end}}" href="/favorites"{{if eq .accountTab "favorites"}} aria-current="page"{{end}} data-navigation-key="account_favorites" data-navigation-name="我的收藏">我的收藏</a>
<a class="profile-tabs__link{{if eq .accountTab "purchased"}} is-active{{end}}" href="/purchased"{{if eq .accountTab "purchased"}} aria-current="page"{{end}} data-navigation-key="account_purchased" data-navigation-name="已购剧集">已购剧集</a>
<a class="profile-tabs__link{{if eq .accountTab "setting"}} is-active{{end}}" href="/setting"{{if eq .accountTab "setting"}} aria-current="page"{{end}} data-navigation-key="account_settings" data-navigation-name="账号设置">账号设置</a>
</div>
</nav>
{{end}}