You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

601 lines
22 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../colors_and_type.css">
<title>青核 Youthome - 消息通知</title>
<style>
:root {
--youth-primary: #26C2BB;
--youth-primary-light: #54CAC5;
--primary-bg: #E6F7F6;
--primary-border: #B3E8E4;
--bg-page: #F7F8FA;
--bg-card: #FFFFFF;
--text-title: #1F1F1F;
--text-body: #595959;
--text-muted: #8C8C8C;
--youth-border-light: #E8E8E8;
--danger: #F5222D;
--youth-warning: #FAAD14;
/* =====================================================
* Traework 设计系统 - 组件规范
* 圆角 / 间距 / 阴影 / 高度
* ===================================================== */
--radius-xs: 4px;
--radius-sm: 8px; /* 按钮、输入框 */
--radius-md: 12px; /* 卡片 */
--radius-lg: 16px; /* 标签、弹窗 */
--radius-xl: 20px;
--radius-full: 9999px;
/* 组件高度 */
--height-btn: 44px;
--height-input: 44px;
--height-nav-bottom: 64px;
/* 间距(4px 基础栅格) */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-page-x: 16px;
--space-card: 16px;
/* 柔和弥散阴影 */
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
/* 内阴影浮雕(输入框) */
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.04);
--shadow-inset-focus: inset 0 1px 3px rgba(38, 194, 187, 0.08);
/* 毛玻璃 */
--glass-bg: rgba(255, 255, 255, 0.72);
--glass-blur: blur(20px);
--glass-border: rgba(255, 255, 255, 0.3);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-secondary);
overflow-x: hidden;}
.page-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* 状态栏 */
.status-bar {
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
font-size: 15px;
font-weight: 600;
color: var(--youth-text-primary);
flex-shrink: 0;
}
/* 顶部导航 */
.top-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
height: 44px;
flex-shrink: 0;
}
.nav-btn {
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
color: var(--youth-text-primary);
cursor: pointer;
border: none;
background: transparent;
}
.nav-title { font-size: 17px; font-weight: 700; color: var(--youth-text-primary); }
.nav-btn.text-btn {
width: auto;
font-size: 14px;
font-weight: 500;
padding: 0 8px;
color: var(--youth-primary);
}
/* 分类Tab */
.category-tabs {
display: flex;
padding: 0 16px;
gap: 20px;
border-bottom: 1px solid var(--youth-border-light);
flex-shrink: 0;
overflow-x: auto;
}
.category-tabs::-webkit-scrollbar { display: none; }
.tab-item {
padding: 12px 0;
font-size: 15px;
color: var(--youth-text-tertiary);
font-weight: 500;
position: relative;
cursor: pointer;
white-space: nowrap;
transition: color 0.2s ease;
}
.tab-item.active {
color: var(--youth-text-primary);
font-weight: 700;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: -1px;
left: 50%;
transform: translateX(-50%);
width: 24px;
height: 3px;
background: var(--youth-primary);
border-radius: 16px;
}
/* 滚动区域 */
.scroll-area {
flex: 1;
overflow-y: auto;
padding-bottom: 20px;
}
.scroll-area::-webkit-scrollbar { display: none; }
/* 通知分类列表 */
.notify-category-list {
padding: 12px 0;
}
.notify-category-item {
display: flex;
align-items: center;
gap: 14px;
padding: 14px 16px;
background: var(--youth-bg-card);
margin-bottom: 1px;
cursor: pointer;
position: relative;
transition: background 0.2s ease;
}
.notify-category-item:active { background: var(--youth-bg-page); }
.notify-icon {
width: 48px;
height: 48px;
border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
position: relative;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
overflow: hidden;
}
.notify-icon::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
pointer-events: none;
}
.notify-icon svg {
color: #fff;
position: relative;
z-index: 1;
}
.notify-icon.c1 { background: linear-gradient(135deg, #54CAC5, #26C2BB); }
.notify-icon.c2 { background: linear-gradient(135deg, #FF9A8B, #FF6A88); }
.notify-icon.c3 { background: linear-gradient(135deg, #A8B5FF, #6366F1); }
.notify-icon.c4 { background: linear-gradient(135deg, #FFD666, #FAAD14); }
.notify-icon.c5 { background: linear-gradient(135deg, #8B5CF6, #6366F1); }
.notify-icon.c6 { background: linear-gradient(135deg, #34D399, #10B981); }
.notify-icon.c7 { background: linear-gradient(135deg, #F472B6, #EC4899); }
.notify-icon.c8 { background: linear-gradient(135deg, #60A5FA, #3B82F6); }
.notify-badge {
position: absolute;
top: -4px;
right: -4px;
min-width: 18px;
height: 18px;
padding: 0 5px;
background: var(--youth-danger-500);
color: #fff;
border-radius: 9px;
font-size: 11px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
border: 2px solid var(--youth-bg-card);
}
.notify-badge.dot {
min-width: 10px;
height: 10px;
padding: 0;
top: 2px;
right: 2px;
}
.notify-content {
flex: 1;
min-width: 0;
}
.notify-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 4px;
}
.notify-name {
font-size: 15px;
font-weight: 600;
color: var(--youth-text-primary);
}
.notify-time {
font-size: 11px;
color: var(--youth-text-tertiary);
flex-shrink: 0;
}
.notify-preview {
font-size: 13px;
color: var(--youth-text-tertiary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.notify-arrow {
color: var(--youth-border-light);
flex-shrink: 0;
}
/* 分组标题 */
.section-header {
padding: 16px 16px 8px;
font-size: 12px;
color: var(--youth-text-tertiary);
font-weight: 500;
}
/* 空状态 */
.empty-state {
text-align: center;
padding: 60px 20px;
}
.empty-icon {
width: 80px;
height: 80px;
margin: 0 auto 16px;
background: var(--youth-bg-card);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: var(--youth-text-tertiary);
opacity: 0.5;
}
.empty-text {
font-size: 14px;
color: var(--youth-text-tertiary);
}
/* 底部Tab导航 */
.bottom-tabs {
display: flex;
padding: 8px 0;
padding-bottom: calc(8px + env(safe-area-inset-bottom));
background: var(--youth-bg-card);
border-top: 1px solid var(--youth-border-light);
flex-shrink: 0;
}
.tab-btn {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
cursor: pointer;
color: var(--youth-text-tertiary);
font-size: 10px;
font-weight: 500;
position: relative;
}
.tab-btn.active { color: var(--youth-primary); }
.tab-btn svg { flex-shrink: 0; }
/* SVG 图标统一尺寸 */
.icon-svg {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1em;
height: 1em;
vertical-align: middle;
line-height: 1;
}
.icon-svg svg {
width: 100%;
height: 100%;
stroke: currentColor;
}
/* 侧栏图标 */
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
/* 社团logo图标 */
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
/* 头图大图标 */
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
/* meta 小图标 */
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
/* 分类选择网格图标 */
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
/* logo预览图标 */
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
/* 提示图标 */
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
</style>
</head>
<body>
<div class="page-container" data-dom-id="page-container">
<div class="status-bar">
<span>9:41</span>
<div style="display:flex;align-items:center;gap:6px;">
<svg width="17" height="11" viewBox="0 0 17 11" fill="currentColor"><rect x="0" y="7" width="3" height="4" rx="0.5"></rect><rect x="4.5" y="5" width="3" height="6" rx="0.5"></rect><rect x="9" y="2.5" width="3" height="8.5" rx="0.5"></rect><rect x="13.5" y="0" width="3" height="11" rx="0.5"></rect></svg>
<svg width="25" height="12" viewBox="0 0 25 12"><rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="currentColor" opacity="0.5"></rect><rect x="2" y="2" width="18" height="8" rx="1.5" fill="currentColor"></rect><rect x="22.5" y="4" width="1.5" height="4" rx="0.5" fill="currentColor" opacity="0.5"></rect></svg>
</div>
</div>
<div class="top-nav">
<button class="nav-btn" onclick="goBack()">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>
</button>
<div class="nav-title">消息通知</div>
<button class="nav-btn text-btn" onclick="markAllRead()">全部已读</button>
</div>
<!-- 分类Tab -->
<div class="category-tabs">
<div class="tab-item active" onclick="switchTab(this, 'all')">全部</div>
<div class="tab-item" onclick="switchTab(this, 'interact')">互动</div>
<div class="tab-item" onclick="switchTab(this, 'system')">系统</div>
<div class="tab-item" onclick="switchTab(this, 'activity')">活动</div>
</div>
<div class="scroll-area">
<!-- 互动通知分类 -->
<div class="section-header">互动消息</div>
<div class="notify-category-list">
<div class="notify-category-item" onclick="openCategory('点赞')">
<div class="notify-icon c2">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>
</svg>
<span class="notify-badge">12</span>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">点赞</span>
<span class="notify-time">刚刚</span>
</div>
<div class="notify-preview">小核、阿青等 12 人赞了你的动态</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
<div class="notify-category-item" onclick="openCategory('评论')">
<div class="notify-icon c3">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg>
<span class="notify-badge">5</span>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">评论</span>
<span class="notify-time">3分钟前</span>
</div>
<div class="notify-preview">校园诗人:这首诗写得太好了!</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
<div class="notify-category-item" onclick="openCategory('关注')">
<div class="notify-icon c5">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
<circle cx="8.5" cy="7" r="4"></circle>
<line x1="20" y1="8" x2="20" y2="14"></line>
<line x1="23" y1="11" x2="17" y2="11"></line>
</svg>
<span class="notify-badge">3</span>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">新增关注</span>
<span class="notify-time">10分钟前</span>
</div>
<div class="notify-preview">音乐系小李 等 3 人关注了你</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
<div class="notify-category-item" onclick="openCategory('私信')">
<div class="notify-icon c1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span class="notify-badge">8</span>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">私信消息</span>
<span class="notify-time">1小时前</span>
</div>
<div class="notify-preview">阿杰:周末一起去图书馆吗?</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
</div>
<!-- 系统通知分类 -->
<div class="section-header">系统消息</div>
<div class="notify-category-list">
<div class="notify-category-item" onclick="openCategory('系统通知')">
<div class="notify-icon c4">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<span class="notify-badge dot"></span>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">系统通知</span>
<span class="notify-time">昨天</span>
</div>
<div class="notify-preview">账号安全提醒:您的账号在新设备登录</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
<div class="notify-category-item" onclick="openCategory('审核结果')">
<div class="notify-icon c6">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
<polyline points="22 4 12 14.01 9 11.01"></polyline>
</svg>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">审核结果</span>
<span class="notify-time">2天前</span>
</div>
<div class="notify-preview">您发布的动态已通过审核</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
</div>
<!-- 活动通知分类 -->
<div class="section-header">活动消息</div>
<div class="notify-category-list">
<div class="notify-category-item" onclick="openCategory('活动通知')">
<div class="notify-icon c7">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
</svg>
<span class="notify-badge">2</span>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">活动通知</span>
<span class="notify-time">3天前</span>
</div>
<div class="notify-preview"><span class="icon-svg icon-party-popper"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5.8 11.3 2 22l10.7-3.8"></path><path d="M4 3h.01"></path><path d="M22 8h.01"></path><path d="M15 2h.01"></path><path d="M22 20h.01"></path><path d="m22 2-2.2.8-.8 2.2"></path><path d="m22 2-2.2.8-.8 2.2"></path><path d="M9 10.5 8 10l-3 1 1 3 .5-1 1.5 1 .5-1 1.5 1 .5-1 1-2Z"></path></svg></span> 校园歌手大赛报名开始啦!</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
<div class="notify-category-item" onclick="openCategory('官方推荐')">
<div class="notify-icon c8">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
</div>
<div class="notify-content">
<div class="notify-top">
<span class="notify-name">官方推荐</span>
<span class="notify-time">1周前</span>
</div>
<div class="notify-preview">发现了精彩内容,快来看看吧</div>
</div>
<svg class="notify-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>
</div>
</div>
</div>
<!-- 底部Tab -->
</div>
<script> icon.innerHTML = '<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>';
}
}
function goBack() { window.history.back(); }
function markAllRead() { alert('全部标为已读'); }
function openCategory(name) { alert('打开' + name + '列表'); }
function switchTab(el, type) {
document.querySelectorAll('.category-tabs .tab-item').forEach(t => t.classList.remove('active'));
el.classList.add('active');
}
function switchBottomTab(el) {
document.querySelectorAll('.bottom-tabs .tab-btn').forEach(t => t.classList.remove('active'));
el.classList.add('active');
}</script>
</body>
</html>