Files
mce/templates/MetaLab-2026/html/studio/overview.html
Victor_Jay fcff28ab60 feat: Studio 概览/分析补上阅读量 + 详情页 meta 行改版
- StudioOverview 新增 TotalViews 字段,GetOverviewByUserID 查询含 SUM(views_count)
- 新增 ViewTrendStore 接口和 AggregateViewsByAuthor,UNION ALL 合并已登录+访客阅读日志按日期聚合
- 数据分析页面新增阅读量趋势折线图(绿色,Chart.js)
- 概览和数据分析页面新增总阅读量统计卡片
- 详情页 meta 行改为标签格式:作者/阅读/点赞/收藏/评论/发布时间
- 移除详情页公开状态徽章,已锁定+理由仅作者可见
2026-06-02 23:26:48 +08:00

103 lines
4.3 KiB
HTML
Raw Permalink 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.

{{template "layout/header.html" .}}
<body>
{{template "layout/nav.html" .}}
<div class="studio-wrapper">
{{template "studio/sidebar.html" .}}
<main class="studio-main">
<div class="studio-header">
<h1>创作中心</h1>
<span class="studio-subtitle">数据概览</span>
</div>
{{if .Error}}
<div class="studio-error">{{.Error}}</div>
{{else}}
<!-- 统计卡片 -->
<div class="stat-cards">
<div class="stat-card">
<div class="stat-card-icon">📝</div>
<div class="stat-card-body">
<span class="stat-card-value">{{.Overview.TotalPosts}}</span>
<span class="stat-card-label">文章总数</span>
</div>
</div>
<div class="stat-card stat-card-approved">
<div class="stat-card-icon"></div>
<div class="stat-card-body">
<span class="stat-card-value">{{.Overview.ApprovedCount}}</span>
<span class="stat-card-label">已发布</span>
</div>
</div>
<div class="stat-card stat-card-pending">
<div class="stat-card-icon"></div>
<div class="stat-card-body">
<span class="stat-card-value">{{.Overview.PendingCount}}</span>
<span class="stat-card-label">审核中</span>
</div>
</div>
<div class="stat-card stat-card-draft">
<div class="stat-card-icon">📄</div>
<div class="stat-card-body">
<span class="stat-card-value">{{.Overview.DraftCount}}</span>
<span class="stat-card-label">草稿</span>
</div>
</div>
<div class="stat-card stat-card-rejected">
<div class="stat-card-icon">↩️</div>
<div class="stat-card-body">
<span class="stat-card-value">{{.Overview.RejectedCount}}</span>
<span class="stat-card-label">已退回</span>
</div>
</div>
<div class="stat-card">
<div class="stat-card-icon">👁</div>
<div class="stat-card-body">
<span class="stat-card-value">{{.Overview.TotalViews}}</span>
<span class="stat-card-label">总阅读量</span>
</div>
</div>
</div>
<!-- 状态分布 -->
{{if gt .Overview.TotalPosts 0}}
<div class="studio-section">
<h2 class="section-title">内容分布</h2>
<div class="status-bar">
{{if gt .Overview.ApprovedCount 0}}
<div class="status-bar-segment status-bar-approved" style="flex:{{.Overview.ApprovedCount}}">已发布 {{.Overview.ApprovedCount}}</div>
{{end}}
{{if gt .Overview.DraftCount 0}}
<div class="status-bar-segment status-bar-draft" style="flex:{{.Overview.DraftCount}}">草稿 {{.Overview.DraftCount}}</div>
{{end}}
{{if gt .Overview.PendingCount 0}}
<div class="status-bar-segment status-bar-pending" style="flex:{{.Overview.PendingCount}}">审核中 {{.Overview.PendingCount}}</div>
{{end}}
{{if gt .Overview.RejectedCount 0}}
<div class="status-bar-segment status-bar-rejected" style="flex:{{.Overview.RejectedCount}}">已退回 {{.Overview.RejectedCount}}</div>
{{end}}
</div>
</div>
{{end}}
<!-- 快捷入口 -->
<div class="studio-section">
<h2 class="section-title">快捷操作</h2>
<div class="quick-actions">
<a href="/studio/write" class="quick-action-btn primary">✏️ 写新文章</a>
<a href="/studio/drafts" class="quick-action-btn">📄 草稿箱{{if gt .Overview.DraftCount 0}}{{.Overview.DraftCount}}{{end}}</a>
<a href="/studio/posts" class="quick-action-btn">📋 管理内容</a>
<a href="/studio/analytics" class="quick-action-btn">📈 数据分析</a>
</div>
</div>
{{end}}
</main>
</div>
{{template "layout/footer.html" .}}
</body>
</html>