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.
935 lines
28 KiB
935 lines
28 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title>青核 Youthome - 系统通知</title>
|
|
<link rel="stylesheet" href="../colors_and_type.css">
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
:root {
|
|
/* 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: 64px;
|
|
--space-1: 4px;
|
|
--space-2: 8px;
|
|
--space-3: 12px;
|
|
--space-4: 16px;
|
|
--space-5: 20px;
|
|
--space-6: 24px;
|
|
--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.03);
|
|
--glass-bg: rgba(255, 255, 255, 0.72);
|
|
--glass-blur: blur(20px);
|
|
--glass-border: rgba(255, 255, 255, 0.3);
|
|
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
overflow: hidden;
|
|
overflow-x: hidden;}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
|
background: var(--youth-bg-page);
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
/* ===== 手机容器 ===== */
|
|
.phone-container {
|
|
width: 375px;
|
|
height: 812px;
|
|
margin: 0 auto;
|
|
background: var(--youth-bg-page);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
@media (max-width: 375px) {
|
|
.phone-container {
|
|
width: 100%;
|
|
height: 100vh;
|
|
}
|
|
}
|
|
|
|
/* ===== iOS状态栏 ===== */
|
|
.status-bar {
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 24px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
position: relative;
|
|
z-index: 100;
|
|
background: var(--youth-bg-page);
|
|
padding-top: 8px;
|
|
}
|
|
|
|
.status-bar .time {
|
|
font-weight: 700;
|
|
font-size: 15px;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.status-bar .right-icons {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
|
|
/* ===== 顶部导航栏 ===== */
|
|
.top-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 16px 12px;
|
|
background: var(--youth-bg-page);
|
|
position: relative;
|
|
z-index: 99;
|
|
}
|
|
|
|
.nav-left, .nav-right {
|
|
width: 60px;
|
|
display: flex;
|
|
}
|
|
|
|
.nav-right {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.nav-back-btn {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 12px;
|
|
background: var(--youth-gradient-matte-card);
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow:
|
|
0 2px 8px rgba(0, 0, 0, 0.06),
|
|
inset 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
.nav-back-btn:active {
|
|
transform: scale(0.93);
|
|
}
|
|
|
|
.nav-back-btn svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
stroke-width: 2.2px;
|
|
}
|
|
|
|
.nav-title {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--youth-text-primary);
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.nav-read-all {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--youth-primary);
|
|
cursor: pointer;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.nav-read-all:active {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* ===== 分类Tab ===== */
|
|
.tab-section {
|
|
padding: 0 20px;
|
|
background: var(--youth-bg-page);
|
|
position: relative;
|
|
z-index: 98;
|
|
}
|
|
|
|
.tab-scroll {
|
|
display: flex;
|
|
gap: 24px;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
.tab-scroll::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.tab-item-cat {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
padding-top: 4px;
|
|
}
|
|
|
|
.tab-text {
|
|
font-size: 15px;
|
|
font-weight: 500;
|
|
color: var(--youth-text-secondary);
|
|
transition: all 0.2s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.tab-item-cat.active .tab-text {
|
|
color: var(--youth-primary);
|
|
font-weight: 700;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.tab-badge {
|
|
min-width: 16px;
|
|
height: 16px;
|
|
background: var(--youth-primary);
|
|
color: #fff;
|
|
border-radius: 16px;
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.tab-item-cat:not(.active) .tab-badge {
|
|
background: var(--youth-gray-400);
|
|
}
|
|
|
|
.tab-indicator {
|
|
width: 0;
|
|
height: 3px;
|
|
background: var(--youth-gradient-primary);
|
|
border-radius: 16px;
|
|
transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
}
|
|
|
|
.tab-item-cat.active .tab-indicator {
|
|
width: 24px;
|
|
}
|
|
|
|
/* ===== 通知列表 ===== */
|
|
.notif-list-section {
|
|
padding: 8px 16px 0;
|
|
height: calc(812px - 44px - 54px - 52px - 70px);
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
@media (max-width: 375px) {
|
|
.notif-list-section {
|
|
height: calc(100vh - 44px - 54px - 52px - 70px);
|
|
}
|
|
}
|
|
|
|
.notif-list-section::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.notif-list-section {
|
|
-ms-overflow-style: none;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.notif-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
.notif-card {
|
|
position: relative;
|
|
background: var(--youth-gradient-matte-card);
|
|
border-radius: 16px;
|
|
padding: 14px 14px 14px 14px;
|
|
box-shadow:
|
|
0 2px 12px rgba(0, 0, 0, 0.04),
|
|
inset 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
border: 1px solid var(--youth-border-light);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.notif-card:active {
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.notif-card.unread {
|
|
background: linear-gradient(135deg, rgba(38, 194, 187, 0.06) 0%, var(--youth-bg-card) 40%);
|
|
}
|
|
|
|
.notif-card.unread::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
top: 12px;
|
|
bottom: 12px;
|
|
width: 3px;
|
|
background: var(--youth-gradient-primary-vertical);
|
|
border-radius: 0 2px 2px 0;
|
|
}
|
|
|
|
.notif-inner {
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.notif-icon-wrap {
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.notif-icon {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
box-shadow:
|
|
0 3px 10px rgba(0, 0, 0, 0.1),
|
|
inset 0 1px 1px rgba(255, 255, 255, 0.9),
|
|
inset 0 -1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.notif-icon svg {
|
|
width: 22px;
|
|
height: 22px;
|
|
}
|
|
|
|
.notif-icon.teal-icon {
|
|
background: linear-gradient(145deg, #E6FAF9 0%, #9AE7E4 100%);
|
|
color: #18827E;
|
|
border: 1px solid rgba(255,255,255,0.6);
|
|
}
|
|
|
|
.notif-icon.orange-icon {
|
|
background: linear-gradient(145deg, #FFF4E8 0%, #FFCF99 100%);
|
|
color: #CC751F;
|
|
border: 1px solid rgba(255,255,255,0.6);
|
|
}
|
|
|
|
.notif-icon.gray-icon {
|
|
background: linear-gradient(145deg, #F5F5F5 0%, #E0E0E0 100%);
|
|
color: #8C8C8C;
|
|
border: 1px solid rgba(255,255,255,0.6);
|
|
}
|
|
|
|
/* 头像样式 */
|
|
.notif-avatar {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
position: relative;
|
|
box-shadow:
|
|
0 3px 10px rgba(0, 0, 0, 0.1),
|
|
inset 0 1px 1px rgba(255, 255, 255, 0.9);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.avatar-pink {
|
|
background: linear-gradient(135deg, #FFEBF2 0%, #FFA8C7 100%);
|
|
color: #CC376E;
|
|
}
|
|
|
|
.avatar-purple {
|
|
background: linear-gradient(135deg, #F0EEFF 0%, #BCB3FF 100%);
|
|
color: #4C35CC;
|
|
}
|
|
|
|
/* 多人头像叠加 */
|
|
.multi-avatar {
|
|
position: relative;
|
|
width: 44px;
|
|
height: 44px;
|
|
}
|
|
|
|
.multi-avatar .av {
|
|
position: absolute;
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
border: 2px solid var(--youth-bg-card);
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.multi-avatar .av-1 {
|
|
top: 0;
|
|
left: 0;
|
|
background: linear-gradient(135deg, #E6FAF9 0%, #9AE7E4 100%);
|
|
color: #18827E;
|
|
z-index: 2;
|
|
}
|
|
|
|
.multi-avatar .av-2 {
|
|
top: 6px;
|
|
right: 0;
|
|
background: linear-gradient(135deg, #FFF4E8 0%, #FFCF99 100%);
|
|
color: #CC751F;
|
|
z-index: 1;
|
|
}
|
|
|
|
.multi-avatar .av-3 {
|
|
bottom: 0;
|
|
left: 8px;
|
|
background: linear-gradient(135deg, #F0EEFF 0%, #BCB3FF 100%);
|
|
color: #4C35CC;
|
|
z-index: 0;
|
|
}
|
|
|
|
.notif-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.notif-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
|
|
.notif-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.notif-time {
|
|
font-size: 11px;
|
|
color: var(--youth-text-tertiary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.notif-desc {
|
|
font-size: 13px;
|
|
color: var(--youth-text-secondary);
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.notif-thumb {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 10px;
|
|
flex-shrink: 0;
|
|
overflow: hidden;
|
|
background: linear-gradient(135deg, #FFE5E5 0%, #FFB8B8 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 20px;
|
|
}
|
|
|
|
/* ===== 底部Tab导航 ===== */
|
|
.bottom-tab {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 70px;
|
|
background: var(--youth-bg-glass);
|
|
backdrop-filter: blur(20px) saturate(180%);
|
|
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
|
border-top: 1px solid var(--youth-glass-border);
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-around;
|
|
padding: 8px 0 20px;
|
|
z-index: 90;
|
|
}
|
|
|
|
.tab-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
padding: 2px 12px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
color: var(--youth-gray-400);
|
|
}
|
|
|
|
.tab-item.active {
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
.tab-item:active {
|
|
transform: scale(0.9);
|
|
}
|
|
|
|
.tab-item svg {
|
|
width: 22px;
|
|
height: 22px;
|
|
stroke-width: 1.8px;
|
|
}
|
|
|
|
.tab-label {
|
|
font-size: 10px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.tab-item.active .tab-label {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tab-dot {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 6px;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #E8A0A0;
|
|
border-radius: 50%;
|
|
border: 2px solid var(--youth-bg-glass);
|
|
}
|
|
|
|
/* ===== 淡入动画 ===== */
|
|
.fade-in {
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(6px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* 已读状态样式变化 */
|
|
.notif-card.read {
|
|
opacity: 0.75;
|
|
}
|
|
|
|
.notif-card.read::before {
|
|
display: none;
|
|
}
|
|
|
|
/* 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="phone-container">
|
|
<!-- 状态栏 -->
|
|
<div class="status-bar">
|
|
<span class="time">9:41</span>
|
|
<div class="right-icons">
|
|
<!-- 信号 -->
|
|
<svg width="18" height="12" viewBox="0 0 18 12" fill="currentColor">
|
|
<rect x="0" y="8" width="3" height="4" rx="1" fill="currentColor"></rect>
|
|
<rect x="5" y="5" width="3" height="7" rx="1" fill="currentColor"></rect>
|
|
<rect x="10" y="2" width="3" height="10" rx="1" fill="currentColor"></rect>
|
|
<rect x="15" y="0" width="3" height="12" rx="1" fill="currentColor" opacity="0.3"></rect>
|
|
</svg>
|
|
<!-- WiFi -->
|
|
<svg width="16" height="12" viewBox="0 0 16 12" fill="currentColor">
|
|
<path d="M8 2.5C10 2.5 11.5 3.5 13 5L14.5 3.5C12.5 1.5 10.5 0.5 8 0.5C5.5 0.5 3.5 1.5 1.5 3.5L3 5C4.5 3.5 6 2.5 8 2.5ZM8 6.5C9 6.5 10 7 10.5 8L12 6.5C11 5.5 9.5 4.5 8 4.5C6.5 4.5 5 5.5 4 6.5L5.5 8C6 7 7 6.5 8 6.5ZM8 10.5C8.5 10.5 9 10.7 9.25 11L8 12.5L6.75 11C7 10.7 7.5 10.5 8 10.5Z" fill="currentColor"></path>
|
|
</svg>
|
|
<!-- 电池 -->
|
|
<svg width="26" height="12" viewBox="0 0 26 12" fill="none">
|
|
<rect x="0.5" y="0.5" width="22" height="11" rx="2.5" stroke="currentColor" opacity="0.4"></rect>
|
|
<rect x="2" y="2" width="17" height="8" rx="1.5" fill="currentColor"></rect>
|
|
<rect x="23.5" y="4" width="1.5" height="4" rx="0.75" fill="currentColor" opacity="0.4"></rect>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 顶部导航栏 -->
|
|
<div class="top-nav">
|
|
<div class="nav-left">
|
|
<button class="nav-back-btn" data-dom-id="btn-back" id="btn-back" aria-label="返回">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<h1 class="nav-title">系统通知</h1>
|
|
<div class="nav-right">
|
|
<span class="nav-read-all" data-dom-id="btn-read-all" id="btn-read-all">全部已读</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 分类Tab -->
|
|
<div class="tab-section">
|
|
<div class="tab-scroll" id="tab-scroll">
|
|
<div class="tab-item-cat active" data-dom-id="tab-all" id="tab-all" data-category="all">
|
|
<div class="tab-text">
|
|
全部
|
|
<span class="tab-badge" id="badge-all">5</span>
|
|
</div>
|
|
<div class="tab-indicator"></div>
|
|
</div>
|
|
<div class="tab-item-cat" data-dom-id="tab-interaction" id="tab-interaction" data-category="interaction">
|
|
<div class="tab-text">
|
|
互动
|
|
<span class="tab-badge" id="badge-interaction">2</span>
|
|
</div>
|
|
<div class="tab-indicator"></div>
|
|
</div>
|
|
<div class="tab-item-cat" data-dom-id="tab-system" id="tab-system" data-category="system">
|
|
<div class="tab-text">
|
|
系统
|
|
<span class="tab-badge" id="badge-system">2</span>
|
|
</div>
|
|
<div class="tab-indicator"></div>
|
|
</div>
|
|
<div class="tab-item-cat" data-dom-id="tab-activity" id="tab-activity-tab" data-category="activity">
|
|
<div class="tab-text">
|
|
活动
|
|
<span class="tab-badge" id="badge-activity">1</span>
|
|
</div>
|
|
<div class="tab-indicator"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 通知列表 -->
|
|
<div class="notif-list-section" id="notif-list-section">
|
|
<div class="notif-list" id="notif-list">
|
|
<!-- 通知1 - 点赞(互动,未读) -->
|
|
<div class="notif-card unread" data-dom-id="notif-1" id="notif-1" data-type="interaction">
|
|
<div class="notif-inner">
|
|
<div class="notif-icon-wrap">
|
|
<div class="notif-avatar avatar-pink">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="width:22px;height:22px;">
|
|
<path d="M7 10v12"></path>
|
|
<path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H7V10l4.34-8.67a1.5 1.5 0 0 1 2.6.55L15 5.88z"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="notif-content">
|
|
<div class="notif-top">
|
|
<span class="notif-title">林小雨 赞了你的动态</span>
|
|
<span class="notif-time">10分钟前</span>
|
|
</div>
|
|
<span class="notif-desc">「期末图书馆打卡Day5」</span>
|
|
</div>
|
|
<div class="notif-thumb"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 通知2 - 评论(互动,未读) -->
|
|
<div class="notif-card unread" data-dom-id="notif-2" id="notif-2" data-type="interaction">
|
|
<div class="notif-inner">
|
|
<div class="notif-icon-wrap">
|
|
<div class="multi-avatar">
|
|
<div class="av av-1">陈</div>
|
|
<div class="av av-2">李</div>
|
|
<div class="av av-3">王</div>
|
|
</div>
|
|
</div>
|
|
<div class="notif-content">
|
|
<div class="notif-top">
|
|
<span class="notif-title">陈明轩 等3人评论了你的动态</span>
|
|
<span class="notif-time">30分钟前</span>
|
|
</div>
|
|
<span class="notif-desc">加油!一起冲期末<span class="icon-svg icon-dumbbell"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6.5 6.5 11 11"></path><path d="m21 21-1-1"></path><path d="m3 3 1 1"></path><path d="m18 22 4-4"></path><path d="m2 6 4-4"></path><path d="m3 10 7-7"></path><path d="m14 21 7-7"></path></svg></span></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 通知3 - 认证通过(系统,未读) -->
|
|
<div class="notif-card unread" data-dom-id="notif-3" id="notif-3" data-type="system">
|
|
<div class="notif-inner">
|
|
<div class="notif-icon-wrap">
|
|
<div class="notif-icon teal-icon">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
|
|
<path d="m9 12 2 2 4-4"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="notif-content">
|
|
<div class="notif-top">
|
|
<span class="notif-title">实名认证审核通过</span>
|
|
<span class="notif-time">今天 09:15</span>
|
|
</div>
|
|
<span class="notif-desc">恭喜你完成学信网认证,已解锁全部功能</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 通知4 - 活动提醒(活动,未读) -->
|
|
<div class="notif-card unread" data-dom-id="notif-4" id="notif-4" data-type="activity">
|
|
<div class="notif-inner">
|
|
<div class="notif-icon-wrap">
|
|
<div class="notif-icon orange-icon">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"></path>
|
|
<path d="M8.5 2h7"></path>
|
|
<path d="M7 16h10"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="notif-content">
|
|
<div class="notif-top">
|
|
<span class="notif-title">你报名的活动即将开始</span>
|
|
<span class="notif-time">今天 08:30</span>
|
|
</div>
|
|
<span class="notif-desc">「周末羽毛球双打」明天14:00开始</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 通知5 - 版本更新(系统,已读) -->
|
|
<div class="notif-card read" data-dom-id="notif-5" id="notif-5" data-type="system">
|
|
<div class="notif-inner">
|
|
<div class="notif-icon-wrap">
|
|
<div class="notif-icon gray-icon">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"></path>
|
|
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="notif-content">
|
|
<div class="notif-top">
|
|
<span class="notif-title">青核 v2.1.0 版本更新</span>
|
|
<span class="notif-time">昨天</span>
|
|
</div>
|
|
<span class="notif-desc">新增校园雷达功能,优化匹配算法</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 底部Tab导航 -->
|
|
|
|
|
|
<!-- 浮动主题切换按钮 -->
|
|
|
|
</div>
|
|
|
|
<script>// ===== 主题切换 =====
|
|
const html = document.documentElement;
|
|
|
|
// 初始化主题
|
|
}
|
|
|
|
<circle cx="12" cy="12" r="5"/>
|
|
<line x1="12" y1="1" x2="12" y2="3"/>
|
|
<line x1="12" y1="21" x2="12" y2="23"/>
|
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
|
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
|
|
<line x1="1" y1="12" x2="3" y2="12"/>
|
|
<line x1="21" y1="12" x2="23" y2="12"/>
|
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
|
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
|
|
`;
|
|
}
|
|
}
|
|
|
|
// ===== 返回按钮 =====
|
|
document.getElementById('btn-back').addEventListener('click', () => {
|
|
window.location.href = 'message-list.html';
|
|
});
|
|
|
|
// ===== 分类Tab切换 =====
|
|
const tabItems = document.querySelectorAll('.tab-item-cat');
|
|
const notifCards = document.querySelectorAll('.notif-card');
|
|
|
|
tabItems.forEach(tab => {
|
|
tab.addEventListener('click', () => {
|
|
// 切换选中态
|
|
tabItems.forEach(t => t.classList.remove('active'));
|
|
tab.classList.add('active');
|
|
|
|
const category = tab.getAttribute('data-category');
|
|
|
|
// 过滤通知列表
|
|
notifCards.forEach(card => {
|
|
const type = card.getAttribute('data-type');
|
|
if (category === 'all' || type === category) {
|
|
card.style.display = '';
|
|
card.classList.add('fade-in');
|
|
setTimeout(() => card.classList.remove('fade-in'), 300);
|
|
} else {
|
|
card.style.display = 'none';
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
// ===== 全部已读 =====
|
|
document.getElementById('btn-read-all').addEventListener('click', () => {
|
|
// 所有未读标记为已读
|
|
notifCards.forEach(card => {
|
|
if (card.classList.contains('unread')) {
|
|
card.classList.remove('unread');
|
|
card.classList.add('read');
|
|
}
|
|
});
|
|
|
|
// 清除所有未读数字
|
|
const badges = document.querySelectorAll('.tab-badge');
|
|
badges.forEach(badge => {
|
|
badge.style.display = 'none';
|
|
});
|
|
});
|
|
|
|
// ===== 通知点击跳转 =====
|
|
// 点赞通知
|
|
document.getElementById('notif-1').addEventListener('click', () => {
|
|
markAsRead('notif-1');
|
|
window.location.href = 'post-detail.html';
|
|
});
|
|
|
|
// 评论通知
|
|
document.getElementById('notif-2').addEventListener('click', () => {
|
|
markAsRead('notif-2');
|
|
window.location.href = 'post-detail.html';
|
|
});
|
|
|
|
// 认证通知
|
|
document.getElementById('notif-3').addEventListener('click', () => {
|
|
markAsRead('notif-3');
|
|
window.location.href = 'auth-success.html';
|
|
});
|
|
|
|
// 活动通知
|
|
document.getElementById('notif-4').addEventListener('click', () => {
|
|
markAsRead('notif-4');
|
|
window.location.href = 'activity-list.html';
|
|
});
|
|
|
|
// 版本更新通知
|
|
document.getElementById('notif-5').addEventListener('click', () => {
|
|
markAsRead('notif-5');
|
|
// 系统通知点击查看详情 - 可以弹窗或跳转
|
|
console.log('查看版本更新详情');
|
|
});
|
|
|
|
function markAsRead(id) {
|
|
const card = document.getElementById(id);
|
|
if (card && card.classList.contains('unread')) {
|
|
card.classList.remove('unread');
|
|
card.classList.add('read');
|
|
// 更新对应分类badge数字
|
|
updateBadgeCount();
|
|
}
|
|
}
|
|
|
|
function updateBadgeCount() {
|
|
const allUnread = document.querySelectorAll('.notif-card.unread').length;
|
|
const interactionUnread = document.querySelectorAll('.notif-card.unread[data-type="interaction"]').length;
|
|
const systemUnread = document.querySelectorAll('.notif-card.unread[data-type="system"]').length;
|
|
const activityUnread = document.querySelectorAll('.notif-card.unread[data-type="activity"]').length;
|
|
|
|
updateBadge('badge-all', allUnread);
|
|
updateBadge('badge-interaction', interactionUnread);
|
|
updateBadge('badge-system', systemUnread);
|
|
updateBadge('badge-activity', activityUnread);
|
|
}
|
|
|
|
function updateBadge(id, count) {
|
|
const badge = document.getElementById(id);
|
|
if (count > 0) {
|
|
badge.textContent = count;
|
|
badge.style.display = '';
|
|
} else {
|
|
badge.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
// ===== 底部Tab切换 =====
|
|
const bottomTabItems = document.querySelectorAll('.bottom-tab .tab-item');
|
|
bottomTabItems.forEach(tab => {
|
|
tab.addEventListener('click', () => {
|
|
bottomTabItems.forEach(t => t.classList.remove('active'));
|
|
tab.classList.add('active');
|
|
});
|
|
});</script>
|
|
</body>
|
|
</html>
|
|
|