63 lines
3.7 KiB
HTML
63 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>{{.metaTitle}}</title>
|
||
{{template "seoCommon" .}}
|
||
<link rel="stylesheet" href="/static/css/base.css">
|
||
<link rel="stylesheet" href="/static/css/profile.css?v=9">
|
||
<link rel="stylesheet" href="/static/css/profile-mobile.css?v=5">
|
||
</head>
|
||
<body class="profile-page">
|
||
{{template "header" .}}
|
||
{{template "userCenterHero" .}}
|
||
{{template "userCenterTabs" .}}
|
||
<main class="profile-main">
|
||
<h1 class="visually-hidden">个人中心</h1>
|
||
{{if .history}}
|
||
<section class="profile-section profile-section--recent" id="recent">
|
||
<div class="profile-section__head">
|
||
<div class="profile-section__heading"><h2 class="profile-section__title">最近观看</h2><span class="profile-section__subtitle">上次看到</span></div>
|
||
<a class="profile-section__more" href="/history">全部历史 <img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项"></a>
|
||
</div>
|
||
<div class="profile-grid">
|
||
{{range .history}}
|
||
<article class="profile-card">
|
||
{{if .URL}}<a class="profile-card__cover" href="{{.URL}}" {{externalLinkAttrs .URL}} aria-label="继续观看{{.Title}}">{{else}}<div class="profile-card__cover">{{end}}
|
||
<img decoding="async" class="profile-card__image lazy" src="/static/images/placeholder.png?v=2" data-src="{{.Image}}" alt="{{.Title}}" loading="lazy">
|
||
<span class="profile-card__progress"><span class="profile-card__progress-fill" style="width:{{.Progress}}"></span></span>
|
||
{{if .URL}}</a>{{else}}</div>{{end}}
|
||
<h3 class="profile-card__title">{{if .URL}}<a href="{{.URL}}" {{externalLinkAttrs .URL}}>{{.Title}}</a>{{else}}{{.Title}}{{end}}</h3>
|
||
<p class="profile-card__meta">{{.Meta}}{{if .Remaining}}<span class="profile-card__remaining"> {{.Remaining}}</span>{{end}}</p>
|
||
</article>
|
||
{{end}}
|
||
</div>
|
||
</section>
|
||
{{end}}
|
||
<section class="profile-section profile-section--favorites" id="favorites">
|
||
<div class="profile-section__head">
|
||
<div class="profile-section__heading"><h2 class="profile-section__title">我的收藏</h2><span class="profile-section__subtitle">{{if .favoriteCount}}{{.favoriteCount}}{{else}}—{{end}} 部</span></div>
|
||
<a class="profile-section__more" href="/favorites">全部收藏 <img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项"></a>
|
||
</div>
|
||
<div class="profile-grid">
|
||
{{range .favorites}}
|
||
<article class="profile-card">
|
||
{{if .URL}}<a class="profile-card__cover" href="{{.URL}}" {{externalLinkAttrs .URL}} aria-label="播放{{.Title}}">{{else}}<div class="profile-card__cover">{{end}}
|
||
<img decoding="async" class="profile-card__image lazy" src="/static/images/placeholder.png?v=2" data-src="{{.Image}}" alt="{{.Title}}" loading="lazy">
|
||
<span class="profile-card__episodes">{{.Episodes}}</span>
|
||
{{if .Badge}}<span class="profile-card__badge{{if eq .Badge "爆剧"}} profile-card__badge--hot{{end}}">{{.Badge}}</span>{{end}}
|
||
{{if .URL}}</a>{{else}}</div>{{end}}
|
||
<h3 class="profile-card__title">{{if .URL}}<a href="{{.URL}}" {{externalLinkAttrs .URL}}>{{.Title}}</a>{{else}}{{.Title}}{{end}}</h3>
|
||
<p class="profile-card__meta">{{.Meta}}</p>
|
||
</article>
|
||
{{else}}
|
||
<p class="profile-section__empty">{{if $.favoritesUnavailable}}收藏暂时无法加载{{else}}暂无收藏{{end}}</p>
|
||
{{end}}
|
||
</div>
|
||
</section>
|
||
</main>
|
||
{{template "footer" .}}
|
||
</body>
|
||
</html>
|