调整UI
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
{{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}}
|
||||
@@ -5,7 +5,7 @@
|
||||
<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}}>
|
||||
<a class="promo-card" href="{{if .Link}}{{.Link}}{{else}}#{{end}}"{{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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "trackerInit"}}
|
||||
{{define "analytics"}}
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{if .isNavPage}}G-L3YLSKHDFJ{{else}}G-Z582WY8LN9{{end}}"></script>
|
||||
<script>
|
||||
@@ -20,17 +20,4 @@ gtag('config', '{{if .isNavPage}}G-L3YLSKHDFJ{{else}}G-Z582WY8LN9{{end}}');
|
||||
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}}
|
||||
@@ -0,0 +1 @@
|
||||
{{define "cardEpChip"}}<span class="card__meta-ep">{{if eq .UpdateStatus 1}}{{if .TotalEpisode}}更新至 {{.TotalEpisode}} 集{{else}}连载中{{end}}{{else if .TotalEpisode}}全 {{.TotalEpisode}} 集{{else}}{{updateStatusText .UpdateStatus}}{{end}}</span>{{end}}
|
||||
@@ -13,14 +13,6 @@
|
||||
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}}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{define "footer"}}
|
||||
<link rel="stylesheet" href="/static/css/footer.css?v=5">
|
||||
<link rel="stylesheet" href="/static/css/footer.css?v=6">
|
||||
<footer class="site-footer">
|
||||
<div class="site-footer__inner">
|
||||
<div class="site-footer__top">
|
||||
@@ -10,20 +10,20 @@
|
||||
<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">
|
||||
<a class="social__item" href="{{.config.TwitterAddr}}" target="_blank" rel="sponsored nofollow noopener" aria-label="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">
|
||||
<a class="social__item" href="{{.config.TGGroup}}" target="_blank" rel="sponsored nofollow noopener" aria-label="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">
|
||||
<a class="social__item" href="{{.config.Telegram}}" target="_blank" rel="sponsored nofollow noopener" aria-label="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">
|
||||
<a class="social__item" href="{{.config.TelegramAdd}}" target="_blank" rel="sponsored nofollow noopener" aria-label="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}}
|
||||
@@ -34,22 +34,22 @@
|
||||
<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>
|
||||
<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}}>{{.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>
|
||||
<a href="/about">关于我们</a>
|
||||
<a href="/help">常见问题</a>
|
||||
<a href="/feedback">意见反馈</a>
|
||||
<a href="{{.config.CustomerServiceHost}}"{{if .config.CustomerServiceHost}} target="_blank" rel="sponsored nofollow noopener"{{end}}>联系我们</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>
|
||||
<a href="/terms">用户条款</a>
|
||||
<a href="/privacy">隐私政策</a>
|
||||
<a href="/2257">2257 合规声明</a>
|
||||
<a href="/dmca">DMCA 版权声明</a>
|
||||
</nav>
|
||||
<div class="footer-download">
|
||||
{{$appAddr := .appConfig.AppAddr}}
|
||||
@@ -61,7 +61,7 @@
|
||||
<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">
|
||||
<a class="btn btn--primary btn--sm" href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}}>
|
||||
<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>
|
||||
@@ -69,6 +69,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{$cfg := .appConfig}}
|
||||
{{if or $cfg.ForeverURLAddr $cfg.NewURLAddr $cfg.NewURLAddr1 $cfg.NewURLAddr2}}
|
||||
<section class="footer-addrs" aria-label="访问地址">
|
||||
<div class="footer-addrs__head">
|
||||
<h3>访问地址</h3>
|
||||
<p>请收藏以下地址,防止迷路</p>
|
||||
</div>
|
||||
<div class="footer-addrs__list">
|
||||
{{if $cfg.ForeverURLAddr}}{{template "footerAddr" (dict "label" "海外永久" "url" $cfg.ForeverURLAddr)}}{{end}}
|
||||
{{if $cfg.NewURLAddr}}{{template "footerAddr" (dict "label" "最新地址" "url" $cfg.NewURLAddr)}}{{end}}
|
||||
{{if $cfg.NewURLAddr1}}{{template "footerAddr" (dict "label" "备用地址" "url" $cfg.NewURLAddr1)}}{{end}}
|
||||
{{if $cfg.NewURLAddr2}}{{template "footerAddr" (dict "label" "备用地址" "url" $cfg.NewURLAddr2)}}{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
<hr class="site-footer__rule">
|
||||
<div class="site-footer__legal">
|
||||
<p>© 2026 黄果短剧 HUANGGUO <span class="site-footer__rights">All rights reserved.</span><span class="site-footer__mobile-adult">仅限 18 岁以上成年人</span></p>
|
||||
@@ -80,3 +95,11 @@
|
||||
<script defer src="/static/common/qrcode.min.js"></script>
|
||||
<script defer src="/static/js/common/qr.js?v=1"></script>
|
||||
{{end}}
|
||||
|
||||
{{define "footerAddr"}}
|
||||
<a class="footer-addr" href="{{.url}}" target="_blank" rel="sponsored nofollow noopener">
|
||||
<span class="footer-addr__label">{{.label}}</span>
|
||||
<span class="footer-addr__url">{{navDisplayURL .url}}</span>
|
||||
<img decoding="async" loading="lazy" class="icon icon--sm footer-addr__go" src="/static/images/placeholder.png?v=2" data-src="/static/images/arrow-up-right.svg" alt="">
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
+21
-147
@@ -1,26 +1,26 @@
|
||||
{{define "header"}}
|
||||
{{$appAddr := .appConfig.AppAddr}}
|
||||
<link rel="stylesheet" href="/static/css/header.css?v=11">
|
||||
<link rel="stylesheet" href="/static/css/header.css?v=12">
|
||||
<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="首页">
|
||||
<a class="brand" href="/">
|
||||
<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>
|
||||
<a class="nav__item{{if navIsActive .URLValue $.requestPath}} is-active{{end}}" href="{{navHref .URLValue}}" {{externalLinkAttrs (navHref .URLValue)}} aria-haspopup="true">{{.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>
|
||||
<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">{{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,15 +28,15 @@
|
||||
<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>
|
||||
<a class="nav__mega-chip{{if eq $status 0}} is-active{{end}}" href="{{allListURL "" 0 0 1 1}}" role="menuitem">全部</a>
|
||||
<a class="nav__mega-chip{{if eq $status 1}} is-active{{end}}" href="{{allListURL "" 0 1 1 1}}" role="menuitem">连载中</a>
|
||||
<a class="nav__mega-chip{{if eq $status 2}} is-active{{end}}" href="{{allListURL "" 0 2 1 1}}" role="menuitem">已完结</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}}">
|
||||
<a class="nav__mega-link" href="{{moreListURL $cfg.Slug $cfg.ID 0 "" 0 1}}" role="menuitem">
|
||||
{{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}}
|
||||
@@ -50,7 +50,7 @@
|
||||
</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>
|
||||
<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}}>{{.Name}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</nav>
|
||||
@@ -96,86 +96,19 @@
|
||||
<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="搜索">
|
||||
{{$bizTG := or .appConfig.TGGroup .appConfig.Telegram}}
|
||||
{{if $bizTG}}
|
||||
<a class="site-header__icon-btn site-header__tg only-h5" href="{{$bizTG}}" target="_blank" rel="sponsored nofollow noopener" aria-label="商务合作 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}}
|
||||
<a class="site-header__icon-btn only-h5" href="/search-mobile" aria-label="搜索">
|
||||
<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">
|
||||
<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}}>
|
||||
<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>
|
||||
@@ -183,39 +116,13 @@
|
||||
<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="首页">
|
||||
<a class="brand" href="/">
|
||||
<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">
|
||||
@@ -223,7 +130,7 @@
|
||||
<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}}">
|
||||
<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}}>
|
||||
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="{{navDrawerIcon .URLValue}}" alt="{{.Name}}入口">
|
||||
{{.Name}}
|
||||
</a>
|
||||
@@ -236,59 +143,26 @@
|
||||
<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>
|
||||
<a class="drawer__tag" href="{{allListURL .Slug .ID 0 1 1}}">{{.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">
|
||||
<a class="btn btn--ghost drawer__download" href="{{if $appAddr}}{{$appAddr}}{{else}}/download-app{{end}}"{{if $appAddr}} target="_blank" rel="sponsored nofollow noopener"{{end}}>
|
||||
<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}}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
{{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}}
|
||||
@@ -12,45 +12,14 @@
|
||||
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>
|
||||
|
||||
<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}}">
|
||||
@@ -72,25 +41,10 @@
|
||||
</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>
|
||||
<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>
|
||||
@@ -111,5 +65,5 @@
|
||||
<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>
|
||||
<script defer src="/static/js/pages/playComments.js?v=5"></script>
|
||||
{{end}}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
{{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}}>立即支付 <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}}
|
||||
@@ -1,124 +0,0 @@
|
||||
{{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}}
|
||||
@@ -25,6 +25,5 @@
|
||||
<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" .}}
|
||||
{{template "analytics" .}}
|
||||
{{end}}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<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>
|
||||
<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}}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{{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">按集解锁付费剧集 永久观看</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}}
|
||||
Reference in New Issue
Block a user