Files
web_huangguo2_h5/app/template/base/userCenterShell.html
T
谢宇宁andClaude Opus 5.5 0fbdba5ccf Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 11:47:47 +07:00

47 lines
3.8 KiB
HTML

{{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}}