Files
web_huangguo2_h5/app/template/pages/favorites.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

70 lines
5.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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">
<link rel="stylesheet" href="/static/css/favorites.css?v=6">
<link rel="stylesheet" href="/static/css/favorites-mobile.css?v=7">
<link rel="stylesheet" href="/static/css/search.css?v=13">
</head>
<body class="profile-page favorites-page">
{{template "header" .}}
{{template "userCenterHero" .}}
{{template "userCenterTabs" .}}
<main class="favorites-main{{if not .favorites}} is-empty{{end}}" data-favorites>
<h1 class="visually-hidden">我的收藏</h1>
<div class="favorites-toolbar" data-favorites-toolbar>
<div class="favorites-filters" role="group" aria-label="收藏筛选">
<a class="favorites-filter{{if eq .filter "all"}} is-active{{end}}" href="/favorites">全部</a>
<a class="favorites-filter favorites-filter--type{{if eq .filter "short"}} is-active{{end}}" href="/favorites/short">短剧</a>
<a class="favorites-filter favorites-filter--type{{if or (eq .filter "series") (eq .filter "chapter")}} is-active{{end}}" href="/favorites/series">视频</a>
<a class="favorites-filter{{if eq .filter "following"}} is-active{{end}}" href="/favorites/following">追剧中</a>
<a class="favorites-filter favorites-filter--complete{{if eq .filter "finished"}} is-active{{end}}" href="/favorites/finished">已看完</a>
</div>
{{if .favorites}}<button class="favorites-manage" type="button" data-favorites-manage aria-pressed="false"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/favorites/sliders.svg" alt="管理收藏"><span>管理</span></button>{{end}}
</div>
<div class="favorites-grid" data-favorites-grid{{if not .favorites}} hidden{{end}}>
{{range .favorites}}
<article class="favorites-card profile-card" data-favorites-card>
<div class="favorites-card__media">
<button class="favorites-card__remove" type="button" data-favorites-remove data-id="{{.ID}}" data-kind="{{.Kind}}"{{if .DramaID}} data-drama-id="{{.DramaID}}" data-drama-title="{{.Title}}" data-episode="{{.Episode}}" data-total-episode="{{.TotalEpisode}}"{{if .VideoID}} data-video-id="{{.VideoID}}"{{end}}{{end}} aria-label="取消收藏{{.Title}}">×</button>
{{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 profile-card__badge--hot">{{.Badge}}</span>{{end}}
{{if .URL}}</a>{{else}}</div>{{end}}
</div>
<h2 class="profile-card__title">{{if .URL}}<a href="{{.URL}}" {{externalLinkAttrs .URL}}>{{.Title}}</a>{{else}}{{.Title}}{{end}}</h2>
<p class="profile-card__meta"><span class="favorites-card__desktop-meta">{{.DesktopMeta}}</span><span class="favorites-card__mobile-meta">{{.Genre}}</span></p>
</article>
{{end}}
</div>
<section class="favorites-empty" data-favorites-empty{{if .favorites}} hidden{{end}} aria-labelledby="favorites-empty-title">
<span class="favorites-empty__icon" aria-hidden="true"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/favorites-empty/bookmark.svg" alt="收藏"></span>
<h2 class="favorites-empty__title" id="favorites-empty-title">{{if .favoritesUnavailable}}收藏暂时无法加载{{else if ne .filter "all"}}暂无相关收藏{{else}}还没有收藏的作品{{end}}</h2>
<p class="favorites-empty__description"><span class="favorites-empty__description-desktop">在播放页点击「加入收藏」,更新时第一时间提醒你</span><span class="favorites-empty__description-mobile">在播放页点击「收藏」,更新时第一时间提醒你</span></p>
<a class="favorites-empty__action" href="/"><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/favorites-empty/arrow-right.svg" alt="前往首页">去首页逛逛</a>
</section>
{{if and (not .favorites) .recommended}}
<section class="search-recommendations favorites-recommendations" aria-label="热门推荐">
<div class="search-recommendations__heading">
<h2>大家都在看</h2>
<a href="/list"><span class="search-recommendations__more-label search-recommendations__more-label--pc">查看全部</span><span class="search-recommendations__more-label search-recommendations__more-label--h5">全部</span><img decoding="async" loading="lazy" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="前往下一项"></a>
</div>
<div class="search-card-grid">
{{range .recommended}}{{template "searchCard" .}}{{end}}
</div>
</section>
{{end}}
{{template "accountPagination" .}}
</main>
{{template "footer" .}}
<script src="/static/js/favorites-manage.js?v=5" defer></script>
</body>
</html>