feat: 新增知资札记工具及相关功能
1. 新增知资札记完整站点:包含首页、详情页、管理后台 2. 添加站点图标、鉴权配置与后端API鉴权逻辑 3. 在市场页面新增知资札记入口跳转 4. 新增经典乡村音乐播放列表文件 5. 临时添加养生谚语批量导入脚本
This commit is contained in:
@@ -0,0 +1,416 @@
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
知资札记 - 全局样式
|
||||
主色:#162A46 墨蓝 | 辅助色:#467974 青灰
|
||||
日间背景:#F7F9FC | 暗黑背景:#0F1726
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
/* ── CSS 变量(日间默认) ── */
|
||||
:root {
|
||||
--primary: #162A46;
|
||||
--primary-light: #1E3A5F;
|
||||
--primary-dark: #0F1D33;
|
||||
--accent: #467974;
|
||||
--accent-light: #5A9690;
|
||||
--text: #333;
|
||||
--text-secondary: #666;
|
||||
--text-light: #999;
|
||||
--bg: #F7F9FC;
|
||||
--bg-card: #FFFFFF;
|
||||
--bg-sidebar: #FFFFFF;
|
||||
--bg-header: #162A46;
|
||||
--bg-tag: #E8EDF2;
|
||||
--bg-tag-hover: #D0D8E0;
|
||||
--border: #E0E4E8;
|
||||
--shadow: 0 1px 3px rgba(0,0,0,0.08);
|
||||
--shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
|
||||
--radius: 8px;
|
||||
--transition: 0.2s ease;
|
||||
--font: 'Microsoft YaHei', 'Source Han Sans CN', -apple-system, sans-serif;
|
||||
--line-height: 1.75;
|
||||
}
|
||||
|
||||
/* ── 暗黑模式 ── */
|
||||
[data-theme="dark"] {
|
||||
--primary: #1E3A5F;
|
||||
--primary-light: #2A4D7A;
|
||||
--primary-dark: #0F1D33;
|
||||
--accent: #5A9690;
|
||||
--accent-light: #6DB0A9;
|
||||
--text: #E0E4E8;
|
||||
--text-secondary: #A0A8B4;
|
||||
--text-light: #6B7280;
|
||||
--bg: #0F1726;
|
||||
--bg-card: #1A2332;
|
||||
--bg-sidebar: #1A2332;
|
||||
--bg-header: #0F1D33;
|
||||
--bg-tag: #1E2D3D;
|
||||
--bg-tag-hover: #2A3D52;
|
||||
--border: #2A3D52;
|
||||
--shadow: 0 1px 3px rgba(0,0,0,0.3);
|
||||
--shadow-hover: 0 4px 16px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
/* ── 全局重置 ── */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { font-size: 16px; scroll-behavior: smooth; }
|
||||
body {
|
||||
font-family: var(--font);
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
line-height: var(--line-height);
|
||||
min-height: 100vh;
|
||||
transition: background var(--transition), color var(--transition);
|
||||
}
|
||||
a { text-decoration: none; color: inherit; }
|
||||
img { max-width: 100%; display: block; }
|
||||
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
|
||||
input, select, textarea { font-family: inherit; outline: none; }
|
||||
|
||||
/* ── 顶部 Header ── */
|
||||
.zs-header {
|
||||
position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
|
||||
background: var(--bg-header); color: #fff;
|
||||
height: 56px; display: flex; align-items: center;
|
||||
padding: 0 20px; gap: 16px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
}
|
||||
.zs-header .logo {
|
||||
font-size: 1.25rem; font-weight: 700;
|
||||
letter-spacing: 2px; white-space: nowrap;
|
||||
user-select: none;
|
||||
}
|
||||
.zs-header .nav-menu {
|
||||
display: flex; gap: 4px; flex: 1; justify-content: center;
|
||||
}
|
||||
.zs-header .nav-menu button {
|
||||
background: transparent; color: rgba(255,255,255,0.75);
|
||||
padding: 6px 16px; border-radius: 6px; font-size: 0.9rem;
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-header .nav-menu button:hover,
|
||||
.zs-header .nav-menu button.active { color: #fff; background: rgba(255,255,255,0.12); }
|
||||
.zs-header .header-right { display: flex; align-items: center; gap: 10px; }
|
||||
.zs-header .search-box {
|
||||
display: flex; align-items: center; background: rgba(255,255,255,0.12);
|
||||
border-radius: 20px; padding: 4px 12px; gap: 6px;
|
||||
}
|
||||
.zs-header .search-box input {
|
||||
background: transparent; border: none; color: #fff;
|
||||
width: 160px; font-size: 0.85rem;
|
||||
}
|
||||
.zs-header .search-box input::placeholder { color: rgba(255,255,255,0.5); }
|
||||
.zs-header .search-box button {
|
||||
background: transparent; color: rgba(255,255,255,0.7);
|
||||
font-size: 1rem; padding: 2px;
|
||||
}
|
||||
.zs-header .theme-btn {
|
||||
background: rgba(255,255,255,0.12); color: #fff;
|
||||
width: 34px; height: 34px; border-radius: 50%;
|
||||
font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-header .theme-btn:hover { background: rgba(255,255,255,0.2); }
|
||||
|
||||
/* ── 汉堡菜单按钮(手机) ── */
|
||||
.hamburger {
|
||||
display: none; background: transparent; color: #fff;
|
||||
font-size: 1.5rem; width: 36px; height: 36px;
|
||||
align-items: center; justify-content: center;
|
||||
}
|
||||
|
||||
/* ── 主体布局 ── */
|
||||
.zs-layout {
|
||||
display: flex; margin-top: 56px; min-height: calc(100vh - 56px);
|
||||
max-width: 1400px; margin-left: auto; margin-right: auto;
|
||||
}
|
||||
|
||||
/* ── 左侧筛选栏 ── */
|
||||
.zs-sidebar {
|
||||
width: 220px; min-width: 220px; background: var(--bg-sidebar);
|
||||
border-right: 1px solid var(--border);
|
||||
padding: 16px 12px; overflow-y: auto;
|
||||
position: sticky; top: 56px; height: calc(100vh - 56px);
|
||||
transition: transform var(--transition);
|
||||
}
|
||||
.zs-sidebar .sidebar-section { margin-bottom: 20px; }
|
||||
.zs-sidebar .sidebar-title {
|
||||
font-size: 0.8rem; color: var(--text-light);
|
||||
text-transform: uppercase; letter-spacing: 1px;
|
||||
margin-bottom: 8px; padding-left: 4px;
|
||||
}
|
||||
.zs-sidebar .cat-item {
|
||||
display: block; width: 100%; text-align: left;
|
||||
padding: 8px 12px; border-radius: 6px; font-size: 0.9rem;
|
||||
color: var(--text-secondary); background: transparent;
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-sidebar .cat-item:hover { background: var(--bg-tag); color: var(--text); }
|
||||
.zs-sidebar .cat-item.active { background: var(--primary); color: #fff; }
|
||||
.zs-sidebar .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.zs-sidebar .tag-item {
|
||||
padding: 4px 10px; border-radius: 12px; font-size: 0.78rem;
|
||||
background: var(--bg-tag); color: var(--text-secondary);
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-sidebar .tag-item:hover { background: var(--bg-tag-hover); color: var(--text); }
|
||||
.zs-sidebar .tag-item.active { background: var(--accent); color: #fff; }
|
||||
.zs-sidebar .time-filter { display: flex; flex-direction: column; gap: 4px; }
|
||||
.zs-sidebar .time-item {
|
||||
display: block; width: 100%; text-align: left;
|
||||
padding: 6px 12px; border-radius: 6px; font-size: 0.85rem;
|
||||
color: var(--text-secondary); background: transparent;
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-sidebar .time-item:hover { background: var(--bg-tag); }
|
||||
.zs-sidebar .time-item.active { background: var(--accent); color: #fff; }
|
||||
.zs-sidebar .type-toggle { display: flex; gap: 6px; }
|
||||
.zs-sidebar .type-btn {
|
||||
flex: 1; padding: 6px 8px; border-radius: 6px; font-size: 0.8rem;
|
||||
background: var(--bg-tag); color: var(--text-secondary);
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-sidebar .type-btn.active { background: var(--accent); color: #fff; }
|
||||
.zs-sidebar .stats-card {
|
||||
background: var(--bg); border-radius: var(--radius);
|
||||
padding: 12px; font-size: 0.85rem;
|
||||
}
|
||||
.zs-sidebar .stats-card .stat-row {
|
||||
display: flex; justify-content: space-between;
|
||||
padding: 4px 0; color: var(--text-secondary);
|
||||
}
|
||||
.zs-sidebar .stats-card .stat-val { font-weight: 700; color: var(--primary); }
|
||||
|
||||
/* ── 中间主内容区 ── */
|
||||
.zs-main {
|
||||
flex: 1; padding: 20px; min-width: 0;
|
||||
}
|
||||
.zs-main .view-toggle {
|
||||
display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
|
||||
}
|
||||
.zs-main .view-toggle button {
|
||||
padding: 6px 14px; border-radius: 6px; font-size: 0.85rem;
|
||||
background: var(--bg-tag); color: var(--text-secondary);
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-main .view-toggle button.active { background: var(--primary); color: #fff; }
|
||||
.zs-main .filter-tags {
|
||||
display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
|
||||
}
|
||||
.zs-main .filter-tag {
|
||||
display: inline-flex; align-items: center; gap: 4px;
|
||||
padding: 3px 10px; border-radius: 12px; font-size: 0.78rem;
|
||||
background: var(--accent); color: #fff;
|
||||
}
|
||||
.zs-main .filter-tag .remove-filter {
|
||||
background: transparent; color: rgba(255,255,255,0.7);
|
||||
font-size: 0.85rem; line-height: 1; padding: 0;
|
||||
}
|
||||
.zs-main .filter-tag .remove-filter:hover { color: #fff; }
|
||||
|
||||
/* ── 卡片网格视图 ── */
|
||||
.card-grid {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
.card-grid.list-view {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* ── 图文卡片 ── */
|
||||
.zs-card {
|
||||
background: var(--bg-card); border-radius: var(--radius);
|
||||
box-shadow: var(--shadow); overflow: hidden;
|
||||
transition: all var(--transition); cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
.zs-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
|
||||
.zs-card .card-cover {
|
||||
height: 180px; overflow: hidden; position: relative;
|
||||
background: var(--bg-tag);
|
||||
}
|
||||
.zs-card .card-cover img {
|
||||
width: 100%; height: 100%; object-fit: cover;
|
||||
}
|
||||
.zs-card .card-cover .text-badge {
|
||||
width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
|
||||
background: linear-gradient(135deg, var(--primary), var(--accent));
|
||||
color: #fff; font-size: 2.5rem; font-weight: 700;
|
||||
}
|
||||
.zs-card .card-badge {
|
||||
position: absolute; bottom: 8px; right: 8px;
|
||||
background: rgba(0,0,0,0.6); color: #fff;
|
||||
padding: 2px 8px; border-radius: 10px; font-size: 0.72rem;
|
||||
}
|
||||
.zs-card .card-body { padding: 14px; }
|
||||
.zs-card .card-title {
|
||||
font-size: 0.95rem; font-weight: 600; color: var(--text);
|
||||
line-height: 1.5; display: -webkit-box;
|
||||
-webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
||||
overflow: hidden; margin-bottom: 8px;
|
||||
}
|
||||
.zs-card .card-source {
|
||||
font-size: 0.78rem; color: var(--text-light); margin-bottom: 6px;
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.zs-card .card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
|
||||
.zs-card .card-tag {
|
||||
padding: 2px 8px; border-radius: 10px; font-size: 0.7rem;
|
||||
background: var(--bg-tag); color: var(--text-secondary);
|
||||
}
|
||||
.zs-card .card-footer {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
font-size: 0.75rem; color: var(--text-light);
|
||||
border-top: 1px solid var(--border); padding-top: 10px;
|
||||
}
|
||||
.zs-card .card-footer .fav-btn {
|
||||
background: transparent; color: var(--text-light); font-size: 1rem;
|
||||
padding: 2px 4px; transition: all var(--transition);
|
||||
}
|
||||
.zs-card .card-footer .fav-btn.favorited { color: #E74C3C; }
|
||||
.zs-card .card-footer .fav-btn:hover { color: #E74C3C; }
|
||||
|
||||
/* ── 列表视图卡片 ── */
|
||||
.list-view .zs-card {
|
||||
display: flex; flex-direction: row;
|
||||
}
|
||||
.list-view .zs-card .card-cover {
|
||||
width: 240px; min-width: 240px; height: auto; min-height: 160px;
|
||||
}
|
||||
.list-view .zs-card .card-body { flex: 1; }
|
||||
|
||||
/* ── 右侧辅助栏 ── */
|
||||
.zs-rightbar {
|
||||
width: 260px; min-width: 260px; background: var(--bg-sidebar);
|
||||
border-left: 1px solid var(--border); padding: 16px 12px;
|
||||
overflow-y: auto; position: sticky; top: 56px;
|
||||
height: calc(100vh - 56px);
|
||||
}
|
||||
.zs-rightbar .right-section { margin-bottom: 20px; }
|
||||
.zs-rightbar .right-title {
|
||||
font-size: 0.82rem; font-weight: 600; color: var(--text);
|
||||
margin-bottom: 10px; padding-bottom: 6px;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
}
|
||||
.zs-rightbar .pinned-item {
|
||||
padding: 8px 0; border-bottom: 1px solid var(--border);
|
||||
cursor: pointer; transition: color var(--transition);
|
||||
}
|
||||
.zs-rightbar .pinned-item:hover { color: var(--accent); }
|
||||
.zs-rightbar .pinned-item .pinned-title {
|
||||
font-size: 0.85rem; font-weight: 500;
|
||||
display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.zs-rightbar .pinned-item .pinned-date {
|
||||
font-size: 0.72rem; color: var(--text-light); margin-top: 2px;
|
||||
}
|
||||
.zs-rightbar .latest-item {
|
||||
padding: 6px 0; font-size: 0.82rem; color: var(--text-secondary);
|
||||
cursor: pointer; transition: color var(--transition);
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.zs-rightbar .latest-item:hover { color: var(--accent); }
|
||||
.zs-rightbar .chart-bar {
|
||||
display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
.zs-rightbar .chart-bar .bar-label { width: 60px; text-align: right; color: var(--text-secondary); }
|
||||
.zs-rightbar .chart-bar .bar-track {
|
||||
flex: 1; height: 8px; background: var(--bg-tag); border-radius: 4px; overflow: hidden;
|
||||
}
|
||||
.zs-rightbar .chart-bar .bar-fill {
|
||||
height: 100%; background: var(--accent); border-radius: 4px;
|
||||
transition: width 0.5s ease;
|
||||
}
|
||||
.zs-rightbar .chart-bar .bar-count { width: 30px; color: var(--text-light); }
|
||||
.zs-rightbar .submit-btn {
|
||||
display: block; width: 100%; padding: 10px; border-radius: var(--radius);
|
||||
background: var(--primary); color: #fff; font-size: 0.9rem; font-weight: 600;
|
||||
text-align: center; transition: all var(--transition);
|
||||
}
|
||||
.zs-rightbar .submit-btn:hover { background: var(--primary-light); }
|
||||
|
||||
/* ── 加载状态 ── */
|
||||
.zs-loading {
|
||||
text-align: center; padding: 40px; color: var(--text-light);
|
||||
}
|
||||
.zs-loading .spinner {
|
||||
width: 32px; height: 32px; border: 3px solid var(--border);
|
||||
border-top-color: var(--accent); border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite; margin: 0 auto 12px;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.zs-empty {
|
||||
text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* ── 提示 Toast ── */
|
||||
.zs-toast {
|
||||
position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
|
||||
z-index: 9999; padding: 10px 24px; border-radius: 8px;
|
||||
font-size: 0.9rem; color: #fff; opacity: 0;
|
||||
transition: opacity 0.3s ease; pointer-events: none;
|
||||
}
|
||||
.zs-toast.show { opacity: 1; }
|
||||
.zs-toast.info { background: #3B82F6; }
|
||||
.zs-toast.success { background: #10B981; }
|
||||
.zs-toast.error { background: #EF4444; }
|
||||
|
||||
/* ── 模态弹窗(交互详情/确认) ── */
|
||||
.zs-modal-overlay {
|
||||
position: fixed; inset: 0; z-index: 5000;
|
||||
background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
|
||||
transition: opacity var(--transition);
|
||||
}
|
||||
.zs-modal-overlay.hidden { display: none; }
|
||||
.zs-modal {
|
||||
background: var(--bg-card); border-radius: 12px; padding: 24px;
|
||||
max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto;
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.2);
|
||||
}
|
||||
.zs-modal h3 { margin-bottom: 16px; color: var(--text); }
|
||||
.zs-modal .modal-body { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }
|
||||
.zs-modal .modal-body pre {
|
||||
background: var(--bg); padding: 12px; border-radius: 6px;
|
||||
font-size: 0.78rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
|
||||
}
|
||||
.zs-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
|
||||
.zs-modal .btn {
|
||||
padding: 8px 20px; border-radius: 6px; font-size: 0.85rem; font-weight: 500;
|
||||
transition: all var(--transition);
|
||||
}
|
||||
.zs-modal .btn-primary { background: var(--primary); color: #fff; }
|
||||
.zs-modal .btn-primary:hover { background: var(--primary-light); }
|
||||
.zs-modal .btn-danger { background: #D94452; color: #fff; }
|
||||
.zs-modal .btn-danger:hover { background: #C0392B; }
|
||||
.zs-modal .btn-cancel { background: var(--bg-tag); color: var(--text-secondary); }
|
||||
.zs-modal .btn-cancel:hover { background: var(--bg-tag-hover); }
|
||||
|
||||
/* ── 响应式 ── */
|
||||
@media (max-width: 1199px) {
|
||||
.zs-rightbar { display: none; }
|
||||
.zs-sidebar { width: 200px; min-width: 200px; }
|
||||
.card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
|
||||
.list-view .zs-card .card-cover { width: 180px; min-width: 180px; }
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.zs-layout { flex-direction: column; }
|
||||
.zs-sidebar {
|
||||
position: fixed; top: 56px; left: 0; bottom: 0; z-index: 900;
|
||||
width: 260px; transform: translateX(-100%);
|
||||
box-shadow: 4px 0 16px rgba(0,0,0,0.15);
|
||||
}
|
||||
.zs-sidebar.open { transform: translateX(0); }
|
||||
.zs-sidebar-overlay {
|
||||
display: none; position: fixed; inset: 0; z-index: 899;
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
.zs-sidebar-overlay.show { display: block; }
|
||||
.hamburger { display: flex; }
|
||||
.zs-header .nav-menu { display: none; }
|
||||
.zs-header .search-box input { width: 100px; }
|
||||
.zs-main { padding: 12px; }
|
||||
.card-grid { grid-template-columns: 1fr; }
|
||||
.list-view .zs-card { flex-direction: column; }
|
||||
.list-view .zs-card .card-cover { width: 100%; min-width: auto; height: 180px; }
|
||||
}
|
||||
Reference in New Issue
Block a user