fix(app): 全链路验证修复 — 编译错误/CORS/迁移/启动脚本
前端修复: - calendar_page: 移除不存在的 JournalEntry.content getter - responsive_scaffold: 移除不存在的 notchThickness 参数 - splash_page: SingleTickerProvider → TickerProvider (多 AnimationController) - profile_page: UserRoleType.name → .code (修复运行时崩溃) - 导入缺失的 user.dart 后端修复: - class_service: generate_class_code 取 UUID 后6位(随机部分)避免碰撞 - diary_role_seed: 移除不存在的 id 列,使用复合主键 ON CONFLICT 基础设施: - config/default.toml: CORS 改为通配符(开发模式) - scripts/dev.sh: 统一启动脚本(自动清理端口) - docs/opendesign/: Open Design 设计规格 HTML 原型稿 验证结果: flutter analyze 0 error, cargo test 77/77 通过, 17个页面全部渲染正常
This commit is contained in:
296
docs/opendesign/css/components.css
Normal file
296
docs/opendesign/css/components.css
Normal file
@@ -0,0 +1,296 @@
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* 暖记 — 共享组件样式
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
|
||||
/* Reset & base */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-base);
|
||||
line-height: var(--leading-body);
|
||||
color: var(--fg);
|
||||
background: var(--bg);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* Phone frame wrapper */
|
||||
.phone-frame {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
border-radius: 44px;
|
||||
box-shadow: var(--elev-float);
|
||||
}
|
||||
|
||||
/* Status bar */
|
||||
.status-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 14px 28px 0;
|
||||
height: var(--safe-top);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
}
|
||||
.status-bar .time { font-variant-numeric: tabular-nums; }
|
||||
.status-bar .icons { display: flex; gap: 6px; align-items: center; }
|
||||
.status-bar .icons svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Dynamic Island */
|
||||
.dynamic-island {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 126px;
|
||||
height: 36px;
|
||||
background: #000;
|
||||
border-radius: 20px;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
/* Top nav bar */
|
||||
.top-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-4) var(--space-5);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
.top-nav .title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.top-nav .action {
|
||||
width: var(--touch-min);
|
||||
height: var(--touch-min);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.top-nav .action:hover { background: var(--border-soft); }
|
||||
.top-nav .action:focus-visible { box-shadow: var(--focus-ring); outline: none; }
|
||||
.top-nav .action svg { width: 22px; height: 22px; color: var(--fg); }
|
||||
|
||||
/* Bottom tab bar */
|
||||
.tab-bar {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: calc(var(--tab-height) + var(--safe-bottom));
|
||||
padding-bottom: var(--safe-bottom);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-around;
|
||||
background: var(--surface);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
z-index: 100;
|
||||
}
|
||||
.tab-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding-top: 10px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
transition: color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.tab-item.active { color: var(--accent); }
|
||||
.tab-item svg { width: 24px; height: 24px; }
|
||||
.tab-item span { margin-top: 2px; }
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-2);
|
||||
padding: 14px 28px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.btn:active { transform: scale(0.97); }
|
||||
.btn-primary {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
}
|
||||
.btn-primary:hover { background: var(--accent-hover); }
|
||||
.btn-primary:focus-visible { box-shadow: var(--focus-ring); outline: none; }
|
||||
.btn-secondary {
|
||||
background: var(--surface);
|
||||
color: var(--fg);
|
||||
border: 1.5px solid var(--border);
|
||||
}
|
||||
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.btn-secondary:focus-visible { box-shadow: var(--focus-ring); outline: none; }
|
||||
.btn-ghost {
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
}
|
||||
.btn-ghost:hover { color: var(--accent); }
|
||||
|
||||
/* Cards */
|
||||
.card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
/* Tags / chips */
|
||||
.chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: 6px 14px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
background: var(--surface);
|
||||
color: var(--fg-2);
|
||||
border: 1px solid var(--border);
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.chip:focus-visible { box-shadow: var(--focus-ring); outline: none; }
|
||||
.chip.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* Section heading */
|
||||
.section-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.section-heading h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.section-heading .more {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-weight: 500;
|
||||
min-height: var(--touch-min);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.section-heading .more:focus-visible { box-shadow: var(--focus-ring); outline: none; border-radius: 4px; }
|
||||
|
||||
/* Mood emoji faces */
|
||||
.mood-row {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
justify-content: center;
|
||||
}
|
||||
.mood-btn {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
background: var(--surface);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.mood-btn:hover { transform: scale(1.1); }
|
||||
.mood-btn:focus-visible { box-shadow: var(--focus-ring); outline: none; }
|
||||
.mood-btn.selected {
|
||||
border-color: var(--accent);
|
||||
background: var(--surface-warm);
|
||||
transform: scale(1.08);
|
||||
}
|
||||
|
||||
/* Scroll content area */
|
||||
.scroll-content {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.scroll-content::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* Utility */
|
||||
.text-center { text-align: center; }
|
||||
.text-muted { color: var(--muted); }
|
||||
.text-accent { color: var(--accent); }
|
||||
.text-secondary { color: var(--secondary); }
|
||||
.font-display { font-family: var(--font-display); }
|
||||
.font-hand { font-family: var(--font-handwritten); }
|
||||
.flex { display: flex; }
|
||||
.flex-col { flex-direction: column; }
|
||||
.items-center { align-items: center; }
|
||||
.justify-between { justify-content: space-between; }
|
||||
.justify-center { justify-content: center; }
|
||||
.gap-2 { gap: var(--space-2); }
|
||||
.gap-3 { gap: var(--space-3); }
|
||||
.gap-4 { gap: var(--space-4); }
|
||||
.gap-5 { gap: var(--space-5); }
|
||||
.gap-6 { gap: var(--space-6); }
|
||||
.w-full { width: 100%; }
|
||||
.rounded-full { border-radius: var(--radius-pill); }
|
||||
|
||||
/* Decorative doodles */
|
||||
.doodle { opacity: 0.15; pointer-events: none; }
|
||||
|
||||
/* Home indicator */
|
||||
.home-indicator {
|
||||
width: 134px;
|
||||
height: 5px;
|
||||
background: var(--fg);
|
||||
opacity: 0.2;
|
||||
border-radius: 3px;
|
||||
margin: 8px auto;
|
||||
}
|
||||
|
||||
/* Page transitions */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@keyframes slideUp {
|
||||
from { opacity: 0; transform: translateY(40px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@keyframes scaleIn {
|
||||
from { opacity: 0; transform: scale(0.9); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.5s var(--ease-standard) both; }
|
||||
.anim-slide { animation: slideUp 0.6s var(--ease-bounce) both; }
|
||||
.anim-scale { animation: scaleIn 0.4s var(--ease-bounce) both; }
|
||||
502
docs/opendesign/css/editor-common.css
Normal file
502
docs/opendesign/css/editor-common.css
Normal file
@@ -0,0 +1,502 @@
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* 暖记 — 编辑器共享样式
|
||||
* 三端通用 (mobile / tablet / desktop)
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
|
||||
/* Top toolbar */
|
||||
.editor-topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.topbar-left, .topbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.topbar-btn {
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
|
||||
.topbar-btn:hover { background: var(--surface-warm); }
|
||||
|
||||
.topbar-center {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
|
||||
/* Save button */
|
||||
.save-btn {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.save-btn:hover { background: var(--accent-hover); }
|
||||
|
||||
/* Canvas area common */
|
||||
.canvas-grid {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
|
||||
background-size: 28px 28px;
|
||||
opacity: 0.4;
|
||||
pointer-events: none;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.washi-tape {
|
||||
position: absolute;
|
||||
background: repeating-linear-gradient(
|
||||
45deg,
|
||||
rgba(242, 204, 143, 0.7),
|
||||
rgba(242, 204, 143, 0.7) 4px,
|
||||
rgba(255, 243, 230, 0.7) 4px,
|
||||
rgba(255, 243, 230, 0.7) 8px
|
||||
);
|
||||
transform: rotate(-8deg);
|
||||
border-radius: 2px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.placed-sticker {
|
||||
position: absolute;
|
||||
cursor: move;
|
||||
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
|
||||
}
|
||||
|
||||
.journal-content { position: relative; z-index: 1; }
|
||||
|
||||
.journal-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-4);
|
||||
border: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.journal-body {
|
||||
font-size: var(--text-base);
|
||||
line-height: 1.9;
|
||||
color: var(--fg-2);
|
||||
border: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
resize: none;
|
||||
min-height: 240px;
|
||||
}
|
||||
|
||||
/* Format bar */
|
||||
.format-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-2) 0;
|
||||
margin-bottom: var(--space-4);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.format-btn {
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.format-btn:hover { background: var(--surface-warm); color: var(--fg); }
|
||||
.format-btn.active { background: var(--accent); color: #FFF8F0; }
|
||||
|
||||
.format-divider {
|
||||
width: 1px;
|
||||
height: 22px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
/* Color dots */
|
||||
.color-dot {
|
||||
border-radius: 50%;
|
||||
border: 2px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.color-dot:hover { transform: scale(1.15); }
|
||||
.color-dot.active { border-color: var(--fg); }
|
||||
|
||||
/* Placed photo in journal */
|
||||
.placed-photo {
|
||||
width: 100%;
|
||||
border-radius: var(--radius-sm);
|
||||
background: linear-gradient(135deg, #D4E8DC, #E8F4ED);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Panel tabs */
|
||||
.panel-tab {
|
||||
padding: 8px 16px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.panel-tab.active { background: var(--accent); color: #FFF8F0; }
|
||||
|
||||
.panel-content {
|
||||
padding: var(--space-5);
|
||||
}
|
||||
|
||||
/* Sticker grid */
|
||||
.sticker-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.sticker-item {
|
||||
aspect-ratio: 1;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--surface-warm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.sticker-item:hover { transform: scale(1.1); border-color: var(--accent); }
|
||||
|
||||
/* Date strip */
|
||||
.date-strip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.date-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.date-info strong { color: var(--fg); font-weight: 600; }
|
||||
|
||||
.mood-quick { display: flex; gap: 6px; }
|
||||
|
||||
.mood-mini {
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--surface);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.mood-mini.selected { border-color: var(--accent); background: var(--surface-warm); }
|
||||
|
||||
/* Undo/Redo */
|
||||
.topbar-undo-redo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.undo-btn, .redo-btn {
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.undo-btn:hover:not(:disabled), .redo-btn:hover:not(:disabled) { background: var(--surface-warm); color: var(--fg); }
|
||||
.undo-btn:disabled, .redo-btn:disabled { opacity: 0.35; cursor: default; }
|
||||
.undo-btn svg, .redo-btn svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Auto-save indicator */
|
||||
.autosave-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
font-size: 11px;
|
||||
color: var(--success);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.autosave-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: var(--success);
|
||||
}
|
||||
|
||||
/* Brush slider (size + opacity) */
|
||||
.brush-slider {
|
||||
flex: 1;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
height: 4px;
|
||||
border-radius: 2px;
|
||||
background: var(--border);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.brush-slider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
cursor: pointer;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.brush-size-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.brush-size-value {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
min-width: 36px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Brush color dots */
|
||||
.brush-color-dot {
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.brush-color-dot:hover { transform: scale(1.1); }
|
||||
.brush-color-dot.active { border-color: var(--fg); box-shadow: 0 0 0 2px var(--surface); }
|
||||
|
||||
/* Brush opacity */
|
||||
.brush-opacity-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
transition: opacity var(--motion-fast);
|
||||
}
|
||||
|
||||
.brush-opacity-row.disabled { opacity: 0.35; pointer-events: none; }
|
||||
|
||||
.brush-opacity-label {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
.brush-opacity-value {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
min-width: 36px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Tag pill */
|
||||
.tag-selected-area {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.tag-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 12px;
|
||||
border-radius: 9999px;
|
||||
background: var(--surface-warm);
|
||||
color: var(--accent);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.tag-pill .remove {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
color: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
line-height: 1;
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
|
||||
.tag-pill .remove:hover { background: var(--accent-hover); }
|
||||
|
||||
/* Tag input */
|
||||
.tag-input-row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tag-input {
|
||||
flex: 1;
|
||||
height: 44px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 0 var(--space-4);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg);
|
||||
background: var(--bg);
|
||||
outline: none;
|
||||
transition: border-color var(--motion-fast);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.tag-input::placeholder { color: var(--meta); }
|
||||
.tag-input:focus { border-color: var(--accent); box-shadow: var(--shadow-input-focus); }
|
||||
|
||||
/* Tag suggest items */
|
||||
.tag-suggest-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 6px 14px;
|
||||
border-radius: 9999px;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
min-height: 44px;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.tag-suggest-item:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Brush section title (tablet/desktop) */
|
||||
.brush-section-title {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
|
||||
/* Brush color grid (tablet/desktop) */
|
||||
.brush-colors-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
/* Tags section */
|
||||
.tags-section {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
/* Tool panel side (tablet/desktop) */
|
||||
.tool-panel-side {
|
||||
background: var(--surface);
|
||||
border-left: 1px solid var(--border-soft);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tool-panel-side::-webkit-scrollbar { width: 4px; }
|
||||
.tool-panel-side::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.panel-header {
|
||||
padding: var(--space-5);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
/* Canvas wrapper scrollbar (tablet/desktop) */
|
||||
.canvas-wrapper {
|
||||
flex: 1;
|
||||
padding: var(--space-6);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
|
||||
.canvas-wrapper::-webkit-scrollbar { width: 4px; }
|
||||
.canvas-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
/* Canvas paper (tablet/desktop) */
|
||||
.canvas-paper {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--elev-medium);
|
||||
border: 1px solid var(--border-soft);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Editor body flex layout (tablet/desktop) */
|
||||
.editor-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
235
docs/opendesign/css/tokens.css
Normal file
235
docs/opendesign/css/tokens.css
Normal file
@@ -0,0 +1,235 @@
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* 暖记 (Warm Notes) — 手账日记App 视觉系统
|
||||
* Theme 1: 暖阳 (Warm Sun) — 温暖治愈 · 手绘插画风 · 默认
|
||||
* Theme 2: 松风 (Pine Wind) — 静谧森林 · 自然调性 · 男学生向
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
|
||||
:root {
|
||||
/* Surface */
|
||||
--bg: #FFF8F0;
|
||||
--surface: #FFFFFF;
|
||||
--surface-warm: #FFF3E6;
|
||||
|
||||
/* Foreground ramp (contrast-safe on #FFF8F0) */
|
||||
--fg: #2D2420;
|
||||
--fg-2: #5C4F47;
|
||||
--muted: #7A6D63;
|
||||
--meta: #8B7E74;
|
||||
|
||||
/* Border */
|
||||
--border: #E8DDD4;
|
||||
--border-soft: #F0E8DF;
|
||||
|
||||
/* Accent — soft coral / terracotta */
|
||||
--accent: #E07A5F;
|
||||
--accent-on: #FFF8F0;
|
||||
--accent-hover: #D06A4F;
|
||||
--accent-active: #C05A3F;
|
||||
--accent-glow: rgba(224, 122, 95, 0.25);
|
||||
|
||||
/* Secondary — sage green */
|
||||
--secondary: #81B29A;
|
||||
--secondary-soft: #D4E8DC;
|
||||
|
||||
/* Tertiary — warm gold */
|
||||
--tertiary: #F2CC8F;
|
||||
--tertiary-soft: #FBE8C8;
|
||||
|
||||
/* Rose */
|
||||
--rose: #D4A5A5;
|
||||
--rose-soft: #F0DADA;
|
||||
|
||||
/* Semantic */
|
||||
--success: #5A9E7E;
|
||||
--warn: #D4A843;
|
||||
--danger: #C93D3D;
|
||||
|
||||
/* Typography */
|
||||
--font-display: "Quicksand", "Nunito", "SF Pro Rounded", -apple-system, system-ui, sans-serif;
|
||||
--font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
||||
--font-mono: ui-monospace, "JetBrains Mono", monospace;
|
||||
--font-handwritten: "Caveat", "Kalam", cursive;
|
||||
|
||||
/* Type scale */
|
||||
--text-xs: 11px;
|
||||
--text-sm: 13px;
|
||||
--text-base: 15px;
|
||||
--text-md: 17px;
|
||||
--text-lg: 20px;
|
||||
--text-xl: 24px;
|
||||
--text-2xl: 30px;
|
||||
--text-3xl: 38px;
|
||||
--text-4xl: 48px;
|
||||
|
||||
--leading-body: 1.6;
|
||||
--leading-tight: 1.25;
|
||||
|
||||
/* Spacing */
|
||||
--space-1: 4px;
|
||||
--space-2: 8px;
|
||||
--space-3: 12px;
|
||||
--space-4: 16px;
|
||||
--space-5: 20px;
|
||||
--space-6: 24px;
|
||||
--space-8: 32px;
|
||||
--space-10: 40px;
|
||||
--space-12: 48px;
|
||||
|
||||
/* Radius */
|
||||
--radius-sm: 10px;
|
||||
--radius-md: 16px;
|
||||
--radius-lg: 22px;
|
||||
--radius-xl: 28px;
|
||||
--radius-pill: 9999px;
|
||||
|
||||
/* Elevation */
|
||||
--elev-soft: 0 2px 12px rgba(45, 36, 32, 0.06);
|
||||
--elev-medium: 0 4px 20px rgba(45, 36, 32, 0.08);
|
||||
--elev-float: 0 8px 32px rgba(45, 36, 32, 0.12);
|
||||
|
||||
/* Focus */
|
||||
--focus-ring: 0 0 0 3px rgba(224, 122, 95, 0.45);
|
||||
--shadow-accent: 0 4px 14px rgba(224, 122, 95, 0.25);
|
||||
--shadow-accent-hover: 0 6px 20px rgba(224, 122, 95, 0.35);
|
||||
--shadow-input-focus: 0 0 0 3px rgba(224, 122, 95, 0.2);
|
||||
--bg-frosted: rgba(255, 248, 240, 0.85);
|
||||
|
||||
/* Touch target minimum (WCAG 2.5.8) */
|
||||
--touch-min: 44px;
|
||||
|
||||
/* Motion */
|
||||
--motion-fast: 150ms;
|
||||
--motion-base: 250ms;
|
||||
--ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
||||
|
||||
/* Layout */
|
||||
--container-max: 390px;
|
||||
--safe-top: 54px;
|
||||
--safe-bottom: 34px;
|
||||
--tab-height: 56px;
|
||||
|
||||
/* Theme meta */
|
||||
--theme-name: "暖阳";
|
||||
}
|
||||
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* Theme: 松风 (Pine Wind) — 森林书房 · 男学生向
|
||||
* Steel blue accent + forest green + warm amber
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
[data-theme="pine"] {
|
||||
--bg: #F2F3F0;
|
||||
--surface: #FFFFFF;
|
||||
--surface-warm: #E9EAE6;
|
||||
|
||||
--fg: #23272F;
|
||||
--fg-2: #484E58;
|
||||
--muted: #6E7380;
|
||||
--meta: #8A8F9A;
|
||||
|
||||
--border: #D5D2CD;
|
||||
--border-soft: #E3E1DC;
|
||||
|
||||
--accent: #4A7B9D;
|
||||
--accent-on: #FFFFFF;
|
||||
--accent-hover: #3F6A8A;
|
||||
--accent-active: #345A78;
|
||||
--accent-glow: rgba(74, 123, 157, 0.25);
|
||||
|
||||
--secondary: #5B9E7A;
|
||||
--secondary-soft: #D6E8DE;
|
||||
|
||||
--tertiary: #C49A3C;
|
||||
--tertiary-soft: #F0E4C8;
|
||||
|
||||
--rose: #7A8B6A;
|
||||
--rose-soft: #E0E8D8;
|
||||
|
||||
--success: #4A9E6E;
|
||||
--warn: #B89430;
|
||||
--danger: #C93D3D;
|
||||
|
||||
--elev-soft: 0 2px 12px rgba(35, 39, 47, 0.06);
|
||||
--elev-medium: 0 4px 20px rgba(35, 39, 47, 0.08);
|
||||
--elev-float: 0 8px 32px rgba(35, 39, 47, 0.12);
|
||||
|
||||
--focus-ring: 0 0 0 3px rgba(74, 123, 157, 0.45);
|
||||
--shadow-accent: 0 4px 14px rgba(74, 123, 157, 0.25);
|
||||
--shadow-accent-hover: 0 6px 20px rgba(74, 123, 157, 0.35);
|
||||
--shadow-input-focus: 0 0 0 3px rgba(74, 123, 157, 0.2);
|
||||
--bg-frosted: rgba(242, 243, 240, 0.85);
|
||||
|
||||
--theme-name: "松风";
|
||||
}
|
||||
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* Dark Mode — 暖阳 (Warm Sun) dark
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme]),
|
||||
:root[data-theme="warm"] {
|
||||
--bg: #1A1614;
|
||||
--surface: #2A2520;
|
||||
--surface-warm: #332D28;
|
||||
--fg: #F0E8DF;
|
||||
--fg-2: #C4B8AA;
|
||||
--muted: #9B8E82;
|
||||
--meta: #7A6D63;
|
||||
--border: #3A3530;
|
||||
--border-soft: #302B26;
|
||||
--accent: #E8907A;
|
||||
--accent-on: #1A1614;
|
||||
--accent-hover: #D07A64;
|
||||
--accent-active: #C06A54;
|
||||
--accent-glow: rgba(232, 144, 122, 0.25);
|
||||
--secondary: #8FBF9E;
|
||||
--secondary-soft: #2A3A2E;
|
||||
--tertiary: #D4B878;
|
||||
--tertiary-soft: #302A1E;
|
||||
--rose: #C4A0A0;
|
||||
--rose-soft: #3A2A2A;
|
||||
--success: #6AAF8E;
|
||||
--warn: #C4A843;
|
||||
--danger: #D94A4A;
|
||||
--elev-soft: 0 2px 12px rgba(0, 0, 0, 0.2);
|
||||
--elev-medium: 0 4px 20px rgba(0, 0, 0, 0.25);
|
||||
--elev-float: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||||
--focus-ring: 0 0 0 3px rgba(232, 144, 122, 0.5);
|
||||
--shadow-accent: 0 4px 14px rgba(232, 144, 122, 0.25);
|
||||
--shadow-accent-hover: 0 6px 20px rgba(232, 144, 122, 0.35);
|
||||
--shadow-input-focus: 0 0 0 3px rgba(232, 144, 122, 0.2);
|
||||
--bg-frosted: rgba(26, 22, 20, 0.85);
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
[data-theme="pine"] {
|
||||
--bg: #14161C;
|
||||
--surface: #1C1E26;
|
||||
--surface-warm: #22242C;
|
||||
--fg: #E4E6EC;
|
||||
--fg-2: #B4B8C4;
|
||||
--muted: #7E8494;
|
||||
--meta: #5E6474;
|
||||
--border: #282C38;
|
||||
--border-soft: #1E222C;
|
||||
--accent: #5A8FAD;
|
||||
--accent-on: #14161C;
|
||||
--accent-hover: #4A7F9D;
|
||||
--accent-active: #3A6F8D;
|
||||
--accent-glow: rgba(90, 143, 173, 0.25);
|
||||
--secondary: #6AAE85;
|
||||
--secondary-soft: #1C2E24;
|
||||
--tertiary: #D4AA4C;
|
||||
--tertiary-soft: #2A2618;
|
||||
--rose: #8A9B7A;
|
||||
--rose-soft: #242E20;
|
||||
--success: #5AAE7E;
|
||||
--warn: #C4A440;
|
||||
--danger: #D94A4A;
|
||||
--elev-soft: 0 2px 12px rgba(0, 0, 0, 0.2);
|
||||
--elev-medium: 0 4px 20px rgba(0, 0, 0, 0.25);
|
||||
--elev-float: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||||
--focus-ring: 0 0 0 3px rgba(90, 143, 173, 0.5);
|
||||
--shadow-accent: 0 4px 14px rgba(90, 143, 173, 0.25);
|
||||
--shadow-accent-hover: 0 6px 20px rgba(90, 143, 173, 0.35);
|
||||
--shadow-input-focus: 0 0 0 3px rgba(90, 143, 173, 0.2);
|
||||
--bg-frosted: rgba(20, 22, 28, 0.85);
|
||||
611
docs/opendesign/index.html
Normal file
611
docs/opendesign/index.html
Normal file
@@ -0,0 +1,611 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>暖记 — 多终端手账App 设计稿</title>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;500;600;700&display=swap');
|
||||
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--bg: #FFF8F0;
|
||||
--surface: #FFFFFF;
|
||||
--fg: #2D2420;
|
||||
--fg-2: #5C4F47;
|
||||
--muted: #7A6D63;
|
||||
--meta: #8B7E74;
|
||||
--border: #E8DDD4;
|
||||
--border-soft: #F0E8DF;
|
||||
--accent: #E07A5F;
|
||||
--accent-on: #FFF8F0;
|
||||
--accent-hover: #D06A4F;
|
||||
--accent-glow: rgba(224, 122, 95, 0.25);
|
||||
--secondary: #81B29A;
|
||||
--secondary-soft: #D4E8DC;
|
||||
--tertiary: #F2CC8F;
|
||||
--rose: #D4A5A5;
|
||||
--focus-ring: 0 0 0 3px rgba(224, 122, 95, 0.45);
|
||||
--shadow-accent: 0 4px 14px rgba(224, 122, 95, 0.25);
|
||||
--elev-soft: 0 2px 12px rgba(45, 36, 32, 0.06);
|
||||
--elev-medium: 0 4px 20px rgba(45, 36, 32, 0.08);
|
||||
--elev-float: 0 8px 32px rgba(45, 36, 32, 0.12);
|
||||
--font-display: 'Quicksand', 'Nunito', sans-serif;
|
||||
--font-body: 'Nunito', sans-serif;
|
||||
}
|
||||
[data-theme="pine"] {
|
||||
--bg: #F2F3F0;
|
||||
--surface: #FFFFFF;
|
||||
--fg: #23272F;
|
||||
--fg-2: #484E58;
|
||||
--muted: #6E7380;
|
||||
--meta: #8A8F9A;
|
||||
--border: #D5D2CD;
|
||||
--border-soft: #E3E1DC;
|
||||
--accent: #4A7B9D;
|
||||
--accent-on: #FFFFFF;
|
||||
--accent-hover: #3F6A8A;
|
||||
--accent-glow: rgba(74, 123, 157, 0.25);
|
||||
--secondary: #5B9E7A;
|
||||
--secondary-soft: #D6E8DE;
|
||||
--tertiary: #C49A3C;
|
||||
--rose: #7A8B6A;
|
||||
--focus-ring: 0 0 0 3px rgba(74, 123, 157, 0.45);
|
||||
--shadow-accent: 0 4px 14px rgba(74, 123, 157, 0.25);
|
||||
--elev-soft: 0 2px 12px rgba(35, 39, 47, 0.06);
|
||||
--elev-medium: 0 4px 20px rgba(35, 39, 47, 0.08);
|
||||
--elev-float: 0 8px 32px rgba(35, 39, 47, 0.12);
|
||||
}
|
||||
|
||||
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
|
||||
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
background: linear-gradient(180deg, var(--bg) 0%, var(--tertiary-soft, #FFE8D6) 50%, var(--bg) 100%);
|
||||
color: var(--fg);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.hero {
|
||||
text-align: center;
|
||||
padding: 80px 24px 60px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.hero::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
left: -20%;
|
||||
width: 140%;
|
||||
height: 200%;
|
||||
background: radial-gradient(ellipse at center, color-mix(in oklab, var(--accent) 6%, transparent) 0%, transparent 60%);
|
||||
pointer-events: none;
|
||||
}
|
||||
.hero-badge {
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
padding: 6px 16px; border-radius: 999px;
|
||||
background: color-mix(in oklab, var(--accent) 10%, transparent);
|
||||
color: var(--accent); font-size: 13px;
|
||||
font-weight: 600; margin-bottom: 20px;
|
||||
}
|
||||
.hero h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(36px, 5vw, 56px);
|
||||
font-weight: 700; letter-spacing: 1px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.hero h1 span { color: var(--accent); }
|
||||
.hero .subtitle {
|
||||
font-size: clamp(15px, 2vw, 18px);
|
||||
color: var(--muted); max-width: 500px;
|
||||
margin: 0 auto 32px; line-height: 1.6;
|
||||
}
|
||||
.hero-meta {
|
||||
display: flex; justify-content: center;
|
||||
gap: 24px; flex-wrap: wrap;
|
||||
}
|
||||
.hero-meta span {
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
font-size: 14px; color: var(--fg-2);
|
||||
}
|
||||
.hero-meta .dot {
|
||||
width: 8px; height: 8px; border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Platform tabs */
|
||||
.platform-tabs {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.platform-tab {
|
||||
padding: 10px 24px;
|
||||
border-radius: 999px;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--surface);
|
||||
font-family: var(--font-display);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
.platform-tab:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.platform-tab.active { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
|
||||
|
||||
.platform-section { display: none; }
|
||||
.platform-section.active { display: block; }
|
||||
|
||||
/* Tablet frame */
|
||||
.tablet-frame {
|
||||
width: 480px;
|
||||
height: 360px;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 32px rgba(45,36,32,0.12), 0 0 0 1px var(--border-soft);
|
||||
background: white;
|
||||
transition: box-shadow 0.3s;
|
||||
}
|
||||
.tablet-card:hover .tablet-frame {
|
||||
box-shadow: var(--shadow-accent), 0 0 0 1px var(--accent);
|
||||
}
|
||||
.tablet-frame iframe {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
border: none;
|
||||
transform: scale(0.469);
|
||||
transform-origin: top left;
|
||||
pointer-events: none;
|
||||
}
|
||||
.tablet-card {
|
||||
flex-shrink: 0;
|
||||
scroll-snap-align: start;
|
||||
width: 480px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
.tablet-card:hover { transform: translateY(-8px); }
|
||||
|
||||
/* Desktop frame */
|
||||
.desktop-frame {
|
||||
width: 640px;
|
||||
height: 400px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 32px rgba(45,36,32,0.12), 0 0 0 1px var(--border-soft);
|
||||
background: white;
|
||||
transition: box-shadow 0.3s;
|
||||
}
|
||||
.desktop-card:hover .desktop-frame {
|
||||
box-shadow: var(--shadow-accent), 0 0 0 1px var(--accent);
|
||||
}
|
||||
.desktop-frame iframe {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
border: none;
|
||||
transform: scale(0.444);
|
||||
transform-origin: top left;
|
||||
pointer-events: none;
|
||||
}
|
||||
.desktop-card {
|
||||
flex-shrink: 0;
|
||||
scroll-snap-align: start;
|
||||
width: 640px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
.desktop-card:hover { transform: translateY(-8px); }
|
||||
|
||||
/* Section */
|
||||
.section {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 40px 24px;
|
||||
}
|
||||
.section-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: 28px; font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.section-desc {
|
||||
font-size: 15px; color: var(--muted);
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
/* Screen gallery */
|
||||
.screen-gallery {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 24px;
|
||||
scroll-snap-type: x mandatory;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
.screen-gallery::-webkit-scrollbar { height: 6px; }
|
||||
.screen-gallery::-webkit-scrollbar-track { background: transparent; }
|
||||
.screen-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
||||
|
||||
.screen-card {
|
||||
flex-shrink: 0;
|
||||
scroll-snap-align: start;
|
||||
width: 240px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
.screen-card:hover { transform: translateY(-8px); }
|
||||
|
||||
.screen-frame {
|
||||
width: 240px;
|
||||
height: 520px;
|
||||
border-radius: 28px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 32px rgba(45,36,32,0.12), 0 0 0 1px var(--border-soft);
|
||||
position: relative;
|
||||
background: white;
|
||||
transition: box-shadow 0.3s;
|
||||
}
|
||||
.screen-card:hover .screen-frame {
|
||||
box-shadow: var(--shadow-accent), 0 0 0 1px var(--accent);
|
||||
}
|
||||
.screen-frame iframe {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
border: none;
|
||||
transform: scale(0.615);
|
||||
transform-origin: top left;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.screen-label {
|
||||
margin-top: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
.screen-label .name {
|
||||
font-family: var(--font-display);
|
||||
font-size: 15px; font-weight: 600;
|
||||
color: var(--fg);
|
||||
}
|
||||
.screen-label .desc {
|
||||
font-size: 12px; color: var(--muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Device showcase */
|
||||
.device-showcase {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 48px;
|
||||
flex-wrap: wrap;
|
||||
padding: 40px 0;
|
||||
}
|
||||
.device-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.device-frame-wrapper {
|
||||
border-radius: 28px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 8px 40px rgba(45,36,32,0.12);
|
||||
border: 1px solid var(--border-soft);
|
||||
transition: box-shadow 0.3s;
|
||||
}
|
||||
.device-frame-wrapper:hover {
|
||||
box-shadow: var(--shadow-accent);
|
||||
}
|
||||
.device-frame-wrapper iframe {
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.device-label {
|
||||
font-family: var(--font-display);
|
||||
font-size: 15px; font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.device-sub {
|
||||
font-size: 12px; color: var(--muted);
|
||||
}
|
||||
|
||||
/* Design tokens */
|
||||
.tokens-section {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
gap: 16px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.token-card {
|
||||
background: var(--surface);
|
||||
border-radius: 14px;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--border-soft);
|
||||
box-shadow: 0 2px 8px rgba(45,36,32,0.04);
|
||||
}
|
||||
.token-swatch {
|
||||
width: 100%;
|
||||
aspect-ratio: 1.4;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.token-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: 13px; font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.token-value {
|
||||
font-size: 12px; color: var(--muted);
|
||||
font-family: ui-monospace, monospace;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer {
|
||||
text-align: center;
|
||||
padding: 60px 24px 40px;
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
footer a { color: var(--accent); text-decoration: none; }
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.hero { padding: 60px 20px 40px; }
|
||||
.section { padding: 24px 16px; }
|
||||
.screen-gallery { gap: 20px; }
|
||||
.screen-card { width: 200px; }
|
||||
.screen-frame { width: 200px; height: 434px; }
|
||||
.screen-frame iframe { transform: scale(0.513); }
|
||||
.device-showcase { gap: 32px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Hero -->
|
||||
<header class="hero">
|
||||
<div class="hero-badge">Design System v1.0</div>
|
||||
<h1><span>暖记</span> · 手账日记</h1>
|
||||
<p class="subtitle">用温暖的方式,记录每一天。面向学生的多终端手账日记App,融合日记记录、贴纸装饰、模板系统、心情追踪、登录注册、发现探索与搜索。</p>
|
||||
<div class="hero-meta">
|
||||
<span><span class="dot" style="background:var(--accent)"></span>温暖治愈风</span>
|
||||
<span><span class="dot" style="background:var(--secondary)"></span>iOS / Android / iPad / Desktop</span>
|
||||
<span><span class="dot" style="background:var(--tertiary)"></span>27 页面 · 3 终端</span>
|
||||
<span><span class="dot" style="background:var(--rose)"></span>学生向</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Platform tabs -->
|
||||
<div class="platform-tabs" style="margin-top:-20px; position:relative; z-index:10">
|
||||
<button class="platform-tab active" onclick="switchPlatform('mobile', this)">手机端</button>
|
||||
<button class="platform-tab" onclick="switchPlatform('tablet', this)">平板端</button>
|
||||
<button class="platform-tab" onclick="switchPlatform('desktop', this)">桌面端</button>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Screens -->
|
||||
<section class="section platform-section active" id="mobile-section">
|
||||
<div class="section-title">手机端 · 14个页面</div>
|
||||
<div class="section-desc">iOS / Android — 从启动到日常使用的完整流程,含登录注册、发现探索、搜索筛选</div>
|
||||
<div class="screen-gallery" id="gallery">
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/splash.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">启动页</div><div class="desc">品牌展示 · 进入引导</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/onboarding.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">引导页</div><div class="desc">3步了解核心功能</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/home-daily.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">首页 · 日记流</div><div class="desc">心情 · 今日日记 · 历史</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/editor.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">手账编辑器</div><div class="desc">文字 · 贴纸 · 画笔 · 照片</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/calendar.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">日历视图</div><div class="desc">月历 · 心情 · 时间轴</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/mood-tracker.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">心情追踪</div><div class="desc">心情趋势 · 天气 · 洞察</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/stickers.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">贴纸素材库</div><div class="desc">分类浏览 · 素材包 · 收藏</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/templates.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">模板画廊</div><div class="desc">日/周/月视图模板</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/weekly.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">周概览</div><div class="desc">一周七天 · 总结统计</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/monthly.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">月度概览</div><div class="desc">心情色彩日历 · 精选</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/profile.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">个人中心</div><div class="desc">成就 · 设置 · 同步</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/login.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">登录/注册</div><div class="desc">手机号+社交登录+注册切换</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/discover.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">发现页</div><div class="desc">搜索+热门话题+精选模板+达人日记</div></div>
|
||||
</div>
|
||||
|
||||
<div class="screen-card">
|
||||
<div class="screen-frame"><iframe src="screens/search.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">搜索结果</div><div class="desc">搜索历史+结果分类筛选</div></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Tablet Screens -->
|
||||
<section class="section platform-section" id="tablet-section">
|
||||
<div class="section-title">平板端 · 6个页面</div>
|
||||
<div class="section-desc">iPad 1024×768 — 侧边栏导航 + 双列布局 + 分栏编辑器 + 登录注册 + 发现搜索</div>
|
||||
<div class="screen-gallery">
|
||||
|
||||
<div class="tablet-card">
|
||||
<div class="tablet-frame"><iframe src="screens/tablet/home-daily.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">首页日记流</div><div class="desc">侧边栏 + 双列内容 + 心情选择</div></div>
|
||||
</div>
|
||||
|
||||
<div class="tablet-card">
|
||||
<div class="tablet-frame"><iframe src="screens/tablet/editor.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">手账编辑器</div><div class="desc">宽画布 + 右侧贴纸面板</div></div>
|
||||
</div>
|
||||
|
||||
<div class="tablet-card">
|
||||
<div class="tablet-frame"><iframe src="screens/tablet/calendar.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">日历视图</div><div class="desc">月历 + 时间轴双栏并排</div></div>
|
||||
</div>
|
||||
|
||||
<div class="tablet-card">
|
||||
<div class="tablet-frame"><iframe src="screens/tablet/login.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">登录/注册</div><div class="desc">宽屏双栏登录 + 社交账号</div></div>
|
||||
</div>
|
||||
|
||||
<div class="tablet-card">
|
||||
<div class="tablet-frame"><iframe src="screens/tablet/discover.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">发现页</div><div class="desc">热门话题 + 精选模板 + 达人日记</div></div>
|
||||
</div>
|
||||
|
||||
<div class="tablet-card">
|
||||
<div class="tablet-frame"><iframe src="screens/tablet/search.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">搜索结果</div><div class="desc">搜索历史 + 结果分类筛选</div></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Desktop Screens -->
|
||||
<section class="section platform-section" id="desktop-section">
|
||||
<div class="section-title">桌面端 · 6个页面</div>
|
||||
<div class="section-desc">1440×900 — 固定侧边栏 + 多列布局 + 高信息密度 + 登录注册 + 发现搜索</div>
|
||||
<div class="screen-gallery">
|
||||
|
||||
<div class="desktop-card">
|
||||
<div class="desktop-frame"><iframe src="screens/desktop/home-daily.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">首页日记流</div><div class="desc">侧边栏 + 日记流 + 心情/统计面板</div></div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-card">
|
||||
<div class="desktop-frame"><iframe src="screens/desktop/editor.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">手账编辑器</div><div class="desc">工具条 + 全宽画布 + 右侧属性面板</div></div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-card">
|
||||
<div class="desktop-frame"><iframe src="screens/desktop/calendar.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">日历视图</div><div class="desc">统计 + 月历 + 日记详情三栏</div></div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-card">
|
||||
<div class="desktop-frame"><iframe src="screens/desktop/login.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">登录/注册</div><div class="desc">桌面端全屏登录 + 社交账号</div></div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-card">
|
||||
<div class="desktop-frame"><iframe src="screens/desktop/discover.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">发现页</div><div class="desc">热门话题 + 精选模板 + 达人日记</div></div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-card">
|
||||
<div class="desktop-frame"><iframe src="screens/desktop/search.html" loading="lazy"></iframe></div>
|
||||
<div class="screen-label"><div class="name">搜索结果</div><div class="desc">搜索历史 + 结果分类筛选</div></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Design Tokens -->
|
||||
<section class="section">
|
||||
<div class="section-title">视觉系统</div>
|
||||
<div class="section-desc">暖记的色彩体系与排版规则</div>
|
||||
<div class="tokens-section">
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#FFF8F0;border:1px solid #E8DDD4"></div>
|
||||
<div class="token-name">Background</div>
|
||||
<div class="token-value">#FFF8F0</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#E07A5F"></div>
|
||||
<div class="token-name">Accent</div>
|
||||
<div class="token-value">#E07A5F</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#81B29A"></div>
|
||||
<div class="token-name">Secondary</div>
|
||||
<div class="token-value">#81B29A</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#F2CC8F"></div>
|
||||
<div class="token-name">Tertiary</div>
|
||||
<div class="token-value">#F2CC8F</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#D4A5A5"></div>
|
||||
<div class="token-name">Rose</div>
|
||||
<div class="token-value">#D4A5A5</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#2D2420"></div>
|
||||
<div class="token-name">Foreground</div>
|
||||
<div class="token-value">#2D2420</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#8B7E74"></div>
|
||||
<div class="token-name">Muted</div>
|
||||
<div class="token-value">#8B7E74</div>
|
||||
</div>
|
||||
<div class="token-card">
|
||||
<div class="token-swatch" style="background:#E8DDD4"></div>
|
||||
<div class="token-name">Border</div>
|
||||
<div class="token-value">#E8DDD4</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<p>暖记 Warm Notes — 多终端手账日记App设计稿</p>
|
||||
<p style="margin-top:8px">27 页面 · 手机 14 + 平板 6 + 桌面 6 · 温暖治愈视觉系统</p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
function switchPlatform(platform, btn) {
|
||||
document.querySelectorAll('.platform-section').forEach(s => s.classList.remove('active'));
|
||||
document.querySelectorAll('.platform-tab').forEach(t => t.classList.remove('active'));
|
||||
document.getElementById(platform + '-section').classList.add('active');
|
||||
btn.classList.add('active');
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
103
docs/opendesign/js/theme-switcher.js
Normal file
103
docs/opendesign/js/theme-switcher.js
Normal file
@@ -0,0 +1,103 @@
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* 暖记 Theme Switcher
|
||||
* Handles theme toggling + localStorage persistence
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
(function () {
|
||||
var THEMES = [
|
||||
{ id: 'warm', name: '暖阳', swatch: '#E07A5F' },
|
||||
{ id: 'pine', name: '松风', swatch: '#4A7B9D' }
|
||||
];
|
||||
var STORAGE_KEY = 'warmnotes-theme';
|
||||
|
||||
function getCurrent() {
|
||||
return localStorage.getItem(STORAGE_KEY) || 'warm';
|
||||
}
|
||||
|
||||
function apply(id) {
|
||||
if (id === 'warm') {
|
||||
document.documentElement.removeAttribute('data-theme');
|
||||
} else {
|
||||
document.documentElement.setAttribute('data-theme', id);
|
||||
}
|
||||
localStorage.setItem(STORAGE_KEY, id);
|
||||
}
|
||||
|
||||
function cycle() {
|
||||
var cur = getCurrent();
|
||||
var idx = 0;
|
||||
for (var i = 0; i < THEMES.length; i++) {
|
||||
if (THEMES[i].id === cur) { idx = i; break; }
|
||||
}
|
||||
var next = THEMES[(idx + 1) % THEMES.length];
|
||||
apply(next.id);
|
||||
updateBtn(next);
|
||||
}
|
||||
|
||||
function updateBtn(theme) {
|
||||
var btn = document.getElementById('theme-toggle-btn');
|
||||
if (!btn) return;
|
||||
var dot = btn.querySelector('.theme-dot');
|
||||
var label = btn.querySelector('.theme-label');
|
||||
if (dot) dot.style.background = theme.swatch;
|
||||
if (label) label.textContent = theme.name;
|
||||
btn.setAttribute('aria-label', 'Switch theme (current: ' + theme.name + ')');
|
||||
}
|
||||
|
||||
// Apply stored theme immediately (prevent flash)
|
||||
var saved = getCurrent();
|
||||
apply(saved);
|
||||
|
||||
// Wait for DOM then inject toggle button
|
||||
function init() {
|
||||
if (document.getElementById('theme-toggle-btn')) return;
|
||||
|
||||
var cur = THEMES.filter(function (t) { return t.id === saved; })[0] || THEMES[0];
|
||||
|
||||
var wrap = document.createElement('div');
|
||||
wrap.id = 'theme-toggle-btn';
|
||||
wrap.setAttribute('role', 'button');
|
||||
wrap.setAttribute('tabindex', '0');
|
||||
wrap.setAttribute('aria-label', 'Switch theme (current: ' + cur.name + ')');
|
||||
wrap.onclick = function () { saved = getCurrent(); cycle(); };
|
||||
wrap.onkeydown = function (e) { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); cycle(); } };
|
||||
|
||||
var style = document.createElement('style');
|
||||
style.textContent = '\
|
||||
#theme-toggle-btn{position:fixed;top:8px;right:8px;z-index:10000;display:flex;align-items:center;gap:6px;\
|
||||
padding:5px 12px 5px 8px;border-radius:20px;border:1px solid var(--border);\
|
||||
background:var(--surface);color:var(--fg);font-size:11px;font-family:var(--font-body);\
|
||||
cursor:pointer;box-shadow:var(--elev-medium);transition:all .2s ease;user-select:none;line-height:1;}\
|
||||
#theme-toggle-btn:hover{box-shadow:var(--elev-float);}\
|
||||
#theme-toggle-btn:focus-visible{outline:none;box-shadow:var(--focus-ring);}\
|
||||
.theme-dot{width:14px;height:14px;border-radius:50%;flex-shrink:0;border:1.5px solid var(--border);}\
|
||||
.theme-label{white-space:nowrap;font-weight:600;}';
|
||||
document.head.appendChild(style);
|
||||
|
||||
var dot = document.createElement('span');
|
||||
dot.className = 'theme-dot';
|
||||
dot.style.background = cur.swatch;
|
||||
|
||||
var label = document.createElement('span');
|
||||
label.className = 'theme-label';
|
||||
label.textContent = cur.name;
|
||||
|
||||
wrap.appendChild(dot);
|
||||
wrap.appendChild(label);
|
||||
document.body.appendChild(wrap);
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
|
||||
// Cross-tab sync
|
||||
window.addEventListener('storage', function (e) {
|
||||
if (e.key === STORAGE_KEY && e.newValue) {
|
||||
apply(e.newValue);
|
||||
var t = THEMES.filter(function (th) { return th.id === e.newValue; })[0] || THEMES[0];
|
||||
updateBtn(t);
|
||||
}
|
||||
});
|
||||
})();
|
||||
514
docs/opendesign/screens/calendar.html
Normal file
514
docs/opendesign/screens/calendar.html
Normal file
@@ -0,0 +1,514 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 日历视图</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto;
|
||||
padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* Month header */
|
||||
.month-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.month-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.month-nav {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.month-nav button {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.month-nav button:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.month-nav button svg { width: 18px; height: 18px; }
|
||||
|
||||
/* View toggle */
|
||||
.view-toggle {
|
||||
display: flex;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 3px;
|
||||
margin-bottom: var(--space-5);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.view-toggle button {
|
||||
flex: 1;
|
||||
padding: 8px 0;
|
||||
min-height: 44px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: transparent;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.view-toggle button.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
|
||||
/* Calendar grid */
|
||||
.weekday-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.weekday-row span {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--meta);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.calendar-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 4px;
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.cal-day {
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: all var(--motion-fast);
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg);
|
||||
gap: 2px;
|
||||
min-height: 44px;
|
||||
}
|
||||
.cal-day:hover { background: var(--surface-warm); }
|
||||
.cal-day.empty { cursor: default; }
|
||||
.cal-day.empty:hover { background: transparent; }
|
||||
.cal-day.other-month { color: var(--meta); }
|
||||
.cal-day.today {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
font-weight: 700;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.cal-day.selected {
|
||||
background: var(--surface-warm);
|
||||
border: 2px solid var(--accent);
|
||||
}
|
||||
.cal-day.today.selected {
|
||||
background: var(--accent);
|
||||
border: 2px solid var(--accent);
|
||||
}
|
||||
.mood-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
}
|
||||
.mood-dot.happy { background: var(--secondary); }
|
||||
.mood-dot.love { background: var(--accent); }
|
||||
.mood-dot.calm { background: var(--tertiary); }
|
||||
.mood-dot.sad { background: #5B7DB1; }
|
||||
.mood-dot.tired { background: #8B7E74; }
|
||||
|
||||
/* Entry indicator dot */
|
||||
.entry-indicator {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 5px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
}
|
||||
.cal-day.today .entry-indicator { background: var(--accent-on); }
|
||||
|
||||
/* Timeline section */
|
||||
.timeline-section {
|
||||
margin-top: var(--space-2);
|
||||
}
|
||||
.timeline-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.timeline-header h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.timeline-count {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.timeline-item {
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
margin-bottom: var(--space-4);
|
||||
position: relative;
|
||||
}
|
||||
.timeline-line {
|
||||
width: 2px;
|
||||
background: var(--border);
|
||||
position: absolute;
|
||||
left: 19px;
|
||||
top: 36px;
|
||||
bottom: -16px;
|
||||
}
|
||||
.timeline-item:last-child .timeline-line { display: none; }
|
||||
|
||||
.timeline-dot {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
background: var(--surface);
|
||||
border: 2px solid var(--border-soft);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.timeline-content {
|
||||
flex: 1;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast);
|
||||
}
|
||||
.timeline-content:hover { transform: translateY(-1px); }
|
||||
|
||||
.tl-time {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.tl-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.tl-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Mood summary */
|
||||
.mood-summary {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-summary h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
color: var(--fg);
|
||||
}
|
||||
.mood-bar-chart {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: var(--space-3);
|
||||
height: 80px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.mood-bar {
|
||||
flex: 1;
|
||||
border-radius: 6px 6px 0 0;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
padding-bottom: 4px;
|
||||
font-size: 16px;
|
||||
transition: height var(--motion-base) var(--ease-bounce);
|
||||
}
|
||||
.mood-labels {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.mood-labels span {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Empty state for no entries on a day */
|
||||
.empty-day {
|
||||
display: none; /* Shown via JS when no entries exist */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-8) var(--space-5);
|
||||
text-align: center;
|
||||
}
|
||||
.empty-day .empty-circle {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
border: 2px dashed var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: var(--space-3);
|
||||
font-size: 24px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.empty-day .empty-text {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.empty-day .empty-hint {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--meta);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<!-- Month header -->
|
||||
<div class="month-header anim-fade">
|
||||
<div class="month-title">2026年5月</div>
|
||||
<div class="month-nav">
|
||||
<button aria-label="上个月"><svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M11 14l-5-5 5-5"/></svg></button>
|
||||
<button aria-label="下个月"><svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M7 4l5 5-5 5"/></svg></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- View toggle -->
|
||||
<div class="view-toggle anim-fade" style="animation-delay: 0.1s" role="tablist">
|
||||
<button class="active" role="tab" aria-label="月视图" aria-selected="true">月视图</button>
|
||||
<button role="tab" aria-label="周视图" aria-selected="false">周视图</button>
|
||||
<button role="tab" aria-label="时间轴" aria-selected="false">时间轴</button>
|
||||
</div>
|
||||
|
||||
<!-- Mood summary - using standardized 5 moods -->
|
||||
<div class="mood-summary anim-fade" style="animation-delay: 0.15s">
|
||||
<h4>本月心情概览</h4>
|
||||
<div class="mood-bar-chart">
|
||||
<div class="mood-bar" style="height:65%;background:var(--secondary)">😊</div>
|
||||
<div class="mood-bar" style="height:45%;background:var(--tertiary)">😐</div>
|
||||
<div class="mood-bar" style="height:20%;background:#5B7DB1">😢</div>
|
||||
<div class="mood-bar" style="height:10%;background:var(--accent)">😡</div>
|
||||
<div class="mood-bar" style="height:15%;background:#8B7E74">🤔</div>
|
||||
</div>
|
||||
<div class="mood-labels">
|
||||
<span>开心 12天</span>
|
||||
<span>平静 8天</span>
|
||||
<span>难过 2天</span>
|
||||
<span>生气 1天</span>
|
||||
<span>思考 3天</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Weekday row -->
|
||||
<div class="weekday-row anim-fade" style="animation-delay: 0.2s" aria-hidden="true">
|
||||
<span>日</span><span>一</span><span>二</span><span>三</span><span>四</span><span>五</span><span>六</span>
|
||||
</div>
|
||||
|
||||
<!-- Calendar grid -->
|
||||
<div class="calendar-grid anim-fade" style="animation-delay: 0.25s">
|
||||
<!-- Row 1: May starts on Friday -->
|
||||
<div class="cal-day empty"></div>
|
||||
<div class="cal-day empty"></div>
|
||||
<div class="cal-day empty"></div>
|
||||
<div class="cal-day empty"></div>
|
||||
<div class="cal-day empty"></div>
|
||||
<div class="cal-day" data-day="1"><span>1</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day" data-day="2"><span>2</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<div class="cal-day" data-day="3"><span>3</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="4"><span>4</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="5"><span>5</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="6"><span>6</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day" data-day="7"><span>7</span><div class="mood-dot tired"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="8"><span>8</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day" data-day="9"><span>9</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
|
||||
<!-- Row 3 -->
|
||||
<div class="cal-day" data-day="10"><span>10</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="11"><span>11</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="12"><span>12</span><div class="mood-dot tired"></div></div>
|
||||
<div class="cal-day" data-day="13"><span>13</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="14"><span>14</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="15"><span>15</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="16"><span>16</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
|
||||
<!-- Row 4 -->
|
||||
<div class="cal-day" data-day="17"><span>17</span><div class="mood-dot sad"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="18"><span>18</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="19"><span>19</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="20"><span>20</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="21"><span>21</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="22"><span>22</span><div class="mood-dot tired"></div></div>
|
||||
<div class="cal-day" data-day="23"><span>23</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
|
||||
<!-- Row 5 -->
|
||||
<div class="cal-day" data-day="24"><span>24</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="25"><span>25</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="26"><span>26</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="27"><span>27</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="28"><span>28</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="29"><span>29</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="30"><span>30</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
|
||||
<!-- Row 6 -->
|
||||
<div class="cal-day today selected" data-day="31"><span>31</span><div class="mood-dot love" style="background:var(--accent-on)"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- Today's timeline -->
|
||||
<div class="timeline-section">
|
||||
<div class="timeline-header">
|
||||
<h3>5月31日 · 今天</h3>
|
||||
<span class="timeline-count">3条记录</span>
|
||||
</div>
|
||||
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line" aria-hidden="true"></div>
|
||||
<div class="timeline-dot" aria-hidden="true">😊</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">14:30 · 心情: 开心</div>
|
||||
<div class="tl-title">图书馆的午后时光</div>
|
||||
<div class="tl-excerpt">今天下午去图书馆自习,阳光从窗外洒进来,暖暖的...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line" aria-hidden="true"></div>
|
||||
<div class="timeline-dot" aria-hidden="true">😊</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">09:15 · 心情: 开心</div>
|
||||
<div class="tl-title">周末早起的奖励</div>
|
||||
<div class="tl-excerpt">难得周末早起,去食堂吃了喜欢的豆浆油条,还买了一束花...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line" aria-hidden="true"></div>
|
||||
<div class="timeline-dot" aria-hidden="true">😐</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">07:00 · 心情: 平静</div>
|
||||
<div class="tl-title">晨跑记录</div>
|
||||
<div class="tl-excerpt">早起跑了两圈操场,空气很清新。看到有人在遛小狗...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Empty state for no entries on a day (hidden by default) -->
|
||||
<div class="empty-day" id="emptyDay">
|
||||
<div class="empty-circle">📝</div>
|
||||
<div class="empty-text">这一天没有记录</div>
|
||||
<div class="empty-hint">点击 + 开始记录这一天的心情和故事</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<nav class="tab-bar" role="tablist">
|
||||
<button class="tab-item" role="tab" aria-label="首页" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item active" role="tab" aria-label="日历" aria-selected="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="写日记" aria-selected="false" style="position:relative">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px;stroke:var(--accent-on)" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="发现" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="我的" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
629
docs/opendesign/screens/desktop/calendar.html
Normal file
629
docs/opendesign/screens/desktop/calendar.html
Normal file
@@ -0,0 +1,629 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1440, height=900, initial-scale=1">
|
||||
<title>暖记 — 桌面端日历</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.cal-layout {
|
||||
display: flex;
|
||||
height: 900px;
|
||||
padding-top: 32px;
|
||||
}
|
||||
|
||||
.sidebar { position: relative; flex-shrink: 0; }
|
||||
|
||||
.cal-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Top bar */
|
||||
.cal-topbar {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-8);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.cal-topbar-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-5);
|
||||
}
|
||||
.cal-topbar-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.cal-nav {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.cal-nav button {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.cal-nav button:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.cal-nav button svg { width: 16px; height: 16px; }
|
||||
.cal-month-label {
|
||||
font-size: var(--text-md);
|
||||
color: var(--fg-2);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.view-toggle {
|
||||
display: flex;
|
||||
background: var(--surface-warm);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 3px;
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.view-toggle button {
|
||||
padding: 7px 20px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: transparent;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.view-toggle button.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
|
||||
/* Three-column body */
|
||||
.cal-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Left: mini stats */
|
||||
.cal-left-panel {
|
||||
width: 280px;
|
||||
background: var(--surface);
|
||||
border-right: 1px solid var(--border-soft);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
flex-shrink: 0;
|
||||
padding: var(--space-6);
|
||||
}
|
||||
.cal-left-panel::-webkit-scrollbar { width: 4px; }
|
||||
.cal-left-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.mini-stats {
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.mini-stats h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
color: var(--fg);
|
||||
}
|
||||
.mini-stat-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3) 0;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
.mini-stat-row:last-child { border-bottom: none; }
|
||||
.mini-stat-icon { font-size: 20px; }
|
||||
.mini-stat-info { flex: 1; }
|
||||
.mini-stat-value {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 700;
|
||||
}
|
||||
.mini-stat-label {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.mood-summary-mini {
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.mood-summary-mini h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.mood-bar-chart {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: var(--space-4);
|
||||
height: 80px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.mood-bar {
|
||||
flex: 1;
|
||||
border-radius: 6px 6px 0 0;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
padding-bottom: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.mood-labels {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.mood-labels span {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Quick tags */
|
||||
.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.tag-item {
|
||||
padding: 5px 12px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 500;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.tag-item:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Center: calendar grid */
|
||||
.cal-center {
|
||||
flex: 1;
|
||||
padding: var(--space-6);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
.cal-center::-webkit-scrollbar { width: 4px; }
|
||||
.cal-center::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.weekday-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.weekday-row span {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--meta);
|
||||
font-weight: 500;
|
||||
padding: var(--space-2);
|
||||
}
|
||||
|
||||
.calendar-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 4px;
|
||||
}
|
||||
.cal-day {
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: all var(--motion-fast);
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: var(--text-md);
|
||||
color: var(--fg);
|
||||
gap: 2px;
|
||||
}
|
||||
.cal-day:hover { background: var(--surface-warm); }
|
||||
.cal-day.empty { cursor: default; }
|
||||
.cal-day.empty:hover { background: transparent; }
|
||||
.cal-day.today {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
font-weight: 700;
|
||||
}
|
||||
.cal-day.selected {
|
||||
background: var(--surface-warm);
|
||||
border: 2px solid var(--accent);
|
||||
}
|
||||
.cal-day.today.selected { background: var(--accent); border: 2px solid var(--accent); }
|
||||
.mood-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
}
|
||||
.mood-dot.happy { background: var(--secondary); }
|
||||
.mood-dot.love { background: var(--accent); }
|
||||
.mood-dot.calm { background: var(--tertiary); }
|
||||
.mood-dot.sad { background: #5B7DB1; }
|
||||
.mood-dot.tired { background: #8B7E74; }
|
||||
.entry-indicator {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 6px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
}
|
||||
.cal-day.today .entry-indicator { background: var(--accent-on); }
|
||||
|
||||
/* Right: timeline detail */
|
||||
.cal-right-panel {
|
||||
width: 360px;
|
||||
background: var(--surface);
|
||||
border-left: 1px solid var(--border-soft);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
flex-shrink: 0;
|
||||
padding: var(--space-6);
|
||||
}
|
||||
.cal-right-panel::-webkit-scrollbar { width: 4px; }
|
||||
.cal-right-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.detail-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.detail-date {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.detail-count {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.timeline-item {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
position: relative;
|
||||
}
|
||||
.timeline-line {
|
||||
width: 2px;
|
||||
background: var(--border);
|
||||
position: absolute;
|
||||
left: 18px;
|
||||
top: 42px;
|
||||
bottom: -16px;
|
||||
}
|
||||
.timeline-item:last-child .timeline-line { display: none; }
|
||||
|
||||
.timeline-dot {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
background: var(--bg);
|
||||
border: 2px solid var(--border-soft);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.timeline-content {
|
||||
flex: 1;
|
||||
background: var(--bg);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast);
|
||||
}
|
||||
.timeline-content:hover { transform: translateY(-1px); box-shadow: var(--elev-soft); }
|
||||
|
||||
.tl-time {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.tl-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.tl-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tl-tags {
|
||||
display: flex;
|
||||
gap: var(--space-1);
|
||||
margin-top: var(--space-2);
|
||||
}
|
||||
.tl-tag {
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="cal-layout">
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" role="navigation" aria-label="主导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item active" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="心情追踪">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="贴纸库">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg>
|
||||
贴纸库
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="模板">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
模板
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="发现">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
发现
|
||||
</button>
|
||||
</div>
|
||||
<button class="sidebar-write-btn" aria-label="写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
|
||||
写日记
|
||||
</button>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="cal-main" role="main">
|
||||
<!-- Top bar -->
|
||||
<div class="cal-topbar">
|
||||
<div class="cal-topbar-left">
|
||||
<div class="cal-topbar-title">日历</div>
|
||||
<div class="cal-nav">
|
||||
<button aria-label="上一月"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M10 14l-5-5 5-5"/></svg></button>
|
||||
<button aria-label="下一月"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 2l5 5-5 5"/></svg></button>
|
||||
</div>
|
||||
<span class="cal-month-label">2026年5月</span>
|
||||
</div>
|
||||
<div class="view-toggle">
|
||||
<button class="active">月视图</button>
|
||||
<button>周视图</button>
|
||||
<button>时间轴</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Three-column body -->
|
||||
<div class="cal-body">
|
||||
<!-- Left: stats -->
|
||||
<aside class="cal-left-panel" role="complementary" aria-label="月度统计">
|
||||
<div class="mini-stats">
|
||||
<h4>本月统计</h4>
|
||||
<div class="mini-stat-row">
|
||||
<span class="mini-stat-icon">📝</span>
|
||||
<div class="mini-stat-info">
|
||||
<div class="mini-stat-value" style="color:var(--accent)">28</div>
|
||||
<div class="mini-stat-label">日记篇数</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mini-stat-row">
|
||||
<span class="mini-stat-icon">🔥</span>
|
||||
<div class="mini-stat-info">
|
||||
<div class="mini-stat-value" style="color:var(--secondary)">12天</div>
|
||||
<div class="mini-stat-label">最长连续</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mini-stat-row">
|
||||
<span class="mini-stat-icon">😊</span>
|
||||
<div class="mini-stat-info">
|
||||
<div class="mini-stat-value">72%</div>
|
||||
<div class="mini-stat-label">好心情占比</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mini-stat-row">
|
||||
<span class="mini-stat-icon">📸</span>
|
||||
<div class="mini-stat-info">
|
||||
<div class="mini-stat-value">45</div>
|
||||
<div class="mini-stat-label">添加照片</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mood-summary-mini">
|
||||
<h4>心情分布</h4>
|
||||
<div class="mood-bar-chart">
|
||||
<div class="mood-bar" style="height:65%;background:var(--secondary)">😊</div>
|
||||
<div class="mood-bar" style="height:45%;background:var(--accent)">🥰</div>
|
||||
<div class="mood-bar" style="height:30%;background:var(--tertiary)">😌</div>
|
||||
<div class="mood-bar" style="height:15%;background:#5B7DB1">😔</div>
|
||||
<div class="mood-bar" style="height:20%;background:#8B7E74">😴</div>
|
||||
</div>
|
||||
<div class="mood-labels">
|
||||
<span>12天</span><span>8天</span><span>5天</span><span>2天</span><span>3天</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 style="font-family:var(--font-display);font-size:var(--text-base);font-weight:600;margin-bottom:var(--space-3)">常用标签</h4>
|
||||
<div class="tag-list">
|
||||
<span class="tag-item">学习</span>
|
||||
<span class="tag-item">朋友</span>
|
||||
<span class="tag-item">美食</span>
|
||||
<span class="tag-item">运动</span>
|
||||
<span class="tag-item">读书</span>
|
||||
<span class="tag-item">旅行</span>
|
||||
<span class="tag-item">心情</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Center: calendar -->
|
||||
<div class="cal-center">
|
||||
<div class="weekday-row">
|
||||
<span>周日</span><span>周一</span><span>周二</span><span>周三</span><span>周四</span><span>周五</span><span>周六</span>
|
||||
</div>
|
||||
<div class="calendar-grid">
|
||||
<div class="cal-day empty"></div><div class="cal-day empty"></div><div class="cal-day empty"></div><div class="cal-day empty"></div><div class="cal-day empty"></div>
|
||||
<div class="cal-day"><span>1</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day"><span>2</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>3</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day"><span>4</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>5</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>6</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day"><span>7</span><div class="mood-dot tired"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>8</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day"><span>9</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>10</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day"><span>11</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>12</span><div class="mood-dot tired"></div></div>
|
||||
<div class="cal-day"><span>13</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>14</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>15</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day"><span>16</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>17</span><div class="mood-dot sad"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>18</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day"><span>19</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>20</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>21</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>22</span><div class="mood-dot tired"></div></div>
|
||||
<div class="cal-day"><span>23</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>24</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>25</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day"><span>26</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>27</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>28</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>29</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day"><span>30</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day today selected"><span>31</span><div class="mood-dot love" style="background:var(--accent-on)"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right: timeline detail -->
|
||||
<aside class="cal-right-panel" role="complementary" aria-label="日期详情">
|
||||
<div class="detail-title">5月31日 · 今天</div>
|
||||
<div class="detail-date">星期日 · <span class="detail-count">3条记录</span></div>
|
||||
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line"></div>
|
||||
<div class="timeline-dot">🥰</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">14:30 · 心情: 幸福</div>
|
||||
<div class="tl-title">图书馆的午后时光</div>
|
||||
<div class="tl-excerpt">今天下午去图书馆自习,阳光从窗外洒进来,暖暖的。不知不觉就学了三个小时,中间喝了一杯抹茶拿铁☕</div>
|
||||
<div class="tl-tags">
|
||||
<span class="tl-tag">学习</span>
|
||||
<span class="tl-tag">校园</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line"></div>
|
||||
<div class="timeline-dot">😊</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">09:15 · 心情: 开心</div>
|
||||
<div class="tl-title">周末早起的奖励</div>
|
||||
<div class="tl-excerpt">难得周末早起,去食堂吃了喜欢的豆浆油条,还买了一束花放在书桌上</div>
|
||||
<div class="tl-tags">
|
||||
<span class="tl-tag">美食</span>
|
||||
<span class="tl-tag">心情</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line"></div>
|
||||
<div class="timeline-dot">😌</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">07:00 · 心情: 平静</div>
|
||||
<div class="tl-title">晨跑记录</div>
|
||||
<div class="tl-excerpt">早起跑了两圈操场,空气很清新。看到有人在遛小狗,好可爱</div>
|
||||
<div class="tl-tags">
|
||||
<span class="tl-tag">运动</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- Status bar -->
|
||||
<div class="desktop-statusbar">
|
||||
<div class="traffic-lights">
|
||||
<div class="dot" style="background:#FF5F57"></div>
|
||||
<div class="dot" style="background:#FEBC2E"></div>
|
||||
<div class="dot" style="background:#28C840"></div>
|
||||
</div>
|
||||
<span>暖记 — 日历</span>
|
||||
<span style="font-variant-numeric:tabular-nums">14:32</span>
|
||||
</div>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
648
docs/opendesign/screens/desktop/discover.html
Normal file
648
docs/opendesign/screens/desktop/discover.html
Normal file
@@ -0,0 +1,648 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1440, height=900, initial-scale=1">
|
||||
<title>暖记 — 桌面端发现</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.main-content { height: 900px; padding-top: 32px; }
|
||||
|
||||
.content-inner {
|
||||
padding: var(--space-6) var(--space-10);
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* Search bar */
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: var(--space-3) var(--space-5);
|
||||
margin-bottom: var(--space-6);
|
||||
border: 1px solid var(--border-soft);
|
||||
box-shadow: var(--elev-soft);
|
||||
transition: border-color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.search-bar:focus-within {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.search-bar svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.search-bar input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
background: none;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-md);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
}
|
||||
.search-bar input::placeholder {
|
||||
color: var(--meta);
|
||||
}
|
||||
|
||||
/* Hero inspiration card */
|
||||
.inspiration-hero {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-8) var(--space-10);
|
||||
margin-bottom: var(--space-6);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-8);
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.inspiration-hero:hover { transform: translateY(-2px); }
|
||||
.inspiration-hero::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
right: -50px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.inspiration-hero::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -30px;
|
||||
left: 60px;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.08);
|
||||
}
|
||||
.inspiration-label {
|
||||
font-size: var(--text-xs);
|
||||
color: rgba(255,255,255,0.7);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.inspiration-thumb {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(255,255,255,0.2);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 52px;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.inspiration-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.inspiration-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.inspiration-desc {
|
||||
font-size: var(--text-base);
|
||||
color: rgba(255,255,255,0.8);
|
||||
margin-bottom: var(--space-3);
|
||||
max-width: 500px;
|
||||
}
|
||||
.inspiration-author {
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,255,255,0.7);
|
||||
}
|
||||
.inspiration-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-3) var(--space-5);
|
||||
background: white;
|
||||
color: var(--accent);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.inspiration-action:hover { transform: scale(1.05); }
|
||||
.inspiration-action:focus-visible { box-shadow: var(--focus-ring); outline: none; }
|
||||
.inspiration-action svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Three-column grid */
|
||||
.discover-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
/* Section heading */
|
||||
.section-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.section-heading h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.section-heading .more {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-weight: 500;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.section-heading .more:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Topics */
|
||||
.topics-scroll {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.topic-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: var(--space-2) var(--space-4);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
color: var(--fg-2);
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.topic-chip:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
.topic-chip:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
.topic-chip.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.topic-chip .emoji {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Templates grid */
|
||||
.templates-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.template-card:hover { transform: translateY(-2px); }
|
||||
.template-card:active { transform: scale(0.97); }
|
||||
.template-thumb {
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
}
|
||||
.template-info {
|
||||
padding: var(--space-3);
|
||||
}
|
||||
.template-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-1);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.template-users {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.template-users svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
/* Expert diary cards */
|
||||
.experts-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.expert-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.expert-card:hover { transform: translateY(-2px); }
|
||||
.expert-card:active { transform: scale(0.98); }
|
||||
.expert-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.expert-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.expert-name {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.expert-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.expert-preview {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.expert-likes {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
flex-shrink: 0;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.expert-likes svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: var(--rose);
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-state {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-10) var(--space-5);
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state.visible {
|
||||
display: flex;
|
||||
}
|
||||
.empty-state .icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: var(--space-4);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.empty-state .text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.empty-state .subtext {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.5s var(--ease-standard) both; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.inspiration-hero,
|
||||
.template-card,
|
||||
.expert-card,
|
||||
.topic-chip,
|
||||
.inspiration-action {
|
||||
transition: none;
|
||||
}
|
||||
.anim-fade { animation: none; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Status bar -->
|
||||
<div class="desktop-statusbar">
|
||||
<div class="traffic-lights">
|
||||
<div class="dot" style="background:#FF5F57"></div>
|
||||
<div class="dot" style="background:#FEBC2E"></div>
|
||||
<div class="dot" style="background:#28C840"></div>
|
||||
</div>
|
||||
<span>暖记 Warm Notes</span>
|
||||
<span style="font-variant-numeric:tabular-nums">14:32</span>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" aria-label="侧边导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="心情追踪">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="贴纸库">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg>
|
||||
贴纸库
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="模板">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
模板
|
||||
</button>
|
||||
<button class="sidebar-nav-item active" aria-label="发现">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
发现
|
||||
</button>
|
||||
</div>
|
||||
<button class="sidebar-write-btn" aria-label="写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
|
||||
写日记
|
||||
</button>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="main-content">
|
||||
<!-- Top bar -->
|
||||
<div class="desktop-topbar">
|
||||
<div class="desktop-topbar-title">发现</div>
|
||||
<div class="desktop-topbar-actions">
|
||||
<button class="topbar-action-btn" aria-label="搜索">
|
||||
<svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="6"/><line x1="12.5" y1="12.5" x2="16" y2="16"/></svg>
|
||||
</button>
|
||||
<button class="topbar-action-btn" aria-label="筛选">
|
||||
<svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M4 6h10M4 9h10M4 12h7"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-inner">
|
||||
|
||||
<!-- Search bar -->
|
||||
<div class="search-bar anim-fade" data-od-id="discover-search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
|
||||
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
<input type="text" placeholder="搜索日记、模板、话题..." aria-label="搜索日记、模板、话题">
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
<div class="empty-state" data-od-id="discover-empty" role="status">
|
||||
<span class="icon" aria-hidden="true">🔍</span>
|
||||
<div class="text">没有找到相关内容</div>
|
||||
<div class="subtext">换个关键词试试吧</div>
|
||||
</div>
|
||||
|
||||
<!-- Hero inspiration -->
|
||||
<section data-od-id="discover-inspiration" aria-label="每日灵感" class="anim-fade" style="animation-delay:0.1s">
|
||||
<div class="inspiration-hero" role="article" aria-label="今日灵感推荐:旅行手账排版技巧">
|
||||
<div class="inspiration-thumb" aria-hidden="true">🗺️</div>
|
||||
<div class="inspiration-info">
|
||||
<div class="inspiration-label">今日推荐</div>
|
||||
<div class="inspiration-title">旅行手账排版技巧</div>
|
||||
<div class="inspiration-desc">学习如何用简单的素材和排版技巧,让你的旅行手账充满故事感。从照片布局到文字装饰,一步步教你做出精美的旅行记录。</div>
|
||||
<div class="inspiration-author">by 手账达人小林</div>
|
||||
</div>
|
||||
<button class="inspiration-action" aria-label="查看详情">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
|
||||
查看详情
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Three-column grid -->
|
||||
<div class="discover-grid anim-fade" style="animation-delay:0.2s">
|
||||
|
||||
<!-- Column 1: Hot topics -->
|
||||
<section data-od-id="discover-topics" aria-label="热门话题">
|
||||
<div class="section-heading">
|
||||
<h3>热门话题</h3>
|
||||
<button class="more" aria-label="查看更多话题">更多</button>
|
||||
</div>
|
||||
<div class="topics-scroll" role="list">
|
||||
<button class="topic-chip active" role="listitem" aria-label="话题:期末备考">
|
||||
<span class="emoji" aria-hidden="true">📚</span>#期末备考
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:读书笔记">
|
||||
<span class="emoji" aria-hidden="true">📖</span>#读书笔记
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:旅行手账">
|
||||
<span class="emoji" aria-hidden="true">✈️</span>#旅行手账
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:美食记录">
|
||||
<span class="emoji" aria-hidden="true">🍜</span>#美食记录
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:校园生活">
|
||||
<span class="emoji" aria-hidden="true">🎓</span>#校园生活
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:自我成长">
|
||||
<span class="emoji" aria-hidden="true">🌱</span>#自我成长
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Column 2: Featured templates -->
|
||||
<section data-od-id="discover-templates" aria-label="精选模板">
|
||||
<div class="section-heading">
|
||||
<h3>精选模板</h3>
|
||||
<button class="more" aria-label="查看更多模板">更多</button>
|
||||
</div>
|
||||
<div class="templates-grid">
|
||||
<div class="template-card" role="article" aria-label="模板:考试周复习计划">
|
||||
<div class="template-thumb" style="background: var(--tertiary-soft)" aria-hidden="true">📝</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">考试周复习计划</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
2.3k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:读书笔记手账">
|
||||
<div class="template-thumb" style="background: var(--secondary-soft)" aria-hidden="true">📖</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">读书笔记手账</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
1.8k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:月度心情打卡">
|
||||
<div class="template-thumb" style="background: var(--rose-soft)" aria-hidden="true">💫</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">月度心情打卡</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
3.1k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:旅行日记模板">
|
||||
<div class="template-thumb" style="background: var(--surface-warm)" aria-hidden="true">🗺️</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">旅行日记模板</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
1.5k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Column 3: Expert diaries -->
|
||||
<section data-od-id="discover-experts" aria-label="达人日记">
|
||||
<div class="section-heading">
|
||||
<h3>达人日记</h3>
|
||||
<button class="more" aria-label="查看更多达人日记">更多</button>
|
||||
</div>
|
||||
<div class="experts-list">
|
||||
<div class="expert-card" role="article" aria-label="达人日记:我的大学生活第100天">
|
||||
<div class="expert-avatar" style="background: var(--tertiary-soft)" aria-hidden="true">🌸</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">小暖</div>
|
||||
<div class="expert-title">我的大学生活第100天</div>
|
||||
<div class="expert-preview">不知不觉大学生活已经过了100天了,从最初的迷茫到现在的适应,记录下这段珍贵的时光...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
328
|
||||
</div>
|
||||
</div>
|
||||
<div class="expert-card" role="article" aria-label="达人日记:考研倒计时30天手账">
|
||||
<div class="expert-avatar" style="background: var(--secondary-soft)" aria-hidden="true">✏️</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">手账少女</div>
|
||||
<div class="expert-title">考研倒计时30天手账</div>
|
||||
<div class="expert-preview">最后冲刺阶段,用手账记录每一天的复习进度和心情变化,给自己加油打气...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
512
|
||||
</div>
|
||||
</div>
|
||||
<div class="expert-card" role="article" aria-label="达人日记:秋日校园手账记录">
|
||||
<div class="expert-avatar" style="background: var(--rose-soft)" aria-hidden="true">🍂</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">阿月</div>
|
||||
<div class="expert-title">秋日校园手账记录</div>
|
||||
<div class="expert-preview">银杏叶黄了,校园美得像画一样。收集了几片落叶夹在手账里,记录这个温柔的秋天...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
276
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
479
docs/opendesign/screens/desktop/editor.html
Normal file
479
docs/opendesign/screens/desktop/editor.html
Normal file
@@ -0,0 +1,479 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1440, height=900, initial-scale=1">
|
||||
<title>暖记 — 桌面端编辑器</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="../css/editor-common.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.editor-layout {
|
||||
display: flex;
|
||||
height: 900px;
|
||||
padding-top: 32px;
|
||||
}
|
||||
|
||||
.sidebar { position: relative; flex-shrink: 0; }
|
||||
|
||||
.editor-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.editor-topbar {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-8);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.topbar-left, .topbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.topbar-btn {
|
||||
width: 38px; height: 38px; border-radius: var(--radius-pill); border: none; background: none;
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fg);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.topbar-btn:hover { background: var(--surface-warm); }
|
||||
.topbar-btn svg { width: 20px; height: 20px; }
|
||||
.topbar-center {
|
||||
font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; color: var(--fg-2);
|
||||
display: flex; align-items: center; gap: var(--space-4);
|
||||
}
|
||||
.topbar-center .date-mood {
|
||||
display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm);
|
||||
color: var(--muted); font-weight: 400;
|
||||
}
|
||||
.topbar-center .date-mood strong { color: var(--fg); font-weight: 600; }
|
||||
.mood-mini {
|
||||
width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border);
|
||||
display: flex; align-items: center; justify-content: center; font-size: 15px;
|
||||
background: var(--surface); cursor: pointer;
|
||||
}
|
||||
.mood-mini.selected { border-color: var(--accent); background: var(--surface-warm); }
|
||||
.topbar-undo-redo { display: flex; align-items: center; gap: 2px; }
|
||||
.undo-btn, .redo-btn {
|
||||
width: 34px; height: 34px; border-radius: var(--radius-pill); border: none; background: none;
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.undo-btn:hover:not(:disabled), .redo-btn:hover:not(:disabled) { background: var(--surface-warm); color: var(--fg); }
|
||||
.undo-btn:disabled, .redo-btn:disabled { opacity: 0.35; cursor: default; }
|
||||
.undo-btn svg, .redo-btn svg { width: 18px; height: 18px; }
|
||||
.autosave-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success); font-weight: 500; }
|
||||
.autosave-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
|
||||
.save-btn {
|
||||
padding: 10px 28px; background: var(--accent); color: var(--accent-on); border: none;
|
||||
border-radius: var(--radius-pill); font-family: var(--font-display); font-size: var(--text-sm);
|
||||
font-weight: 600; cursor: pointer; transition: all var(--motion-fast);
|
||||
}
|
||||
.save-btn:hover { background: var(--accent-hover); }
|
||||
.editor-body { flex: 1; display: flex; overflow: hidden; }
|
||||
.tool-strip {
|
||||
width: 64px; background: var(--surface); border-right: 1px solid var(--border-soft);
|
||||
display: flex; flex-direction: column; align-items: center; padding: var(--space-4) 0;
|
||||
gap: var(--space-2); flex-shrink: 0;
|
||||
}
|
||||
.strip-btn {
|
||||
width: 48px; height: 48px; border-radius: var(--radius-sm); border: none; background: none;
|
||||
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
|
||||
cursor: pointer; color: var(--muted); transition: all var(--motion-fast);
|
||||
}
|
||||
.strip-btn:hover { color: var(--accent); background: var(--surface-warm); }
|
||||
.strip-btn.active { color: var(--accent); background: var(--surface-warm); }
|
||||
.strip-btn svg { width: 22px; height: 22px; }
|
||||
.strip-btn span { font-size: 9px; font-weight: 500; }
|
||||
.strip-divider { width: 32px; height: 1px; background: var(--border-soft); margin: var(--space-2) 0; }
|
||||
.canvas-wrapper { flex: 1; padding: var(--space-6); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
|
||||
.canvas-wrapper::-webkit-scrollbar { width: 4px; }
|
||||
.canvas-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
.canvas-paper {
|
||||
max-width: 720px; margin: 0 auto; background: var(--surface); border-radius: var(--radius-md);
|
||||
box-shadow: var(--elev-medium); border: 1px solid var(--border-soft); padding: var(--space-10);
|
||||
min-height: 700px; position: relative;
|
||||
}
|
||||
.canvas-grid {
|
||||
position: absolute; inset: 0; background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
|
||||
background-size: 28px 28px; opacity: 0.35; pointer-events: none; border-radius: var(--radius-md);
|
||||
}
|
||||
.washi-tape {
|
||||
position: absolute; top: 20px; right: 50px; width: 120px; height: 24px;
|
||||
background: repeating-linear-gradient(45deg, var(--tertiary), var(--tertiary) 4px, var(--surface-warm) 4px, var(--surface-warm) 8px);
|
||||
transform: rotate(-8deg); border-radius: 2px; opacity: 0.8;
|
||||
}
|
||||
.placed-sticker { position: absolute; font-size: 40px; cursor: move; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
|
||||
.journal-content { position: relative; z-index: 1; }
|
||||
.journal-title {
|
||||
font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; color: var(--fg);
|
||||
margin-bottom: var(--space-4); border: none; outline: none; width: 100%; background: transparent;
|
||||
}
|
||||
.format-bar {
|
||||
display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0;
|
||||
margin-bottom: var(--space-5); border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
.format-btn {
|
||||
width: 34px; height: 34px; border-radius: 6px; border: none; background: none;
|
||||
display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted);
|
||||
font-size: var(--text-sm); font-weight: 600; transition: all var(--motion-fast);
|
||||
}
|
||||
.format-btn:hover { background: var(--surface-warm); color: var(--fg); }
|
||||
.format-btn.active { background: var(--accent); color: var(--accent-on); }
|
||||
.format-divider { width: 1px; height: 22px; background: var(--border); }
|
||||
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: all var(--motion-fast); }
|
||||
.color-dot:hover { transform: scale(1.15); }
|
||||
.color-dot.active { border-color: var(--fg); }
|
||||
.journal-body {
|
||||
font-size: var(--text-md); line-height: 2; color: var(--fg-2); border: none; outline: none;
|
||||
width: 100%; background: transparent; resize: none; min-height: 280px;
|
||||
}
|
||||
.placed-photo {
|
||||
width: 100%; height: 180px; border-radius: var(--radius-sm);
|
||||
background: linear-gradient(135deg, var(--secondary-soft), var(--secondary-soft)); margin: var(--space-6) 0;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.tool-panel-side {
|
||||
width: 360px; background: var(--surface); border-left: 1px solid var(--border-soft);
|
||||
overflow-y: auto; scrollbar-width: thin; flex-shrink: 0;
|
||||
}
|
||||
.tool-panel-side::-webkit-scrollbar { width: 4px; }
|
||||
.tool-panel-side::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
.panel-header { padding: var(--space-5); border-bottom: 1px solid var(--border-soft); display: flex; gap: var(--space-2); align-items: center; }
|
||||
.panel-tab {
|
||||
padding: 8px 18px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 500;
|
||||
background: var(--surface-warm); color: var(--fg-2); border: none; cursor: pointer;
|
||||
white-space: nowrap; transition: all var(--motion-fast);
|
||||
}
|
||||
.panel-tab.active { background: var(--accent); color: var(--accent-on); }
|
||||
.panel-content { padding: var(--space-5); }
|
||||
.panel-sub-tabs { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
|
||||
.sub-tab {
|
||||
padding: 5px 14px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500;
|
||||
background: var(--surface-warm); color: var(--fg-2); border: none; cursor: pointer; transition: all var(--motion-fast);
|
||||
}
|
||||
.sub-tab.active { background: var(--accent); color: var(--accent-on); }
|
||||
.sticker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-3); }
|
||||
.sticker-item {
|
||||
aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--surface-warm);
|
||||
display: flex; align-items: center; justify-content: center; font-size: 28px; cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce); border: 1px solid transparent;
|
||||
}
|
||||
.sticker-item:hover { transform: scale(1.1); border-color: var(--accent); }
|
||||
.template-preview { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-4); }
|
||||
.template-thumb {
|
||||
height: 160px; border-radius: var(--radius-sm); border: 2px solid var(--border); background: var(--bg);
|
||||
cursor: pointer; transition: all var(--motion-fast); display: flex; align-items: center;
|
||||
justify-content: center; flex-direction: column; gap: var(--space-2);
|
||||
}
|
||||
.template-thumb:hover { border-color: var(--accent); transform: translateY(-2px); }
|
||||
.template-thumb .icon { font-size: 28px; }
|
||||
.template-thumb .name { font-size: var(--text-xs); color: var(--muted); }
|
||||
|
||||
/* Brush panel */
|
||||
.brush-section-title {
|
||||
font-size: var(--text-xs); font-weight: 600; color: var(--muted);
|
||||
text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-3);
|
||||
}
|
||||
.brush-tools-row { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); }
|
||||
.brush-tool-btn {
|
||||
display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
|
||||
border-radius: var(--radius-sm); border: 2px solid transparent; background: var(--surface-warm);
|
||||
cursor: pointer; color: var(--muted); transition: all var(--motion-fast);
|
||||
}
|
||||
.brush-tool-btn:hover { color: var(--fg); border-color: var(--border); }
|
||||
.brush-tool-btn.active { border-color: var(--accent); color: var(--accent); }
|
||||
.brush-tool-btn svg { width: 22px; height: 22px; }
|
||||
.brush-size-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
|
||||
.brush-size-label { font-size: var(--text-xs); color: var(--muted); font-weight: 500; min-width: 24px; }
|
||||
.brush-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: var(--border); outline: none; }
|
||||
.brush-slider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
|
||||
background: var(--accent); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
|
||||
}
|
||||
.brush-size-input {
|
||||
width: 52px; height: 30px; border: 1px solid var(--border); border-radius: 6px;
|
||||
text-align: center; font-size: var(--text-sm); font-weight: 600; color: var(--fg); background: var(--surface);
|
||||
}
|
||||
.brush-size-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
|
||||
.brush-colors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: var(--space-4); }
|
||||
.brush-color-dot { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; cursor: pointer; transition: all var(--motion-fast); }
|
||||
.brush-color-dot:hover { transform: scale(1.1); }
|
||||
.brush-color-dot.active { border-color: var(--fg); box-shadow: 0 0 0 2px var(--surface); }
|
||||
.brush-color-custom { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); }
|
||||
.brush-color-custom input[type="color"] { width: 36px; height: 30px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; padding: 2px; }
|
||||
.brush-color-custom-label { font-size: var(--text-xs); color: var(--muted); }
|
||||
.brush-opacity-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); transition: opacity var(--motion-fast); }
|
||||
.brush-opacity-row.disabled { opacity: 0.35; pointer-events: none; }
|
||||
.brush-opacity-label { font-size: var(--text-xs); color: var(--muted); font-weight: 500; min-width: 36px; }
|
||||
.brush-opacity-input {
|
||||
width: 52px; height: 30px; border: 1px solid var(--border); border-radius: 6px;
|
||||
text-align: center; font-size: var(--text-sm); font-weight: 600; color: var(--fg); background: var(--surface);
|
||||
}
|
||||
.brush-opacity-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
|
||||
.brush-shortcuts { background: var(--surface-warm); border-radius: var(--radius-sm); padding: var(--space-3); }
|
||||
.brush-shortcut-item { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
|
||||
.brush-shortcut-item span { font-size: var(--text-xs); color: var(--muted); }
|
||||
.brush-shortcut-key {
|
||||
display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px;
|
||||
padding: 0 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
|
||||
font-size: 11px; font-weight: 600; color: var(--fg-2); font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
/* Tags panel */
|
||||
.tags-section { margin-bottom: var(--space-5); }
|
||||
.tag-selected-area {
|
||||
display: flex; flex-wrap: wrap; gap: var(--space-2); min-height: 36px;
|
||||
}
|
||||
.tag-pill {
|
||||
display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
|
||||
border-radius: 9999px; background: var(--surface-warm); color: var(--accent);
|
||||
font-size: 13px; font-weight: 500;
|
||||
}
|
||||
.tag-pill .remove {
|
||||
width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
|
||||
color: var(--surface); display: flex; align-items: center; justify-content: center;
|
||||
font-size: 10px; cursor: pointer; border: none; line-height: 1;
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.tag-pill .remove:hover { background: var(--accent-hover); }
|
||||
.tag-input-row { display: flex; }
|
||||
.tag-input {
|
||||
flex: 1; height: 36px; border: 1.5px solid var(--border); border-radius: var(--radius-pill);
|
||||
padding: 0 var(--space-4); font-size: var(--text-sm); color: var(--fg);
|
||||
background: var(--bg); outline: none; transition: border-color var(--motion-fast);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.tag-input::placeholder { color: var(--meta); }
|
||||
.tag-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--shadow-input-focus); }
|
||||
.tag-suggest-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.tag-suggest-item {
|
||||
display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 9999px;
|
||||
background: var(--surface-warm); color: var(--fg-2); font-size: var(--text-sm);
|
||||
font-weight: 500; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.tag-suggest-item:hover { border-color: var(--accent); color: var(--accent); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="editor-layout">
|
||||
<nav class="sidebar">
|
||||
<div class="sidebar-brand"><div class="sidebar-logo">📖</div><div><div class="sidebar-brand-text">暖记</div><div class="sidebar-brand-sub">Warm Notes</div></div></div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>首页</button>
|
||||
<button class="sidebar-nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>日历</button>
|
||||
<button class="sidebar-nav-item"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>心情追踪</button>
|
||||
</div>
|
||||
<div class="sidebar-footer"><div class="sidebar-avatar">🐱</div><div><div class="sidebar-user-name">小暖</div><div class="sidebar-user-streak">连续记录 12 天</div></div></div>
|
||||
</nav>
|
||||
|
||||
<div class="editor-main">
|
||||
<div class="editor-topbar">
|
||||
<div class="topbar-left"><button class="topbar-btn"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M15 18l-6-6 6-6"/></svg></button></div>
|
||||
<div class="topbar-center"><span>5月31日 · 周日</span><div class="date-mood"><strong>14:32</strong><span>· 晴 26°</span><div class="mood-mini" style="display:inline-flex">😊</div><div class="mood-mini selected" style="display:inline-flex">🥰</div></div></div>
|
||||
<div class="topbar-right">
|
||||
<div class="topbar-undo-redo">
|
||||
<button class="undo-btn" disabled aria-label="撤销"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10h10a5 5 0 015 5v2"/><polyline points="3 10 7 6"/><polyline points="3 10 7 14"/></svg></button>
|
||||
<button class="redo-btn" disabled aria-label="重做"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10H11a5 5 0 00-5 5v2"/><polyline points="21 10 17 6"/><polyline points="21 10 17 14"/></svg></button>
|
||||
</div>
|
||||
<div class="autosave-status" aria-live="polite"><span class="autosave-dot"></span><span>已保存</span></div>
|
||||
<button class="topbar-btn"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 12v6h14v-6"/><polyline points="14 6 10 2 6 6"/><line x1="10" y1="2" x2="10" y2="13"/></svg></button>
|
||||
<button class="topbar-btn"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="10" cy="10" r="3"/><path d="M10 1v2M10 17v2M3.2 3.2l1.4 1.4M15.4 15.4l1.4 1.4M1 10h2M17 10h2M3.2 16.8l1.4-1.4M15.4 4.6l1.4-1.4"/></svg></button>
|
||||
<button class="save-btn">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-body">
|
||||
<div class="tool-strip">
|
||||
<button class="strip-btn active" onclick="switchRightPanel('stickers',this)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg><span>贴纸</span></button>
|
||||
<button class="strip-btn" onclick="switchRightPanel('brush',this)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/></svg><span>画笔</span></button>
|
||||
<button class="strip-btn" onclick="switchRightPanel('templates',this)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg><span>模板</span></button>
|
||||
<button class="strip-btn" onclick="switchRightPanel('tags',this)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/></svg><span>标签</span></button>
|
||||
<div class="strip-divider"></div>
|
||||
<button class="strip-btn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg><span>照片</span></button>
|
||||
<button class="strip-btn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 7V4h16v3"/><path d="M9 20h6"/><path d="M12 4v16"/></svg><span>文字</span></button>
|
||||
<div class="strip-divider"></div>
|
||||
<button class="strip-btn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 21V9"/></svg><span>背景</span></button>
|
||||
</div>
|
||||
|
||||
<div class="canvas-wrapper">
|
||||
<div class="canvas-paper">
|
||||
<div class="canvas-grid"></div>
|
||||
<div class="washi-tape"></div>
|
||||
<div class="placed-sticker" style="top:12px;left:12px">🌸</div>
|
||||
<div class="placed-sticker" style="top:200px;right:20px">✨</div>
|
||||
<div class="journal-content">
|
||||
<input class="journal-title" type="text" value="图书馆的午后时光" placeholder="给日记起个标题...">
|
||||
<div class="format-bar">
|
||||
<button class="format-btn active" style="font-weight:800">B</button>
|
||||
<button class="format-btn" style="font-style:italic">I</button>
|
||||
<button class="format-btn" style="text-decoration:underline">U</button>
|
||||
<button class="format-btn">S</button>
|
||||
<div class="format-divider"></div>
|
||||
<div class="color-dot active" style="background:#2D2420"></div>
|
||||
<div class="color-dot" style="background:var(--accent)"></div>
|
||||
<div class="color-dot" style="background:var(--secondary)"></div>
|
||||
<div class="color-dot" style="background:#5B7DB1"></div>
|
||||
<div class="color-dot" style="background:var(--rose)"></div>
|
||||
<div class="format-divider"></div>
|
||||
<button class="format-btn"><svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><rect x="1" y="3" width="14" height="2" rx="1"/><rect x="1" y="7" width="10" height="2" rx="1"/><rect x="1" y="11" width="6" height="2" rx="1"/></svg></button>
|
||||
</div>
|
||||
<textarea class="journal-body" rows="12">今天下午去图书馆自习,找了一个靠窗的位置。阳光从窗外洒进来,落在摊开的高数课本上,暖暖的。
|
||||
|
||||
不知不觉就学了三个小时,中间喝了一杯抹茶拿铁☕。虽然期末压力大,但看到窗外的樱花还在开,觉得一切都会好的。
|
||||
|
||||
晚上回宿舍路上,买了喜欢的草莓蛋糕犒劳自己 🍰
|
||||
|
||||
回到宿舍打开台灯,在日记本上贴了一张今天在校园里捡到的银杏叶,黄黄的好好看。希望能一直保持这种小确幸的感觉。</textarea>
|
||||
<div class="placed-photo"><div style="text-align:center;color:var(--secondary)"><svg width="40" height="40" viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="1.5" style="margin-bottom:4px"><rect x="4" y="6" width="24" height="20" rx="3"/><circle cx="12" cy="14" r="3"/><path d="M4 22l6-6 4 4 6-8 8 10"/></svg><div style="font-size:14px">图书馆窗边的阳光 ☀</div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tool-panel-side">
|
||||
<div id="panelStickers">
|
||||
<div class="panel-header"><button class="panel-tab active">贴纸</button><button class="panel-tab">模板</button><button class="panel-tab">背景</button></div>
|
||||
<div class="panel-content">
|
||||
<div class="panel-sub-tabs"><button class="sub-tab">热门</button><button class="sub-tab active">可爱</button><button class="sub-tab">植物</button><button class="sub-tab">天气</button><button class="sub-tab">节日</button><button class="sub-tab">校园</button><button class="sub-tab">手绘</button></div>
|
||||
<div class="sticker-grid">
|
||||
<div class="sticker-item">🌸</div><div class="sticker-item">⭐</div><div class="sticker-item">🌿</div><div class="sticker-item">☀️</div><div class="sticker-item">🌙</div><div class="sticker-item">🍰</div><div class="sticker-item">📚</div><div class="sticker-item">🎵</div><div class="sticker-item">💡</div><div class="sticker-item">🎀</div><div class="sticker-item">🍂</div><div class="sticker-item">☕</div><div class="sticker-item">🌈</div><div class="sticker-item">✏️</div><div class="sticker-item">🦋</div><div class="sticker-item">🐱</div><div class="sticker-item">🎈</div><div class="sticker-item">🌻</div><div class="sticker-item">🎨</div><div class="sticker-item">🍀</div><div class="sticker-item">🎊</div><div class="sticker-item">💧</div><div class="sticker-item">🌙</div><div class="sticker-item">💌</div><div class="sticker-item">🐱</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panelBrush" style="display:none">
|
||||
<div class="panel-header"><span style="font-family:var(--font-display);font-size:var(--text-base);font-weight:600;color:var(--fg)">画笔</span></div>
|
||||
<div class="panel-content">
|
||||
<div class="brush-section-title">工具</div>
|
||||
<div class="brush-tools-row">
|
||||
<button class="brush-tool-btn active" data-tool="pen" onclick="selectBrushTool(this,'pen')" title="钢笔"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3l4 4L7 21H3v-4L17 3z"/></svg></button>
|
||||
<button class="brush-tool-btn" data-tool="pencil" onclick="selectBrushTool(this,'pencil')" title="铅笔"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20l1.5-5.5L18 2l4 4L9.5 18.5 4 20z"/><path d="M15 5l4 4"/></svg></button>
|
||||
<button class="brush-tool-btn" data-tool="marker" onclick="selectBrushTool(this,'marker')" title="马克笔"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="3" width="14" height="8" rx="2" transform="rotate(45 13 7)"/><path d="M4 20l3-7"/></svg></button>
|
||||
<button class="brush-tool-btn" data-tool="eraser" onclick="selectBrushTool(this,'eraser')" title="橡皮擦"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20H9L3.5 14.5a2 2 0 010-2.83l9.17-9.17a2 2 0 012.83 0L20 7"/><path d="M6 12l6 6"/></svg></button>
|
||||
</div>
|
||||
<div class="brush-section-title">粗细</div>
|
||||
<div class="brush-size-row">
|
||||
<span class="brush-size-label">px</span>
|
||||
<input type="range" class="brush-slider" id="brushSizeSlider" min="1" max="20" value="2">
|
||||
<input type="number" class="brush-size-input" id="brushSizeInput" value="2" min="1" max="20">
|
||||
</div>
|
||||
<div class="brush-section-title">颜色</div>
|
||||
<div class="brush-colors-grid">
|
||||
<div class="brush-color-dot active" style="background:#2D2420" data-color="#2D2420" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--accent)" data-color="#E07A5F" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--secondary)" data-color="#81B29A" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--tertiary)" data-color="#F2CC8F" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--rose)" data-color="#D4A5A5" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:#5B8FB9" data-color="#5B8FB9" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:#9B72AA" data-color="#9B72AA" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:#C93D3D" data-color="#C93D3D" onclick="selectBrushColor(this)"></div>
|
||||
</div>
|
||||
<div class="brush-color-custom">
|
||||
<input type="color" id="brushCustomColor" value="#2D2420">
|
||||
<span class="brush-color-custom-label">自定义颜色</span>
|
||||
</div>
|
||||
<div class="brush-opacity-row disabled" id="brushOpacityRow">
|
||||
<span class="brush-opacity-label">透明度</span>
|
||||
<input type="range" class="brush-slider" id="brushOpacitySlider" min="0" max="100" value="50">
|
||||
<input type="number" class="brush-opacity-input" id="brushOpacityInput" value="50" min="0" max="100">
|
||||
<span style="font-size:var(--text-xs);color:var(--muted)">%</span>
|
||||
</div>
|
||||
<div class="brush-section-title">快捷键</div>
|
||||
<div class="brush-shortcuts">
|
||||
<div class="brush-shortcut-item"><span>画笔工具</span><span class="brush-shortcut-key">B</span></div>
|
||||
<div class="brush-shortcut-item"><span>橡皮擦</span><span class="brush-shortcut-key">E</span></div>
|
||||
<div class="brush-shortcut-item"><span>减小粗细</span><span class="brush-shortcut-key">[</span></div>
|
||||
<div class="brush-shortcut-item"><span>增大粗细</span><span class="brush-shortcut-key">]</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panelTemplates" style="display:none">
|
||||
<div class="panel-header"><button class="panel-tab active">模板</button></div>
|
||||
<div class="panel-content">
|
||||
<div class="panel-sub-tabs"><button class="sub-tab active">日视图</button><button class="sub-tab">周视图</button><button class="sub-tab">月视图</button></div>
|
||||
<div class="template-preview">
|
||||
<div class="template-thumb"><div class="icon">📝</div><div class="name">简约日记</div></div>
|
||||
<div class="template-thumb"><div class="icon">🌸</div><div class="name">手账风</div></div>
|
||||
<div class="template-thumb"><div class="icon">📊</div><div class="name">数据日记</div></div>
|
||||
<div class="template-thumb"><div class="icon">🎨</div><div class="name">自由画布</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="panelTags" style="display:none">
|
||||
<div class="panel-header"><span style="font-family:var(--font-display);font-size:var(--text-base);font-weight:600;color:var(--fg)">标签</span></div>
|
||||
<div class="panel-content">
|
||||
<div class="tags-section">
|
||||
<div class="brush-section-title">已选标签</div>
|
||||
<div class="tag-selected-area" id="tagSelectedArea">
|
||||
<span class="tag-pill">#图书馆<span class="remove" aria-label="删除标签 图书馆" role="button" onclick="this.parentElement.remove()">×</span></span>
|
||||
<span class="tag-pill">#学习<span class="remove" aria-label="删除标签 学习" role="button" onclick="this.parentElement.remove()">×</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags-section">
|
||||
<div class="brush-section-title">添加标签</div>
|
||||
<div class="tag-input-row">
|
||||
<input class="tag-input" type="text" id="tagInput" placeholder="输入标签后回车添加..." autocomplete="off" aria-label="输入新标签" onkeydown="handleTagInput(event)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags-section">
|
||||
<div class="brush-section-title">推荐标签</div>
|
||||
<div class="tag-suggest-grid">
|
||||
<button class="tag-suggest-item" aria-label="添加标签 日常" onclick="addSuggestedTag(this)">#日常</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 学习" onclick="addSuggestedTag(this)">#学习</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 读书" onclick="addSuggestedTag(this)">#读书</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 运动" onclick="addSuggestedTag(this)">#运动</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 旅行" onclick="addSuggestedTag(this)">#旅行</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 美食" onclick="addSuggestedTag(this)">#美食</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 心情" onclick="addSuggestedTag(this)">#心情</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 灵感" onclick="addSuggestedTag(this)">#灵感</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-statusbar">
|
||||
<div class="traffic-lights"><div class="dot" style="background:#FF5F57"></div><div class="dot" style="background:#FEBC2E"></div><div class="dot" style="background:#28C840"></div></div>
|
||||
<span>暖记 — 手账编辑器</span>
|
||||
<span style="font-variant-numeric:tabular-nums">14:32</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function switchRightPanel(name,stripBtn){var s=document.querySelectorAll('.strip-btn');for(var i=0;i<s.length;i++)s[i].classList.remove('active');stripBtn.classList.add('active');var p=['panelStickers','panelBrush','panelTemplates','panelTags'];var n=['stickers','brush','templates','tags'];for(var i=0;i<p.length;i++){var el=document.getElementById(p[i]);if(el)el.style.display=n[i]===name?'':'none';}}
|
||||
function selectBrushTool(btn,tool){var b=document.querySelectorAll('.brush-tool-btn');for(var i=0;i<b.length;i++)b[i].classList.remove('active');btn.classList.add('active');var d={pen:2,pencil:3,marker:8,eraser:10};var v=d[tool]||2;document.getElementById('brushSizeSlider').value=v;document.getElementById('brushSizeInput').value=v;var o=document.getElementById('brushOpacityRow');if(tool==='marker'){o.classList.remove('disabled');}else{o.classList.add('disabled');}}
|
||||
function selectBrushColor(dot){var d=document.querySelectorAll('.brush-color-dot');for(var i=0;i<d.length;i++)d[i].classList.remove('active');dot.classList.add('active');document.getElementById('brushCustomColor').value=dot.getAttribute('data-color');}
|
||||
document.getElementById('brushSizeSlider').addEventListener('input',function(){document.getElementById('brushSizeInput').value=this.value;});
|
||||
document.getElementById('brushSizeInput').addEventListener('input',function(){var v=Math.min(20,Math.max(1,parseInt(this.value)||1));document.getElementById('brushSizeSlider').value=v;});
|
||||
document.getElementById('brushOpacitySlider').addEventListener('input',function(){document.getElementById('brushOpacityInput').value=this.value;});
|
||||
document.getElementById('brushOpacityInput').addEventListener('input',function(){var v=Math.min(100,Math.max(0,parseInt(this.value)||0));document.getElementById('brushOpacitySlider').value=v;});
|
||||
document.getElementById('brushCustomColor').addEventListener('input',function(){var d=document.querySelectorAll('.brush-color-dot');for(var i=0;i<d.length;i++)d[i].classList.remove('active');});
|
||||
|
||||
function handleTagInput(e){if(e.key==='Enter'){var input=e.target;var text=input.value.trim();if(text){if(!text.startsWith('#'))text='#'+text;var area=document.getElementById('tagSelectedArea');var pill=document.createElement('span');pill.className='tag-pill';pill.innerHTML=text+'<span class="remove" aria-label="删除标签 '+text.slice(1)+'" role="button" onclick="this.parentElement.remove()">×</span>';area.appendChild(pill);input.value='';}}}
|
||||
function addSuggestedTag(btn){var text=btn.textContent.trim();var area=document.getElementById('tagSelectedArea');var pill=document.createElement('span');pill.className='tag-pill';pill.innerHTML=text+'<span class="remove" aria-label="删除标签 '+text.slice(1)+'" role="button" onclick="this.parentElement.remove()">×</span>';area.appendChild(pill);btn.style.display='none';}
|
||||
</script>
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
595
docs/opendesign/screens/desktop/home-daily.html
Normal file
595
docs/opendesign/screens/desktop/home-daily.html
Normal file
@@ -0,0 +1,595 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1440, height=900, initial-scale=1">
|
||||
<title>暖记 — 桌面端首页</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.main-content { height: 900px; padding-top: 32px; }
|
||||
|
||||
.content-inner {
|
||||
padding: var(--space-6) var(--space-10);
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* Greeting row */
|
||||
.greeting-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.greeting-date {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.greeting-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-4xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.greeting-text span { color: var(--accent); }
|
||||
|
||||
.streak-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 16px;
|
||||
background: var(--tertiary-soft);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: #B8860B;
|
||||
}
|
||||
|
||||
/* Three column layout */
|
||||
.home-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 380px;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
/* Left column: mood + today + entries */
|
||||
.left-col {}
|
||||
|
||||
.mood-section {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.mood-header span {
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.mood-header .weather {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.mood-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
max-width: 500px;
|
||||
}
|
||||
.mood-opt {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.mood-opt:hover { background: var(--surface-warm); }
|
||||
.mood-opt.selected { background: var(--surface-warm); }
|
||||
.mood-opt .face { font-size: 32px; }
|
||||
.mood-opt .label { font-size: var(--text-xs); color: var(--muted); }
|
||||
.mood-opt.selected .label { color: var(--accent); font-weight: 600; }
|
||||
|
||||
.today-card {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-6);
|
||||
margin-bottom: var(--space-5);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.today-card:hover { transform: translateY(-2px); transition: transform var(--motion-fast) var(--ease-bounce); }
|
||||
.today-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
right: -30px;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.today-card .label {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent-on);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
opacity: 0.85;
|
||||
}
|
||||
.today-card .title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--accent-on);
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.today-card .prompt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent-on);
|
||||
opacity: 0.7;
|
||||
}
|
||||
.today-card .write-btn {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 14px rgba(0,0,0,0.1);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.today-card .write-btn:hover { transform: scale(1.1); }
|
||||
.today-card .write-btn svg { width: 24px; height: 24px; color: var(--accent); }
|
||||
|
||||
/* Entries grid — 3 columns */
|
||||
.recent-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.recent-header h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.recent-header a {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.entries-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
.entry-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.entry-card:hover { transform: translateY(-2px); }
|
||||
.entry-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.entry-date { font-size: var(--text-xs); color: var(--muted); }
|
||||
.entry-mood { font-size: 18px; }
|
||||
.entry-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.entry-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.entry-preview-thumb {
|
||||
width: 100%;
|
||||
height: 72px;
|
||||
border-radius: var(--radius-sm);
|
||||
margin-top: var(--space-3);
|
||||
background: var(--surface-warm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
/* Right column: stats + mood chart */
|
||||
.right-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
.stat-cards {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.stat-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.stat-card .num {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.stat-card .num.accent { color: var(--accent); }
|
||||
.stat-card .num.green { color: var(--secondary); }
|
||||
.stat-card .label {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Mood chart */
|
||||
.mood-chart-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-chart-card h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.chart-period {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.period-btn {
|
||||
padding: 6px 16px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
cursor: pointer;
|
||||
}
|
||||
.period-btn.active { background: var(--accent); color: var(--accent-on); }
|
||||
.mood-line-chart {
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 4px;
|
||||
padding-bottom: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.mood-line-chart::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
background: var(--border-soft);
|
||||
}
|
||||
.chart-bar {
|
||||
flex: 1;
|
||||
border-radius: 6px 6px 0 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
transition: height var(--motion-base) var(--ease-bounce);
|
||||
}
|
||||
.chart-bar:hover { opacity: 0.8; }
|
||||
.chart-date {
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 10px;
|
||||
color: var(--meta);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Insight mini card */
|
||||
.insight-mini {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.insight-mini h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.insight-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-2) 0;
|
||||
}
|
||||
.insight-row .icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
.insight-row .text {
|
||||
flex: 1;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.insight-row .badge {
|
||||
padding: 4px 10px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
background: var(--secondary-soft);
|
||||
color: #2D7D46;
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.5s var(--ease-standard) both; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Status bar -->
|
||||
<div class="desktop-statusbar">
|
||||
<div class="traffic-lights">
|
||||
<div class="dot" style="background:#FF5F57"></div>
|
||||
<div class="dot" style="background:#FEBC2E"></div>
|
||||
<div class="dot" style="background:#28C840"></div>
|
||||
</div>
|
||||
<span>暖记 Warm Notes</span>
|
||||
<span style="font-variant-numeric:tabular-nums">14:32</span>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" role="navigation" aria-label="主导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item active" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="心情追踪">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="贴纸库">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg>
|
||||
贴纸库
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="模板">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
模板
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="发现">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
发现
|
||||
</button>
|
||||
</div>
|
||||
<button class="sidebar-write-btn" aria-label="写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
|
||||
写日记
|
||||
</button>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content" role="main">
|
||||
<!-- Top bar -->
|
||||
<div class="desktop-topbar">
|
||||
<div class="desktop-topbar-title">首页</div>
|
||||
<div class="desktop-topbar-actions">
|
||||
<button class="topbar-action-btn" aria-label="搜索">
|
||||
<svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="8" cy="8" r="6"/><line x1="12.5" y1="12.5" x2="16" y2="16"/></svg>
|
||||
</button>
|
||||
<button class="topbar-action-btn" aria-label="菜单">
|
||||
<svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M4 6h10M4 9h10M4 12h7"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-inner">
|
||||
<!-- Greeting -->
|
||||
<div class="greeting-row anim-fade">
|
||||
<div>
|
||||
<div class="greeting-date">2026年5月31日 · 星期日</div>
|
||||
<div class="greeting-text">下午好,<span>小暖</span></div>
|
||||
</div>
|
||||
<div class="streak-badge">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="#B8860B"><path d="M8 1l2 5h5l-4 3 1.5 5L8 11 3.5 14 5 9 1 6h5z"/></svg>
|
||||
连续记录 12 天
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Two-column grid -->
|
||||
<div class="home-grid anim-fade" style="animation-delay:0.1s">
|
||||
<div class="left-col">
|
||||
<!-- Mood -->
|
||||
<div class="mood-section">
|
||||
<div class="mood-header">
|
||||
<span>今天心情如何?</span>
|
||||
<div class="weather">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="var(--tertiary)"><circle cx="8" cy="8" r="5"/></svg>
|
||||
晴 26°
|
||||
</div>
|
||||
</div>
|
||||
<div class="mood-options">
|
||||
<button class="mood-opt" aria-label="开心"><span class="face">😊</span><span class="label">开心</span></button>
|
||||
<button class="mood-opt" aria-label="平静"><span class="face">😌</span><span class="label">平静</span></button>
|
||||
<button class="mood-opt selected" aria-label="幸福"><span class="face">🥰</span><span class="label">幸福</span></button>
|
||||
<button class="mood-opt" aria-label="疲惫"><span class="face">😴</span><span class="label">疲惫</span></button>
|
||||
<button class="mood-opt" aria-label="低落"><span class="face">😔</span><span class="label">低落</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Today card -->
|
||||
<div class="today-card">
|
||||
<div>
|
||||
<div class="label">今天的日记</div>
|
||||
<div class="title">写点什么吧...</div>
|
||||
<div class="prompt">记录一个温暖的瞬间,或者今天发生的小事</div>
|
||||
</div>
|
||||
<button class="write-btn" aria-label="开始写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none"><path d="M11 5v12M5 11h12" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Recent entries -->
|
||||
<div class="recent-header">
|
||||
<h3>最近记录</h3>
|
||||
<a href="#">查看全部</a>
|
||||
</div>
|
||||
<div class="entries-grid">
|
||||
<div class="entry-card">
|
||||
<div class="entry-top"><div class="entry-date">5月30日 · 周六</div><div class="entry-mood">😊</div></div>
|
||||
<div class="entry-title">图书馆的午后</div>
|
||||
<div class="entry-excerpt">今天在图书馆自习,窗外的阳光洒进来,暖暖的。复习了高数第三章...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--surface-warm)">🌸</div>
|
||||
</div>
|
||||
<div class="entry-card">
|
||||
<div class="entry-top"><div class="entry-date">5月29日 · 周五</div><div class="entry-mood">🥰</div></div>
|
||||
<div class="entry-title">和舍友的火锅局</div>
|
||||
<div class="entry-excerpt">考完试和舍友们去吃了火锅庆祝,大家都好开心...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--secondary-soft)">🍃</div>
|
||||
</div>
|
||||
<div class="entry-card">
|
||||
<div class="entry-top"><div class="entry-date">5月28日 · 周四</div><div class="entry-mood">😌</div></div>
|
||||
<div class="entry-title">期末考试第一天</div>
|
||||
<div class="entry-excerpt">终于考完了英语,感觉发挥还可以。明天继续加油!</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--tertiary-soft)">📝</div>
|
||||
</div>
|
||||
<div class="entry-card">
|
||||
<div class="entry-top"><div class="entry-date">5月27日 · 周三</div><div class="entry-mood">😌</div></div>
|
||||
<div class="entry-title">夜跑打卡</div>
|
||||
<div class="entry-excerpt">晚上去操场跑了三圈,吹着晚风特别舒服...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--rose-soft)">🌙</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="right-col">
|
||||
<div class="stat-cards">
|
||||
<div class="stat-card"><div class="num accent">28</div><div class="label">本月日记</div></div>
|
||||
<div class="stat-card"><div class="num green">12</div><div class="label">连续天数</div></div>
|
||||
<div class="stat-card"><div class="num">156</div><div class="label">总日记数</div></div>
|
||||
<div class="stat-card"><div class="num" style="color:var(--rose)">72%</div><div class="label">好心情占比</div></div>
|
||||
</div>
|
||||
|
||||
<div class="mood-chart-card">
|
||||
<h4>心情趋势</h4>
|
||||
<div class="chart-period">
|
||||
<button class="period-btn active">近7天</button>
|
||||
<button class="period-btn">近30天</button>
|
||||
<button class="period-btn">近3月</button>
|
||||
</div>
|
||||
<div class="mood-line-chart">
|
||||
<div class="chart-bar" style="height:70%;background:var(--secondary)"><span class="chart-date">25日</span></div>
|
||||
<div class="chart-bar" style="height:50%;background:var(--tertiary)"><span class="chart-date">26日</span></div>
|
||||
<div class="chart-bar" style="height:85%;background:var(--accent)"><span class="chart-date">27日</span></div>
|
||||
<div class="chart-bar" style="height:75%;background:var(--secondary)"><span class="chart-date">28日</span></div>
|
||||
<div class="chart-bar" style="height:90%;background:var(--accent)"><span class="chart-date">29日</span></div>
|
||||
<div class="chart-bar" style="height:65%;background:var(--secondary)"><span class="chart-date">30日</span></div>
|
||||
<div class="chart-bar" style="height:88%;background:var(--accent)"><span class="chart-date">31日</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insight-mini">
|
||||
<h4>心情洞察</h4>
|
||||
<div class="insight-row">
|
||||
<span class="icon">🌟</span>
|
||||
<span class="text">最佳心情日:5月14日</span>
|
||||
<span class="badge">开心</span>
|
||||
</div>
|
||||
<div class="insight-row">
|
||||
<span class="icon">💡</span>
|
||||
<span class="text">好心情常与「朋友」「美食」相关</span>
|
||||
</div>
|
||||
<div class="insight-row">
|
||||
<span class="icon">📈</span>
|
||||
<span class="text">心情较上月提升</span>
|
||||
<span class="badge">+15%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
725
docs/opendesign/screens/desktop/login.html
Normal file
725
docs/opendesign/screens/desktop/login.html
Normal file
@@ -0,0 +1,725 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1440, height=900, initial-scale=1">
|
||||
<title>暖记 — 桌面端登录/注册</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Focus styles */
|
||||
button:focus-visible, a:focus-visible, input:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Split layout: 60% brand | 40% form */
|
||||
.brand-side {
|
||||
width: 60%;
|
||||
height: 900px;
|
||||
background: linear-gradient(160deg, var(--tertiary-soft) 0%, var(--rose-soft) 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.form-side {
|
||||
width: 40%;
|
||||
height: 900px;
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* macOS status bar */
|
||||
.statusbar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 32px;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-6);
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
z-index: 60;
|
||||
}
|
||||
.statusbar .traffic-lights {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
.statusbar .dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Brand side content */
|
||||
.brand-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
/* CSS-drawn notebook logo */
|
||||
.logo-wrap {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: relative;
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.logo-notebook {
|
||||
width: 76px;
|
||||
height: 86px;
|
||||
border: 3px solid var(--accent);
|
||||
border-radius: 8px 12px 12px 8px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(224, 122, 95, 0.06);
|
||||
}
|
||||
.logo-spine {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 3px;
|
||||
height: 86px;
|
||||
background: var(--accent);
|
||||
border-radius: 2px;
|
||||
}
|
||||
.logo-heart {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -45%);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
.logo-heart::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: var(--accent);
|
||||
clip-path: path('M11 19C11 19 2 13 2 8C2 4.5 4.5 2 7.5 2C9.3 2 10.7 2.8 11 3.8C11.3 2.8 12.7 2 14.5 2C17.5 2 20 4.5 20 8C20 13 11 19 11 19Z');
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.brand-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-4xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.brand-tagline {
|
||||
font-family: var(--font-handwritten);
|
||||
font-size: var(--text-xl);
|
||||
color: var(--accent);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Feature cards */
|
||||
.feature-cards {
|
||||
display: flex;
|
||||
gap: var(--space-5);
|
||||
margin-top: var(--space-12);
|
||||
z-index: 5;
|
||||
}
|
||||
.feature-card {
|
||||
width: 180px;
|
||||
padding: var(--space-5);
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
text-align: center;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.feature-card:hover {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
.feature-icon {
|
||||
font-size: 32px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.feature-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.feature-desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Floating decorations on brand side */
|
||||
.deco {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
opacity: 0.15;
|
||||
}
|
||||
.deco-circle1 {
|
||||
width: 200px; height: 200px; border-radius: 50%;
|
||||
background: var(--accent);
|
||||
top: -60px; left: -40px;
|
||||
opacity: 0.08;
|
||||
}
|
||||
.deco-circle2 {
|
||||
width: 120px; height: 120px; border-radius: 50%;
|
||||
background: var(--secondary);
|
||||
bottom: 80px; right: 40px;
|
||||
opacity: 0.1;
|
||||
}
|
||||
.deco-circle3 {
|
||||
width: 60px; height: 60px; border-radius: 50%;
|
||||
background: var(--tertiary);
|
||||
top: 140px; right: 120px;
|
||||
opacity: 0.12;
|
||||
}
|
||||
.deco-dot1 {
|
||||
width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
|
||||
top: 200px; left: 80px; opacity: 0.2;
|
||||
}
|
||||
.deco-dot2 {
|
||||
width: 8px; height: 8px; border-radius: 50%; background: var(--secondary);
|
||||
bottom: 200px; left: 160px; opacity: 0.2;
|
||||
}
|
||||
.deco-wave1 {
|
||||
top: 100px; right: 80px;
|
||||
}
|
||||
.deco-wave1 svg { width: 40px; height: 16px; }
|
||||
.deco-wave2 {
|
||||
bottom: 160px; left: 120px;
|
||||
}
|
||||
.deco-wave2 svg { width: 30px; height: 12px; }
|
||||
|
||||
/* Form side content */
|
||||
.form-content {
|
||||
width: 360px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 32px;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-8);
|
||||
}
|
||||
|
||||
/* Input group */
|
||||
.input-group {
|
||||
position: relative;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.input-group .input-icon {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.input-group input {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 16px 0 46px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-base);
|
||||
color: var(--fg);
|
||||
background: var(--surface);
|
||||
transition: border-color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.input-group input::placeholder {
|
||||
color: var(--meta);
|
||||
}
|
||||
.input-group input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--shadow-input-focus);
|
||||
}
|
||||
|
||||
/* Verification code */
|
||||
.input-group.has-action input {
|
||||
padding-right: 120px;
|
||||
}
|
||||
.input-group .input-action {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
padding: 8px 14px;
|
||||
background: none;
|
||||
border: none;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
min-height: 38px;
|
||||
border-radius: var(--radius-pill);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.input-group .input-action:hover {
|
||||
background: var(--surface-warm);
|
||||
}
|
||||
|
||||
/* Password toggle */
|
||||
.input-group.has-toggle input {
|
||||
padding-right: 50px;
|
||||
}
|
||||
.input-group .toggle-password {
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
min-height: 36px;
|
||||
min-width: 36px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.input-group .toggle-password:hover { color: var(--fg); }
|
||||
.input-group .toggle-password svg { width: 20px; height: 20px; }
|
||||
|
||||
/* Agreement */
|
||||
.agreement {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-4);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
line-height: 1.4;
|
||||
}
|
||||
.agreement input[type="checkbox"] {
|
||||
width: 18px; height: 18px;
|
||||
accent-color: var(--accent);
|
||||
margin-top: 2px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.agreement a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
.agreement a:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Submit button */
|
||||
.btn-login {
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--accent);
|
||||
color: var(--bg);
|
||||
font-family: var(--font-display);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.btn-login:hover {
|
||||
background: var(--accent-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 16px var(--shadow-accent-hover);
|
||||
}
|
||||
.btn-login:active {
|
||||
background: var(--accent-active);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* Divider */
|
||||
.divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
margin-bottom: var(--space-5);
|
||||
color: var(--meta);
|
||||
font-size: var(--text-sm);
|
||||
}
|
||||
.divider::before,
|
||||
.divider::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
/* Social buttons */
|
||||
.social-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--space-5);
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.social-btn {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
background: var(--surface);
|
||||
}
|
||||
.social-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.social-btn:active { transform: scale(0.95); }
|
||||
.social-btn svg { width: 28px; height: 28px; }
|
||||
.social-btn.wechat { background: #07C160; border-color: #07C160; }
|
||||
.social-btn.wechat:hover { background: #06AD56; border-color: #06AD56; }
|
||||
.social-btn.apple { background: #1D1D1F; border-color: #1D1D1F; }
|
||||
.social-btn.apple:hover { background: #333; border-color: #333; }
|
||||
.social-btn.google { background: var(--surface); }
|
||||
|
||||
/* Bottom link */
|
||||
.bottom-link {
|
||||
text-align: center;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
.bottom-link a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
}
|
||||
.bottom-link a:hover { text-decoration: underline; }
|
||||
|
||||
/* State toggling */
|
||||
.register-fields { display: none; }
|
||||
.is-register .register-fields { display: block; }
|
||||
.is-register .login-only { display: none; }
|
||||
|
||||
/* Reduced motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@keyframes float {
|
||||
0%, 100% { transform: translateY(0); }
|
||||
50% { transform: translateY(-8px); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.5s var(--ease-standard) both; }
|
||||
.anim-float { animation: float 6s ease-in-out infinite; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Left: Brand side (60%) -->
|
||||
<div class="brand-side">
|
||||
<!-- Decorative elements -->
|
||||
<div class="deco deco-circle1 anim-float" aria-hidden="true" style="animation-delay: 0s"></div>
|
||||
<div class="deco deco-circle2 anim-float" aria-hidden="true" style="animation-delay: 2s"></div>
|
||||
<div class="deco deco-circle3 anim-float" aria-hidden="true" style="animation-delay: 1s"></div>
|
||||
<div class="deco deco-dot1" aria-hidden="true"></div>
|
||||
<div class="deco deco-dot2" aria-hidden="true"></div>
|
||||
<div class="deco deco-wave1" aria-hidden="true">
|
||||
<svg viewBox="0 0 40 16" fill="none" stroke="var(--accent)" stroke-width="2" stroke-linecap="round">
|
||||
<path d="M2 10 Q10 2, 20 10 Q30 18, 38 10"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="deco deco-wave2" aria-hidden="true">
|
||||
<svg viewBox="0 0 30 12" fill="none" stroke="var(--secondary)" stroke-width="2" stroke-linecap="round">
|
||||
<path d="M2 8 Q8 2, 15 8 Q22 14, 28 8"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- Brand content -->
|
||||
<div class="brand-content">
|
||||
<div class="logo-wrap anim-fade" aria-hidden="true">
|
||||
<div class="logo-notebook"></div>
|
||||
<div class="logo-spine"></div>
|
||||
<div class="logo-heart"></div>
|
||||
</div>
|
||||
<div class="brand-title anim-fade" style="animation-delay:0.1s">暖记</div>
|
||||
<div class="brand-tagline anim-fade" style="animation-delay:0.15s">用温暖记录每一天</div>
|
||||
|
||||
<!-- Feature cards -->
|
||||
<div class="feature-cards anim-fade" style="animation-delay:0.25s">
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon" aria-hidden="true">📝</div>
|
||||
<div class="feature-title">记录每一天</div>
|
||||
<div class="feature-desc">用文字、贴纸和照片记录生活中的温暖瞬间</div>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon" aria-hidden="true">🎨</div>
|
||||
<div class="feature-title">用贴纸装饰</div>
|
||||
<div class="feature-desc">丰富的手绘贴纸让你的日记更加生动有趣</div>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon" aria-hidden="true">💭</div>
|
||||
<div class="feature-title">追踪你的心情</div>
|
||||
<div class="feature-desc">记录并可视化心情变化,更好地了解自己</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right: Form side (40%) -->
|
||||
<div class="form-side">
|
||||
<!-- macOS status bar -->
|
||||
<div class="statusbar" aria-hidden="true">
|
||||
<div class="traffic-lights">
|
||||
<div class="dot" style="background:#FF5F57"></div>
|
||||
<div class="dot" style="background:#FEBC2E"></div>
|
||||
<div class="dot" style="background:#28C840"></div>
|
||||
</div>
|
||||
<span>暖记 Warm Notes</span>
|
||||
<span style="font-variant-numeric:tabular-nums">14:32</span>
|
||||
</div>
|
||||
|
||||
<div class="form-content" id="formArea">
|
||||
<h1 class="form-title anim-fade" style="animation-delay:0.2s" id="formTitle">欢迎回来</h1>
|
||||
|
||||
<form id="loginForm" autocomplete="on" novalidate>
|
||||
<!-- Register: nickname -->
|
||||
<div class="register-fields anim-fade">
|
||||
<div class="input-group">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<circle cx="10" cy="7" r="4"/><path d="M3 18c0-3.3 3.1-6 7-6s7 2.7 7 6"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="text" id="nickname" name="nickname" placeholder="请输入昵称" autocomplete="nickname" aria-label="昵称">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="input-group anim-fade" style="animation-delay:0.25s">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="5" y="2" width="10" height="16" rx="2"/><line x1="8" y1="15" x2="12" y2="15"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="tel" id="phone" name="phone" placeholder="请输入手机号" autocomplete="tel" pattern="[0-9]*" aria-label="手机号">
|
||||
</div>
|
||||
|
||||
<!-- Register: password -->
|
||||
<div class="register-fields anim-fade">
|
||||
<div class="input-group has-toggle">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="3" y="9" width="14" height="9" rx="2"/><path d="M6 9V6a4 4 0 018 0v3"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="password" id="regPassword" name="password" placeholder="请输入密码" autocomplete="new-password" aria-label="密码">
|
||||
<button type="button" class="toggle-password" aria-label="显示密码" onclick="togglePwd('regPassword', this)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Verification code -->
|
||||
<div class="input-group has-action anim-fade" style="animation-delay:0.3s">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="2" y="4" width="16" height="12" rx="2"/><path d="M6 8v4M10 7v6M14 8v4"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="tel" id="code" name="code" placeholder="请输入验证码" autocomplete="one-time-code" pattern="[0-9]*" aria-label="验证码">
|
||||
<button type="button" class="input-action" aria-label="获取验证码" id="getCodeBtn" onclick="sendCode()">获取验证码</button>
|
||||
</div>
|
||||
|
||||
<!-- Register: agreement -->
|
||||
<div class="register-fields anim-fade">
|
||||
<label class="agreement">
|
||||
<input type="checkbox" id="agreement" aria-label="同意用户协议">
|
||||
<span>我已阅读并同意<a href="#" onclick="return false">《用户协议》</a>和<a href="#" onclick="return false">《隐私政策》</a></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit -->
|
||||
<button type="submit" class="btn-login anim-fade" style="animation-delay:0.35s" id="submitBtn" aria-label="登录">登录</button>
|
||||
</form>
|
||||
|
||||
<!-- Divider -->
|
||||
<div class="divider anim-fade" style="animation-delay:0.4s">其他登录方式</div>
|
||||
|
||||
<!-- Social buttons -->
|
||||
<div class="social-row anim-fade" style="animation-delay:0.45s">
|
||||
<button type="button" class="social-btn wechat" aria-label="微信登录">
|
||||
<svg viewBox="0 0 28 28" fill="none">
|
||||
<path d="M19.1 12.5c-.2-3.3-3.2-5.9-6.8-5.9-3.8 0-6.9 2.8-6.9 6.3 0 1.8.9 3.4 2.3 4.5l-.6 1.8 2.1-1.1c.7.2 1.5.3 2.3.3h.4c-.1-.4-.2-.8-.2-1.2.1-2.6 2.7-4.7 5.9-4.7h.2c.1-.1.2-.1.3 0z" fill="#FFF"/>
|
||||
<path d="M11.6 11.5c-.5 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.5 1-1 1zM14.8 10.5c-.5 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.5-1-1-1z" fill="#07C160"/>
|
||||
<path d="M25.5 16.8c0-2.9-2.9-5.3-6.3-5.3s-6.3 2.4-6.3 5.3 2.9 5.3 6.3 5.3c.7 0 1.4-.1 2-.3l1.7.9-.5-1.5c1.3-1 2.1-2.5 2.1-4.1 0 .1 0-.1 0-.3zm-8.6-1c-.4 0-.8-.3-.8-.8s.3-.8.8-.8.8.3.8.8-.4.8-.8.8zm4.6 0c-.4 0-.8-.3-.8-.8s.3-.8.8-.8.8.3.8.8-.4.8-.8.8z" fill="#FFF"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="social-btn apple" aria-label="Apple登录">
|
||||
<svg viewBox="0 0 28 28" fill="#FFF">
|
||||
<path d="M20.2 14.3c0-2 1.2-3.1 1.3-3.2-0.7-1-1.8-1.6-3-1.6-1.3 0-2 .8-2.7.8-.7 0-1.4-.8-2.5-.8-1.7 0-3.5 1.4-3.5 4.1 0 1.6.6 3.3 1.4 4.5.7 1 1.4 1.8 2.3 1.8.9 0 1.3-.7 2.5-.7 1.2 0 1.5.7 2.5.7.9 0 1.6-.8 2.2-1.7.4-.6.7-1.2.9-1.9-2-.8-2.4-3.8-.4-5zm-1.8-3.3c.5-.6.9-1.4.8-2.2-.8 0-1.8.5-2.3 1.2-.5.6-.9 1.4-.8 2.2.8 0 1.7-.5 2.3-1.2z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="social-btn google" aria-label="Google登录">
|
||||
<svg viewBox="0 0 28 28">
|
||||
<path d="M14 11.5v5.2h7.3c-.3 1.7-1.3 3.1-2.7 4.1l4.4 3.4c2.6-2.4 4-5.9 4-10.1 0-1-.1-1.9-.3-2.8H14z" fill="#4285F4"/>
|
||||
<path d="M6.3 16.4c-.4-1-.6-2.2-.6-3.4s.2-2.3.6-3.4L1.9 6.2C.7 8.5 0 11.2 0 14s.7 5.5 1.9 7.8l4.4-3.4z" fill="#FBBC05"/>
|
||||
<path d="M14 28c3.7 0 6.8-1.2 9.1-3.3l-4.4-3.4c-1.2.8-2.8 1.3-4.7 1.3-3.6 0-6.7-2.4-7.8-5.7l-4.4 3.4C4.2 24.7 8.7 28 14 28z" fill="#34A853"/>
|
||||
<path d="M14 5.6c2 0 3.9.7 5.3 2l4-4C20.8 1.2 17.7 0 14 0 8.7 0 4.2 3.3 2.1 8.1l4.4 3.4c1.1-3.3 4.2-5.9 7.5-5.9z" fill="#EA4335"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Bottom link -->
|
||||
<div class="bottom-link anim-fade" style="animation-delay:0.5s">
|
||||
<span class="login-only">还没有账号?</span>
|
||||
<a href="#" id="toggleLink" role="button" aria-label="切换到注册">立即注册</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var isRegister = false;
|
||||
var formArea = document.getElementById('formArea');
|
||||
var formTitle = document.getElementById('formTitle');
|
||||
var submitBtn = document.getElementById('submitBtn');
|
||||
var toggleLink = document.getElementById('toggleLink');
|
||||
var phoneInput = document.getElementById('phone');
|
||||
|
||||
phoneInput.addEventListener('input', function() {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
|
||||
var codeInput = document.getElementById('code');
|
||||
codeInput.addEventListener('input', function() {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
|
||||
toggleLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
isRegister = !isRegister;
|
||||
|
||||
if (isRegister) {
|
||||
formArea.classList.add('is-register');
|
||||
formTitle.textContent = '创建账号';
|
||||
submitBtn.textContent = '注册';
|
||||
submitBtn.setAttribute('aria-label', '注册');
|
||||
toggleLink.textContent = '立即登录';
|
||||
toggleLink.setAttribute('aria-label', '切换到登录');
|
||||
toggleLink.previousElementSibling.textContent = '已有账号?';
|
||||
} else {
|
||||
formArea.classList.remove('is-register');
|
||||
formTitle.textContent = '欢迎回来';
|
||||
submitBtn.textContent = '登录';
|
||||
submitBtn.setAttribute('aria-label', '登录');
|
||||
toggleLink.textContent = '立即注册';
|
||||
toggleLink.setAttribute('aria-label', '切换到注册');
|
||||
toggleLink.previousElementSibling.textContent = '还没有账号?';
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
})();
|
||||
|
||||
function togglePwd(inputId, btn) {
|
||||
var input = document.getElementById(inputId);
|
||||
if (input.type === 'password') {
|
||||
input.type = 'text';
|
||||
btn.setAttribute('aria-label', '隐藏密码');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>';
|
||||
} else {
|
||||
input.type = 'password';
|
||||
btn.setAttribute('aria-label', '显示密码');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>';
|
||||
}
|
||||
}
|
||||
|
||||
function sendCode() {
|
||||
var btn = document.getElementById('getCodeBtn');
|
||||
var seconds = 60;
|
||||
btn.disabled = true;
|
||||
btn.style.opacity = '0.6';
|
||||
btn.textContent = seconds + 's';
|
||||
var timer = setInterval(function() {
|
||||
seconds--;
|
||||
if (seconds <= 0) {
|
||||
clearInterval(timer);
|
||||
btn.disabled = false;
|
||||
btn.style.opacity = '1';
|
||||
btn.textContent = '获取验证码';
|
||||
} else {
|
||||
btn.textContent = seconds + 's';
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
535
docs/opendesign/screens/desktop/search.html
Normal file
535
docs/opendesign/screens/desktop/search.html
Normal file
@@ -0,0 +1,535 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1440, height=900, initial-scale=1">
|
||||
<title>暖记 — 桌面端搜索</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1440px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.search-layout {
|
||||
display: flex;
|
||||
height: 900px;
|
||||
padding-top: 32px;
|
||||
}
|
||||
|
||||
.search-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Top bar */
|
||||
.search-bar {
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
padding: 0 var(--space-8);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.search-back-btn {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.search-back-btn:hover { background: var(--surface-warm); }
|
||||
.search-back-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
.search-input-wrap {
|
||||
flex: 1;
|
||||
max-width: 680px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-input-wrap svg {
|
||||
position: absolute;
|
||||
left: var(--space-4);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
.search-input {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface-warm);
|
||||
padding: 0 var(--space-4) 0 44px;
|
||||
font-size: var(--text-base);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.search-input::placeholder { color: var(--meta); }
|
||||
|
||||
.search-cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--accent);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
min-height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-cancel-btn:hover { opacity: 0.7; }
|
||||
|
||||
/* Content area */
|
||||
.search-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-8) var(--space-10);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
max-width: 1120px;
|
||||
width: 100%;
|
||||
}
|
||||
.search-content::-webkit-scrollbar { width: 6px; }
|
||||
.search-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
||||
|
||||
.search-section { margin-bottom: var(--space-8); }
|
||||
.search-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.search-section-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.search-section-action {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
min-height: 36px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.search-tag {
|
||||
padding: 8px 18px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
min-height: 36px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.search-tag:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Result tabs */
|
||||
.result-tabs {
|
||||
display: flex;
|
||||
gap: var(--space-1);
|
||||
margin-bottom: var(--space-6);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.result-tab {
|
||||
padding: var(--space-3) var(--space-5);
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
min-height: 36px;
|
||||
position: relative;
|
||||
transition: color var(--motion-fast);
|
||||
}
|
||||
.result-tab.active { color: var(--accent); }
|
||||
.result-tab.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
left: var(--space-5);
|
||||
right: var(--space-5);
|
||||
height: 3px;
|
||||
border-radius: 2px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
/* Three-column results */
|
||||
.result-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.result-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.result-card:hover { transform: translateY(-1px); }
|
||||
.result-card-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.result-card-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
}
|
||||
.result-card-title mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-card-date {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
margin-left: var(--space-3);
|
||||
}
|
||||
.result-card-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.result-card-excerpt mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-card-tags { display: flex; gap: var(--space-1); margin-top: var(--space-2); }
|
||||
.result-card-tag {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--accent);
|
||||
background: var(--surface-warm);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-pill);
|
||||
}
|
||||
|
||||
.result-template-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--space-5);
|
||||
}
|
||||
.result-template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-6);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.result-template-card:hover { border-color: var(--accent); transform: translateY(-2px); }
|
||||
.result-template-icon { font-size: 40px; margin-bottom: var(--space-3); }
|
||||
.result-template-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.result-template-name mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-template-desc { font-size: var(--text-xs); color: var(--muted); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="search-layout">
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" role="navigation" aria-label="主导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item active">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
搜索
|
||||
</button>
|
||||
<button class="sidebar-nav-item">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="search-main">
|
||||
<div class="search-bar">
|
||||
<button class="search-back-btn" aria-label="返回">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M15 18l-6-6 6-6"/></svg>
|
||||
</button>
|
||||
<div class="search-input-wrap">
|
||||
<svg viewBox="0 0 22 22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><line x1="16" y1="16" x2="20" y2="20"/></svg>
|
||||
<input class="search-input" type="text" id="searchInput" placeholder="搜索日记、模板、标签..." autocomplete="off" aria-label="搜索" autofocus>
|
||||
</div>
|
||||
<button class="search-cancel-btn" aria-label="取消搜索">取消</button>
|
||||
</div>
|
||||
|
||||
<div class="search-content">
|
||||
<!-- Before-search state -->
|
||||
<div id="searchBefore">
|
||||
<div class="search-section">
|
||||
<div class="search-section-header">
|
||||
<span class="search-section-title">最近搜索</span>
|
||||
<button class="search-section-action" aria-label="清除搜索历史">清除</button>
|
||||
</div>
|
||||
<div class="search-tags">
|
||||
<button class="search-tag" aria-label="搜索 期末考试">期末考试</button>
|
||||
<button class="search-tag" aria-label="搜索 读书笔记">读书笔记</button>
|
||||
<button class="search-tag" aria-label="搜索 旅行计划">旅行计划</button>
|
||||
<button class="search-tag" aria-label="搜索 心情">心情</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-section">
|
||||
<div class="search-section-header">
|
||||
<span class="search-section-title">热门搜索</span>
|
||||
</div>
|
||||
<div class="search-tags">
|
||||
<button class="search-tag" aria-label="搜索 期末">#期末</button>
|
||||
<button class="search-tag" aria-label="搜索 读书">#读书</button>
|
||||
<button class="search-tag" aria-label="搜索 心情">#心情</button>
|
||||
<button class="search-tag" aria-label="搜索 旅行">#旅行</button>
|
||||
<button class="search-tag" aria-label="搜索 美食">#美食</button>
|
||||
<button class="search-tag" aria-label="搜索 学习">#学习</button>
|
||||
<button class="search-tag" aria-label="搜索 运动">#运动</button>
|
||||
<button class="search-tag" aria-label="搜索 灵感">#灵感</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Search results -->
|
||||
<div id="searchResults" style="display:none">
|
||||
<div class="result-tabs" role="tablist">
|
||||
<button class="result-tab active" role="tab" aria-label="全部结果" aria-selected="true">全部</button>
|
||||
<button class="result-tab" role="tab" aria-label="日记结果" aria-selected="false">日记</button>
|
||||
<button class="result-tab" role="tab" aria-label="模板结果" aria-selected="false">模板</button>
|
||||
<button class="result-tab" role="tab" aria-label="标签结果" aria-selected="false">标签</button>
|
||||
</div>
|
||||
|
||||
<div id="resultDiary">
|
||||
<div class="result-grid">
|
||||
<div class="result-card" aria-label="打开日记 期末考试周复习计划">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">期末<mark>考试</mark>周复习计划</span>
|
||||
<span class="result-card-date">2025年12月15日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">今天开始了为期两周的期末<mark>考试</mark>复习,列了详细的计划表,每一科都安排了时间...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#期末</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 考研倒计时30天">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">考研倒计时30天</span>
|
||||
<span class="result-card-date">2025年11月25日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">距离考研还有30天,今天复习了英语阅读和政治,感觉<mark>考试</mark>越来越近了...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#考研</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 考试后的放松手账">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title"><mark>考试</mark>后的放松手账</span>
|
||||
<span class="result-card-date">2025年6月20日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">终于考完试了!用手账记录了<mark>考试</mark>结束那一刻的心情,画了一幅小小的庆祝插画...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#心情</span>
|
||||
<span class="result-card-tag">#手账</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 图书馆的午后">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">图书馆的午后</span>
|
||||
<span class="result-card-date">2025年5月30日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">今天在图书馆自习,窗外的阳光洒进来,暖暖的。复习了高数第三章...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#日常</span>
|
||||
<span class="result-card-tag">#学习</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 和舍友的火锅局">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">和舍友的火锅局</span>
|
||||
<span class="result-card-date">2025年5月29日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">考完试和舍友们去吃了火锅庆祝,大家都好开心,聊了很多有趣的事...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#美食</span>
|
||||
<span class="result-card-tag">#心情</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 期末考试第一天">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">期末<mark>考试</mark>第一天</span>
|
||||
<span class="result-card-date">2025年5月28日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">终于考完了英语,感觉发挥还可以。明天继续加油!给自己打个气...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#期末</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="resultTemplates" style="display:none">
|
||||
<div class="result-template-grid">
|
||||
<div class="result-template-card" aria-label="使用模板 考试复习计划">
|
||||
<div class="result-template-icon">📝</div>
|
||||
<div class="result-template-name"><mark>考试</mark>复习计划</div>
|
||||
<div class="result-template-desc">适合期末<mark>考试</mark>周使用</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 学习打卡">
|
||||
<div class="result-template-icon">📚</div>
|
||||
<div class="result-template-name">学习打卡</div>
|
||||
<div class="result-template-desc">每日学习记录模板</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 成绩分析">
|
||||
<div class="result-template-icon">📊</div>
|
||||
<div class="result-template-name">成绩分析</div>
|
||||
<div class="result-template-desc"><mark>考试</mark>成绩复盘模板</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 目标追踪">
|
||||
<div class="result-template-icon">🎯</div>
|
||||
<div class="result-template-name">目标追踪</div>
|
||||
<div class="result-template-desc">学期目标追踪模板</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="resultTags" style="display:none">
|
||||
<div class="search-tags" style="gap: var(--space-3);">
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 考试">#考试 (3篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 考研">#考研 (2篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 考试周">#考试周 (1篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 复习">#复习 (5篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 期末">#期末 (4篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 学习">#学习 (8篇)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="desktop-statusbar">
|
||||
<div class="traffic-lights"><div class="dot" style="background:#FF5F57"></div><div class="dot" style="background:#FEBC2E"></div><div class="dot" style="background:#28C840"></div></div>
|
||||
<span>暖记 — 搜索日记</span>
|
||||
<span style="font-variant-numeric:tabular-nums">14:32</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var input = document.getElementById('searchInput');
|
||||
var beforeEl = document.getElementById('searchBefore');
|
||||
var resultsEl = document.getElementById('searchResults');
|
||||
var resultTabs = document.querySelectorAll('.result-tab');
|
||||
var panels = ['resultDiary', 'resultTemplates', 'resultTags'];
|
||||
|
||||
input.addEventListener('input', function() {
|
||||
if (this.value.trim().length > 0) {
|
||||
beforeEl.style.display = 'none';
|
||||
resultsEl.style.display = '';
|
||||
} else {
|
||||
beforeEl.style.display = '';
|
||||
resultsEl.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.search-tag').forEach(function(tag) {
|
||||
tag.addEventListener('click', function() {
|
||||
input.value = this.textContent.trim();
|
||||
input.dispatchEvent(new Event('input'));
|
||||
});
|
||||
});
|
||||
|
||||
resultTabs.forEach(function(tab, idx) {
|
||||
tab.addEventListener('click', function() {
|
||||
resultTabs.forEach(function(t) { t.classList.remove('active'); t.setAttribute('aria-selected', 'false'); });
|
||||
tab.classList.add('active');
|
||||
tab.setAttribute('aria-selected', 'true');
|
||||
panels.forEach(function(p, i) {
|
||||
document.getElementById(p).style.display = i === idx ? '' : 'none';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
input.focus();
|
||||
</script>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
312
docs/opendesign/screens/desktop/shared.css
Normal file
312
docs/opendesign/screens/desktop/shared.css
Normal file
@@ -0,0 +1,312 @@
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* 暖记 — 桌面端 (1440×900) 共享布局组件
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
|
||||
/* Desktop sidebar (wider) */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 280px;
|
||||
background: var(--surface);
|
||||
border-right: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 100;
|
||||
padding: var(--space-6) 0;
|
||||
}
|
||||
|
||||
.sidebar-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
padding: 0 var(--space-6);
|
||||
margin-bottom: var(--space-10);
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: var(--radius-md);
|
||||
background: linear-gradient(135deg, var(--accent), var(--tertiary));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.sidebar-brand-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sidebar-brand-sub {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 0 var(--space-4);
|
||||
}
|
||||
|
||||
.sidebar-nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3) var(--space-5);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
background: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
|
||||
.sidebar-nav-item:hover {
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sidebar-nav-item.active {
|
||||
background: var(--surface-warm);
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar-nav-item svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-write-btn {
|
||||
margin: var(--space-5) var(--space-5);
|
||||
padding: var(--space-4) var(--space-6);
|
||||
min-height: 36px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-3);
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
box-shadow: var(--shadow-accent);
|
||||
}
|
||||
|
||||
.sidebar-write-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow-accent-hover);
|
||||
}
|
||||
|
||||
.sidebar-write-btn:active { transform: scale(0.97); }
|
||||
.sidebar-write-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
.sidebar-footer {
|
||||
padding: var(--space-4) var(--space-6);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.sidebar-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: var(--secondary-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.sidebar-user-name {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sidebar-user-streak {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Main content area */
|
||||
.main-content {
|
||||
margin-left: 280px;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
background: var(--bg);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
|
||||
.main-content::-webkit-scrollbar { width: 6px; }
|
||||
.main-content::-webkit-scrollbar-track { background: transparent; }
|
||||
.main-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
||||
|
||||
/* Desktop top bar */
|
||||
.desktop-topbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: var(--bg-frosted);
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
padding: var(--space-4) var(--space-10);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.desktop-topbar-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.desktop-topbar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.topbar-action-btn {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
|
||||
.topbar-action-btn:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.topbar-action-btn svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Three-column layout */
|
||||
.three-col {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
/* Two-column wider */
|
||||
.two-col-wide {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
.content-inner {
|
||||
padding: var(--space-8) var(--space-10);
|
||||
max-width: 1120px;
|
||||
}
|
||||
|
||||
/* Page header */
|
||||
.page-header {
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-3xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.page-header-sub {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
margin-top: var(--space-1);
|
||||
}
|
||||
|
||||
/* Desktop status bar */
|
||||
.desktop-statusbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 280px;
|
||||
right: 0;
|
||||
height: 32px;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-6);
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
z-index: 60;
|
||||
}
|
||||
|
||||
.desktop-statusbar .traffic-lights {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.desktop-statusbar .dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Focus visible styles for accessibility */
|
||||
button:focus-visible,
|
||||
a:focus-visible,
|
||||
[role="button"]:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Desktop button minimum size */
|
||||
button,
|
||||
[role="button"] {
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
/* Desktop hover enhancements */
|
||||
.topbar-action-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.sidebar-nav-item:hover {
|
||||
transform: translateX(2px);
|
||||
}
|
||||
|
||||
/* Window overflow handling for narrow viewports */
|
||||
.main-content {
|
||||
min-width: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.content-inner {
|
||||
min-width: 0;
|
||||
}
|
||||
555
docs/opendesign/screens/discover.html
Normal file
555
docs/opendesign/screens/discover.html
Normal file
@@ -0,0 +1,555 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 发现</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto;
|
||||
padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* Search bar */
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
margin-bottom: var(--space-5);
|
||||
border: 1px solid var(--border-soft);
|
||||
box-shadow: var(--elev-soft);
|
||||
transition: border-color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.search-bar:focus-within {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.search-bar svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.search-bar input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
background: none;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-base);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
}
|
||||
.search-bar input::placeholder {
|
||||
color: var(--meta);
|
||||
}
|
||||
|
||||
/* Daily inspiration card */
|
||||
.inspiration-card {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.inspiration-card:hover { transform: translateY(-2px); }
|
||||
.inspiration-card:active { transform: scale(0.98); }
|
||||
.inspiration-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
right: -30px;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.inspiration-card::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 30px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.08);
|
||||
}
|
||||
.inspiration-label {
|
||||
font-size: var(--text-xs);
|
||||
color: rgba(255,255,255,0.7);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.inspiration-body {
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
align-items: center;
|
||||
}
|
||||
.inspiration-thumb {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: rgba(255,255,255,0.2);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 36px;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.inspiration-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.inspiration-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.inspiration-author {
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,255,255,0.75);
|
||||
}
|
||||
|
||||
/* Topics section */
|
||||
.topics-section {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.topics-scroll {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
padding-bottom: var(--space-2);
|
||||
}
|
||||
.topics-scroll::-webkit-scrollbar { display: none; }
|
||||
.topic-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: var(--space-2) var(--space-4);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
color: var(--fg-2);
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
min-height: var(--touch-min);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.topic-chip:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
.topic-chip:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
.topic-chip.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.topic-chip .emoji {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Templates grid */
|
||||
.templates-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.template-card:hover { transform: translateY(-2px); }
|
||||
.template-card:active { transform: scale(0.97); }
|
||||
.template-thumb {
|
||||
height: 96px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
}
|
||||
.template-info {
|
||||
padding: var(--space-3);
|
||||
}
|
||||
.template-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-1);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.template-users {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.template-users svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
/* Experts diary list */
|
||||
.experts-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.expert-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.expert-card:hover { transform: translateY(-1px); }
|
||||
.expert-card:active { transform: scale(0.98); }
|
||||
.expert-avatar {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.expert-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.expert-name {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.expert-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.expert-preview {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.expert-likes {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.expert-likes svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: var(--rose);
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-state {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-10) var(--space-5);
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state.visible {
|
||||
display: flex;
|
||||
}
|
||||
.empty-state .icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: var(--space-4);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.empty-state .text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.empty-state .subtext {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Reduced motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.inspiration-card,
|
||||
.template-card,
|
||||
.expert-card,
|
||||
.topic-chip {
|
||||
transition: none;
|
||||
}
|
||||
.anim-fade,
|
||||
.anim-slide {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<!-- Search bar -->
|
||||
<div class="search-bar anim-fade" data-od-id="discover-search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
|
||||
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
<input type="text" placeholder="搜索日记、模板、话题..." aria-label="搜索日记、模板、话题">
|
||||
</div>
|
||||
|
||||
<!-- Empty state (shown when search has no results) -->
|
||||
<div class="empty-state" data-od-id="discover-empty" role="status">
|
||||
<span class="icon" aria-hidden="true">🔍</span>
|
||||
<div class="text">没有找到相关内容</div>
|
||||
<div class="subtext">换个关键词试试吧</div>
|
||||
</div>
|
||||
|
||||
<!-- Discover content -->
|
||||
<div id="discover-content">
|
||||
|
||||
<!-- Daily inspiration -->
|
||||
<section data-od-id="discover-inspiration" class="anim-fade" style="animation-delay: 0.1s">
|
||||
<div class="section-heading">
|
||||
<h3>每日灵感</h3>
|
||||
<button class="more" aria-label="查看更多灵感">更多</button>
|
||||
</div>
|
||||
<div class="inspiration-card" role="article" aria-label="今日灵感推荐:旅行手账排版技巧">
|
||||
<div class="inspiration-label">今日推荐</div>
|
||||
<div class="inspiration-body">
|
||||
<div class="inspiration-thumb" aria-hidden="true">🗺️</div>
|
||||
<div class="inspiration-info">
|
||||
<div class="inspiration-title">旅行手账排版技巧</div>
|
||||
<div class="inspiration-author">by 手账达人小林</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Hot topics -->
|
||||
<section class="topics-section" data-od-id="discover-topics" aria-label="热门话题">
|
||||
<div class="section-heading anim-fade" style="animation-delay: 0.15s">
|
||||
<h3>热门话题</h3>
|
||||
<button class="more" aria-label="查看更多话题">更多</button>
|
||||
</div>
|
||||
<div class="topics-scroll anim-fade" style="animation-delay: 0.2s" role="list">
|
||||
<button class="topic-chip active" role="listitem" aria-label="话题:期末备考">
|
||||
<span class="emoji" aria-hidden="true">📚</span>#期末备考
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:读书笔记">
|
||||
<span class="emoji" aria-hidden="true">📖</span>#读书笔记
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:旅行手账">
|
||||
<span class="emoji" aria-hidden="true">✈️</span>#旅行手账
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:美食记录">
|
||||
<span class="emoji" aria-hidden="true">🍜</span>#美食记录
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:校园生活">
|
||||
<span class="emoji" aria-hidden="true">🎓</span>#校园生活
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:自我成长">
|
||||
<span class="emoji" aria-hidden="true">🌱</span>#自我成长
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Featured templates -->
|
||||
<section data-od-id="discover-templates" aria-label="精选模板">
|
||||
<div class="section-heading anim-fade" style="animation-delay: 0.25s">
|
||||
<h3>精选模板</h3>
|
||||
<button class="more" aria-label="查看更多模板">更多</button>
|
||||
</div>
|
||||
<div class="templates-grid anim-fade" style="animation-delay: 0.3s">
|
||||
<div class="template-card" role="article" aria-label="模板:考试周复习计划">
|
||||
<div class="template-thumb" style="background: var(--tertiary-soft)" aria-hidden="true">📝</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">考试周复习计划</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
2.3k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:读书笔记手账">
|
||||
<div class="template-thumb" style="background: var(--secondary-soft)" aria-hidden="true">📖</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">读书笔记手账</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
1.8k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:月度心情打卡">
|
||||
<div class="template-thumb" style="background: var(--rose-soft)" aria-hidden="true">💫</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">月度心情打卡</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
3.1k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:旅行日记模板">
|
||||
<div class="template-thumb" style="background: var(--surface-warm)" aria-hidden="true">🗺️</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">旅行日记模板</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
1.5k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Expert diaries -->
|
||||
<section data-od-id="discover-experts" aria-label="达人日记">
|
||||
<div class="section-heading anim-fade" style="animation-delay: 0.35s">
|
||||
<h3>达人日记</h3>
|
||||
<button class="more" aria-label="查看更多达人日记">更多</button>
|
||||
</div>
|
||||
<div class="experts-list anim-fade" style="animation-delay: 0.4s">
|
||||
<div class="expert-card" role="article" aria-label="达人日记:我的大学生活第100天">
|
||||
<div class="expert-avatar" style="background: var(--tertiary-soft)" aria-hidden="true">🌸</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">小暖</div>
|
||||
<div class="expert-title">我的大学生活第100天</div>
|
||||
<div class="expert-preview">不知不觉大学生活已经过了100天了,从最初的迷茫到现在的适应,记录下这段珍贵的时光...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
328
|
||||
</div>
|
||||
</div>
|
||||
<div class="expert-card" role="article" aria-label="达人日记:考研倒计时30天手账">
|
||||
<div class="expert-avatar" style="background: var(--secondary-soft)" aria-hidden="true">✏️</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">手账少女</div>
|
||||
<div class="expert-title">考研倒计时30天手账</div>
|
||||
<div class="expert-preview">最后冲刺阶段,用手账记录每一天的复习进度和心情变化,给自己加油打气...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
512
|
||||
</div>
|
||||
</div>
|
||||
<div class="expert-card" role="article" aria-label="达人日记:秋日校园手账记录">
|
||||
<div class="expert-avatar" style="background: var(--rose-soft)" aria-hidden="true">🍂</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">阿月</div>
|
||||
<div class="expert-title">秋日校园手账记录</div>
|
||||
<div class="expert-preview">银杏叶黄了,校园美得像画一样。收集了几片落叶夹在手账里,记录这个温柔的秋天...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
276
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div style="height: var(--space-6)"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Tab Bar -->
|
||||
<nav class="tab-bar" aria-label="底部导航">
|
||||
<button class="tab-item" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" style="position:relative" aria-label="写日记">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item active" aria-label="发现">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item" aria-label="我的">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
1135
docs/opendesign/screens/editor.html
Normal file
1135
docs/opendesign/screens/editor.html
Normal file
File diff suppressed because it is too large
Load Diff
519
docs/opendesign/screens/home-daily.html
Normal file
519
docs/opendesign/screens/home-daily.html
Normal file
@@ -0,0 +1,519 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 首页日记流</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto;
|
||||
padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* Greeting header */
|
||||
.greeting {
|
||||
margin-bottom: var(--space-5);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.greeting-left {
|
||||
flex: 1;
|
||||
}
|
||||
.greeting-date {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.greeting-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.greeting-text span { color: var(--accent); }
|
||||
.greeting-search-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg-2);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
transition: all var(--motion-fast);
|
||||
flex-shrink: 0;
|
||||
margin-top: var(--space-3);
|
||||
}
|
||||
.greeting-search-btn:hover { color: var(--accent); border-color: var(--accent); }
|
||||
.greeting-search-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
/* Mood quick-select */
|
||||
.mood-section {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4) var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.mood-header span {
|
||||
font-family: var(--font-handwritten);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.mood-header .weather {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.mood-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.mood-opt {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: var(--space-2);
|
||||
border-radius: var(--radius-sm);
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.mood-opt:hover { background: var(--surface-warm); }
|
||||
.mood-opt.selected { background: var(--surface-warm); }
|
||||
.mood-opt .face { font-size: 28px; }
|
||||
.mood-opt .label { font-size: 11px; color: var(--muted); }
|
||||
.mood-opt.selected .label { color: var(--accent); font-weight: 600; }
|
||||
|
||||
/* Today's journal entry card */
|
||||
.today-card {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-6);
|
||||
margin-bottom: var(--space-5);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.today-card:hover { transform: translateY(-2px); }
|
||||
.today-card:active { transform: scale(0.98); }
|
||||
.today-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
right: -30px;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.today-card::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 40px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.08);
|
||||
}
|
||||
.today-card .label {
|
||||
font-family: var(--font-handwritten);
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,248,240,0.85);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.today-card .title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--accent-on);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.today-card .prompt {
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,248,240,0.75);
|
||||
}
|
||||
.today-card .write-btn {
|
||||
position: absolute;
|
||||
bottom: var(--space-5);
|
||||
right: var(--space-5);
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.today-card .write-btn:hover { transform: scale(1.1); }
|
||||
.today-card .write-btn svg { width: 22px; height: 22px; color: var(--accent); }
|
||||
|
||||
/* Recent entries */
|
||||
.recent-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.recent-header h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.recent-header a {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.entry-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
margin-bottom: var(--space-3);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.entry-card:hover { transform: translateY(-1px); }
|
||||
.entry-card:active { transform: scale(0.98); }
|
||||
|
||||
.entry-preview {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--surface-warm);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.entry-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.entry-date {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.entry-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.entry-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.entry-mood {
|
||||
font-size: 16px;
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Writing streak */
|
||||
.streak-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
background: var(--tertiary-soft);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: #B8860B;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.streak-badge svg { width: 16px; height: 16px; }
|
||||
|
||||
/* Quick stats row */
|
||||
.quick-stats {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.stat-card {
|
||||
flex: 1;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
text-align: center;
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.stat-card .num {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.stat-card .num.accent { color: var(--accent); }
|
||||
.stat-card .num.green { color: var(--secondary); }
|
||||
.stat-card .label {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-state {
|
||||
display: none; /* Shown via JS when no entries exist */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-10) var(--space-5);
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state .empty-circle {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
border: 2px dashed var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: var(--space-4);
|
||||
font-size: 32px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.empty-state .empty-text {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.empty-state .empty-hint {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--meta);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<!-- Greeting -->
|
||||
<div class="greeting anim-fade">
|
||||
<div class="greeting-left">
|
||||
<div class="greeting-date">2026年5月31日 · 星期日</div>
|
||||
<div class="greeting-text">下午好,<span>小暖</span></div>
|
||||
</div>
|
||||
<a href="search.html" class="greeting-search-btn" aria-label="搜索" title="搜索日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Writing streak -->
|
||||
<div class="streak-badge anim-fade" style="animation-delay: 0.1s">
|
||||
<svg viewBox="0 0 16 16" fill="#B8860B" aria-hidden="true"><path d="M8 1l2 5h5l-4 3 1.5 5L8 11 3.5 14 5 9 1 6h5z"/></svg>
|
||||
连续记录 12 天
|
||||
</div>
|
||||
|
||||
<!-- Mood check - standardized 5 moods: happy, calm, sad, angry, thinking -->
|
||||
<div class="mood-section anim-fade" style="animation-delay: 0.15s">
|
||||
<div class="mood-header">
|
||||
<span>今天心情如何?</span>
|
||||
<div class="weather">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="var(--tertiary)" aria-hidden="true">
|
||||
<circle cx="8" cy="8" r="5"/><path d="M8 1v2M8 13v2M1 8h2M13 8h2M3.05 3.05l1.41 1.41M11.54 11.54l1.41 1.41M3.05 12.95l1.41-1.41M11.54 4.46l1.41-1.41" stroke="var(--tertiary)" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
晴 26°
|
||||
</div>
|
||||
</div>
|
||||
<div class="mood-options">
|
||||
<button class="mood-opt selected" aria-label="开心"><span class="face">😊</span><span class="label">开心</span></button>
|
||||
<button class="mood-opt" aria-label="平静"><span class="face">😐</span><span class="label">平静</span></button>
|
||||
<button class="mood-opt" aria-label="难过"><span class="face">😢</span><span class="label">难过</span></button>
|
||||
<button class="mood-opt" aria-label="生气"><span class="face">😡</span><span class="label">生气</span></button>
|
||||
<button class="mood-opt" aria-label="思考"><span class="face">🤔</span><span class="label">思考</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Today's journal -->
|
||||
<div class="today-card anim-slide" style="animation-delay: 0.2s">
|
||||
<div class="label">今天的日记</div>
|
||||
<div class="title">写点什么吧...</div>
|
||||
<div class="prompt">记录一个温暖的瞬间,或者今天发生的小事</div>
|
||||
<button class="write-btn" aria-label="开始写日记">
|
||||
<svg viewBox="0 0 22 22" fill="none" aria-hidden="true">
|
||||
<path d="M11 5v12M5 11h12" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Quick stats -->
|
||||
<div class="quick-stats anim-fade" style="animation-delay: 0.25s">
|
||||
<div class="stat-card">
|
||||
<div class="num accent">28</div>
|
||||
<div class="label">本月日记</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="num green">12</div>
|
||||
<div class="label">连续天数</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="num">156</div>
|
||||
<div class="label">总日记数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recent entries -->
|
||||
<div class="recent-header anim-fade" style="animation-delay: 0.3s">
|
||||
<h3>最近记录</h3>
|
||||
<a href="#" aria-label="查看全部日记">查看全部</a>
|
||||
</div>
|
||||
|
||||
<div class="entry-card anim-fade" style="animation-delay: 0.35s">
|
||||
<div class="entry-preview">🌸</div>
|
||||
<div class="entry-info">
|
||||
<div class="entry-date">5月30日 · 周六</div>
|
||||
<div class="entry-title">图书馆的午后</div>
|
||||
<div class="entry-excerpt">今天在图书馆自习,窗外的阳光洒进来,暖暖的。复习了高数第三章...</div>
|
||||
</div>
|
||||
<div class="entry-mood">😊</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-card anim-fade" style="animation-delay: 0.4s">
|
||||
<div class="entry-preview" style="background: var(--secondary-soft)">🍃</div>
|
||||
<div class="entry-info">
|
||||
<div class="entry-date">5月29日 · 周五</div>
|
||||
<div class="entry-title">和舍友的火锅局</div>
|
||||
<div class="entry-excerpt">考完试和舍友们去吃了火锅庆祝,大家都好开心,聊了很多有趣的事...</div>
|
||||
</div>
|
||||
<div class="entry-mood">😊</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-card anim-fade" style="animation-delay: 0.45s">
|
||||
<div class="entry-preview" style="background: var(--tertiary-soft)">📝</div>
|
||||
<div class="entry-info">
|
||||
<div class="entry-date">5月28日 · 周四</div>
|
||||
<div class="entry-title">期末考试第一天</div>
|
||||
<div class="entry-excerpt">终于考完了英语,感觉发挥还可以。明天继续加油!给自己打个气...</div>
|
||||
</div>
|
||||
<div class="entry-mood">😐</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-card anim-fade" style="animation-delay: 0.5s">
|
||||
<div class="entry-preview" style="background: var(--rose-soft)">🌙</div>
|
||||
<div class="entry-info">
|
||||
<div class="entry-date">5月27日 · 周三</div>
|
||||
<div class="entry-title">夜跑打卡</div>
|
||||
<div class="entry-excerpt">晚上去操场跑了三圈,吹着晚风特别舒服。回来洗了个热水澡...</div>
|
||||
</div>
|
||||
<div class="entry-mood">😐</div>
|
||||
</div>
|
||||
|
||||
<!-- Empty state (shown when no entries exist, hidden by default) -->
|
||||
<div class="empty-state" id="emptyEntries">
|
||||
<div class="empty-circle">📝</div>
|
||||
<div class="empty-text">还没有日记</div>
|
||||
<div class="empty-hint">点击上方按钮,开始记录你的第一篇日记吧</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-6)"></div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Tab Bar -->
|
||||
<nav class="tab-bar" role="tablist">
|
||||
<button class="tab-item active" role="tab" aria-label="首页" aria-selected="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="日历" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="写日记" aria-selected="false" style="position:relative">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent-on)" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="发现" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="我的" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
644
docs/opendesign/screens/login.html
Normal file
644
docs/opendesign/screens/login.html
Normal file
@@ -0,0 +1,644 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 登录/注册</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Focus styles */
|
||||
button:focus-visible, a:focus-visible, input:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Brand area */
|
||||
.brand-area {
|
||||
flex: 0 0 auto;
|
||||
background: linear-gradient(180deg, var(--bg) 0%, var(--tertiary-soft) 100%);
|
||||
padding: calc(var(--safe-top) + var(--space-6)) var(--space-6) var(--space-8);
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* CSS-drawn notebook logo */
|
||||
.logo-wrap {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin: 0 auto var(--space-4);
|
||||
position: relative;
|
||||
}
|
||||
.logo-notebook {
|
||||
width: 64px;
|
||||
height: 72px;
|
||||
border: 3px solid var(--accent);
|
||||
border-radius: 6px 10px 10px 6px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: color-mix(in oklab, var(--accent), transparent 94%);
|
||||
}
|
||||
.logo-spine {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 3px;
|
||||
height: 72px;
|
||||
background: var(--accent);
|
||||
border-radius: 2px;
|
||||
}
|
||||
.logo-heart {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -45%);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
.logo-heart::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: var(--accent);
|
||||
clip-path: path('M9 16C9 16 1 10.5 1 6C1 3.24 3.24 1 6 1C7.5 1 8.8 1.7 9 2.8C9.2 1.7 10.5 1 12 1C14.76 1 17 3.24 17 6C17 10.5 9 16 9 16Z');
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.brand-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.brand-tagline {
|
||||
font-family: var(--font-handwritten);
|
||||
font-size: 18px;
|
||||
color: var(--accent);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Floating decorations */
|
||||
.deco {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
opacity: 0.2;
|
||||
}
|
||||
.deco-dot1 {
|
||||
width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
|
||||
top: 60px; left: 40px;
|
||||
}
|
||||
.deco-dot2 {
|
||||
width: 6px; height: 6px; border-radius: 50%; background: var(--secondary);
|
||||
top: 90px; right: 50px;
|
||||
}
|
||||
.deco-dot3 {
|
||||
width: 10px; height: 10px; border-radius: 50%; background: var(--tertiary);
|
||||
bottom: 30px; left: 60px;
|
||||
}
|
||||
.deco-wave {
|
||||
width: 30px; height: 12px;
|
||||
top: 80px; right: 80px;
|
||||
}
|
||||
.deco-wave svg { width: 100%; height: 100%; }
|
||||
.deco-flower {
|
||||
width: 16px; height: 16px;
|
||||
bottom: 20px; right: 70px;
|
||||
}
|
||||
.deco-flower::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 16px; height: 16px;
|
||||
background: var(--rose);
|
||||
clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
|
||||
}
|
||||
|
||||
/* Form area */
|
||||
.form-area {
|
||||
flex: 1;
|
||||
padding: var(--space-6) var(--space-6) var(--space-8);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--bg);
|
||||
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
|
||||
margin-top: -var(--space-4);
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
/* Input group */
|
||||
.input-group {
|
||||
position: relative;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.input-group .input-icon {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.input-group input {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 16px 0 46px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-base);
|
||||
color: var(--fg);
|
||||
background: var(--surface);
|
||||
transition: border-color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.input-group input::placeholder {
|
||||
color: var(--meta);
|
||||
}
|
||||
.input-group input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--shadow-input-focus);
|
||||
}
|
||||
|
||||
/* Verification code input with button */
|
||||
.input-group.has-action input {
|
||||
padding-right: 110px;
|
||||
}
|
||||
.input-group .input-action {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
padding: 8px 14px;
|
||||
background: none;
|
||||
border: none;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
min-height: 38px;
|
||||
border-radius: var(--radius-pill);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.input-group .input-action:hover {
|
||||
background: var(--surface-warm);
|
||||
}
|
||||
|
||||
/* Password toggle */
|
||||
.input-group.has-toggle input {
|
||||
padding-right: 50px;
|
||||
}
|
||||
.input-group .toggle-password {
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.input-group .toggle-password:hover {
|
||||
color: var(--fg);
|
||||
}
|
||||
.input-group .toggle-password svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/* Agreement checkbox */
|
||||
.agreement {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-4);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
line-height: 1.4;
|
||||
}
|
||||
.agreement input[type="checkbox"] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
accent-color: var(--accent);
|
||||
margin-top: 2px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.agreement a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
.agreement a:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Primary button */
|
||||
.btn-login {
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--accent);
|
||||
color: var(--bg);
|
||||
font-family: var(--font-display);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.btn-login:hover {
|
||||
background: var(--accent-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 16px var(--shadow-accent);
|
||||
}
|
||||
.btn-login:active {
|
||||
background: var(--accent-active);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* Divider */
|
||||
.divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
margin-bottom: var(--space-5);
|
||||
color: var(--meta);
|
||||
font-size: var(--text-sm);
|
||||
}
|
||||
.divider::before,
|
||||
.divider::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
/* Third-party login */
|
||||
.social-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--space-5);
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.social-btn {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
background: var(--surface);
|
||||
}
|
||||
.social-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.social-btn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
.social-btn svg {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
.social-btn.wechat {
|
||||
background: #07C160;
|
||||
border-color: #07C160;
|
||||
}
|
||||
.social-btn.wechat:hover {
|
||||
background: #06AD56;
|
||||
border-color: #06AD56;
|
||||
}
|
||||
.social-btn.apple {
|
||||
background: #1D1D1F;
|
||||
border-color: #1D1D1F;
|
||||
}
|
||||
.social-btn.apple:hover {
|
||||
background: #333;
|
||||
border-color: #333;
|
||||
}
|
||||
.social-btn.google {
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
/* Bottom link */
|
||||
.bottom-link {
|
||||
text-align: center;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
margin-top: auto;
|
||||
}
|
||||
.bottom-link a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
}
|
||||
.bottom-link a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* State toggling */
|
||||
.register-fields {
|
||||
display: none;
|
||||
}
|
||||
.is-register .register-fields {
|
||||
display: block;
|
||||
}
|
||||
.is-register .login-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Reduced motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.4s var(--ease-standard) both; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Brand Area -->
|
||||
<div class="brand-area">
|
||||
<!-- Decorative elements -->
|
||||
<div class="deco deco-dot1" aria-hidden="true"></div>
|
||||
<div class="deco deco-dot2" aria-hidden="true"></div>
|
||||
<div class="deco deco-dot3" aria-hidden="true"></div>
|
||||
<div class="deco deco-wave" aria-hidden="true">
|
||||
<svg viewBox="0 0 30 12" fill="none" stroke="var(--accent)" stroke-width="2" stroke-linecap="round">
|
||||
<path d="M2 8 Q8 2, 15 8 Q22 14, 28 8"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="deco deco-flower" aria-hidden="true"></div>
|
||||
|
||||
<!-- Logo -->
|
||||
<div class="logo-wrap anim-fade" aria-hidden="true">
|
||||
<div class="logo-notebook"></div>
|
||||
<div class="logo-spine"></div>
|
||||
<div class="logo-heart"></div>
|
||||
</div>
|
||||
|
||||
<div class="brand-title anim-fade" style="animation-delay:0.1s">暖记</div>
|
||||
<div class="brand-tagline anim-fade" style="animation-delay:0.15s">用温暖记录每一天</div>
|
||||
</div>
|
||||
|
||||
<!-- Form Area -->
|
||||
<div class="form-area" id="formArea">
|
||||
|
||||
<h1 class="form-title anim-fade" style="animation-delay:0.2s" id="formTitle">欢迎回来</h1>
|
||||
|
||||
<form id="loginForm" autocomplete="on" novalidate>
|
||||
<!-- Register: nickname -->
|
||||
<div class="register-fields anim-fade">
|
||||
<div class="input-group">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<circle cx="10" cy="7" r="4"/><path d="M3 18c0-3.3 3.1-6 7-6s7 2.7 7 6"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="text" id="nickname" name="nickname" placeholder="请输入昵称" autocomplete="nickname" aria-label="昵称">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="input-group anim-fade" style="animation-delay:0.25s">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="5" y="2" width="10" height="16" rx="2"/><line x1="8" y1="15" x2="12" y2="15"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="tel" id="phone" name="phone" placeholder="请输入手机号" autocomplete="tel" pattern="[0-9]*" aria-label="手机号">
|
||||
</div>
|
||||
|
||||
<!-- Register: password -->
|
||||
<div class="register-fields anim-fade">
|
||||
<div class="input-group has-toggle">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="3" y="9" width="14" height="9" rx="2"/><path d="M6 9V6a4 4 0 018 0v3"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="password" id="regPassword" name="password" placeholder="请输入密码" autocomplete="new-password" aria-label="密码">
|
||||
<button type="button" class="toggle-password" aria-label="显示密码" onclick="togglePwd('regPassword', this)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Verification code -->
|
||||
<div class="input-group has-action anim-fade" style="animation-delay:0.3s">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="2" y="4" width="16" height="12" rx="2"/><path d="M6 8v4M10 7v6M14 8v4"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="tel" id="code" name="code" placeholder="请输入验证码" autocomplete="one-time-code" pattern="[0-9]*" aria-label="验证码">
|
||||
<button type="button" class="input-action" aria-label="获取验证码" id="getCodeBtn" onclick="sendCode()">获取验证码</button>
|
||||
</div>
|
||||
|
||||
<!-- Register: agreement -->
|
||||
<div class="register-fields anim-fade">
|
||||
<label class="agreement">
|
||||
<input type="checkbox" id="agreement" aria-label="同意用户协议">
|
||||
<span>我已阅读并同意<a href="#" onclick="return false">《用户协议》</a>和<a href="#" onclick="return false">《隐私政策》</a></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit -->
|
||||
<button type="submit" class="btn-login anim-fade" style="animation-delay:0.35s" id="submitBtn" aria-label="登录">登录</button>
|
||||
</form>
|
||||
|
||||
<!-- Divider -->
|
||||
<div class="divider anim-fade" style="animation-delay:0.4s">其他登录方式</div>
|
||||
|
||||
<!-- Third-party login -->
|
||||
<div class="social-row anim-fade" style="animation-delay:0.45s">
|
||||
<!-- WeChat -->
|
||||
<button type="button" class="social-btn wechat" aria-label="微信登录">
|
||||
<svg viewBox="0 0 28 28" fill="none">
|
||||
<path d="M19.1 12.5c-.2-3.3-3.2-5.9-6.8-5.9-3.8 0-6.9 2.8-6.9 6.3 0 1.8.9 3.4 2.3 4.5l-.6 1.8 2.1-1.1c.7.2 1.5.3 2.3.3h.4c-.1-.4-.2-.8-.2-1.2.1-2.6 2.7-4.7 5.9-4.7h.2c.1-.1.2-.1.3 0z" fill="#FFF"/>
|
||||
<path d="M11.6 11.5c-.5 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.5 1-1 1zM14.8 10.5c-.5 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.5-1-1-1z" fill="#07C160"/>
|
||||
<path d="M25.5 16.8c0-2.9-2.9-5.3-6.3-5.3s-6.3 2.4-6.3 5.3 2.9 5.3 6.3 5.3c.7 0 1.4-.1 2-.3l1.7.9-.5-1.5c1.3-1 2.1-2.5 2.1-4.1 0 .1 0-.1 0-.3zm-8.6-1c-.4 0-.8-.3-.8-.8s.3-.8.8-.8.8.3.8.8-.4.8-.8.8zm4.6 0c-.4 0-.8-.3-.8-.8s.3-.8.8-.8.8.3.8.8-.4.8-.8.8z" fill="#FFF"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Apple -->
|
||||
<button type="button" class="social-btn apple" aria-label="Apple登录">
|
||||
<svg viewBox="0 0 28 28" fill="#FFF">
|
||||
<path d="M20.2 14.3c0-2 1.2-3.1 1.3-3.2-0.7-1-1.8-1.6-3-1.6-1.3 0-2 .8-2.7.8-.7 0-1.4-.8-2.5-.8-1.7 0-3.5 1.4-3.5 4.1 0 1.6.6 3.3 1.4 4.5.7 1 1.4 1.8 2.3 1.8.9 0 1.3-.7 2.5-.7 1.2 0 1.5.7 2.5.7.9 0 1.6-.8 2.2-1.7.4-.6.7-1.2.9-1.9-2-.8-2.4-3.8-.4-5zm-1.8-3.3c.5-.6.9-1.4.8-2.2-.8 0-1.8.5-2.3 1.2-.5.6-.9 1.4-.8 2.2.8 0 1.7-.5 2.3-1.2z"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Google -->
|
||||
<button type="button" class="social-btn google" aria-label="Google登录">
|
||||
<svg viewBox="0 0 28 28">
|
||||
<path d="M14 11.5v5.2h7.3c-.3 1.7-1.3 3.1-2.7 4.1l4.4 3.4c2.6-2.4 4-5.9 4-10.1 0-1-.1-1.9-.3-2.8H14z" fill="#4285F4"/>
|
||||
<path d="M6.3 16.4c-.4-1-.6-2.2-.6-3.4s.2-2.3.6-3.4L1.9 6.2C.7 8.5 0 11.2 0 14s.7 5.5 1.9 7.8l4.4-3.4z" fill="#FBBC05"/>
|
||||
<path d="M14 28c3.7 0 6.8-1.2 9.1-3.3l-4.4-3.4c-1.2.8-2.8 1.3-4.7 1.3-3.6 0-6.7-2.4-7.8-5.7l-4.4 3.4C4.2 24.7 8.7 28 14 28z" fill="#34A853"/>
|
||||
<path d="M14 5.6c2 0 3.9.7 5.3 2l4-4C20.8 1.2 17.7 0 14 0 8.7 0 4.2 3.3 2.1 8.1l4.4 3.4c1.1-3.3 4.2-5.9 7.5-5.9z" fill="#EA4335"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Bottom link -->
|
||||
<div class="bottom-link anim-fade" style="animation-delay:0.5s">
|
||||
<span class="login-only">还没有账号?</span>
|
||||
<a href="#" id="toggleLink" role="button" aria-label="切换到注册">立即注册</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Home indicator -->
|
||||
<div style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);width:134px;height:5px;background:var(--fg);opacity:0.2;border-radius:3px;z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var isRegister = false;
|
||||
var formArea = document.getElementById('formArea');
|
||||
var formTitle = document.getElementById('formTitle');
|
||||
var submitBtn = document.getElementById('submitBtn');
|
||||
var toggleLink = document.getElementById('toggleLink');
|
||||
var phoneInput = document.getElementById('phone');
|
||||
|
||||
// Only allow digits in phone input
|
||||
phoneInput.addEventListener('input', function() {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
|
||||
var codeInput = document.getElementById('code');
|
||||
codeInput.addEventListener('input', function() {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
|
||||
// Toggle login/register
|
||||
toggleLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
isRegister = !isRegister;
|
||||
|
||||
if (isRegister) {
|
||||
formArea.classList.add('is-register');
|
||||
formTitle.textContent = '创建账号';
|
||||
submitBtn.textContent = '注册';
|
||||
submitBtn.setAttribute('aria-label', '注册');
|
||||
toggleLink.textContent = '立即登录';
|
||||
toggleLink.setAttribute('aria-label', '切换到登录');
|
||||
toggleLink.previousElementSibling.textContent = '已有账号?';
|
||||
} else {
|
||||
formArea.classList.remove('is-register');
|
||||
formTitle.textContent = '欢迎回来';
|
||||
submitBtn.textContent = '登录';
|
||||
submitBtn.setAttribute('aria-label', '登录');
|
||||
toggleLink.textContent = '立即注册';
|
||||
toggleLink.setAttribute('aria-label', '切换到注册');
|
||||
toggleLink.previousElementSibling.textContent = '还没有账号?';
|
||||
}
|
||||
});
|
||||
|
||||
// Form submit
|
||||
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
})();
|
||||
|
||||
function togglePwd(inputId, btn) {
|
||||
var input = document.getElementById(inputId);
|
||||
if (input.type === 'password') {
|
||||
input.type = 'text';
|
||||
btn.setAttribute('aria-label', '隐藏密码');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>';
|
||||
} else {
|
||||
input.type = 'password';
|
||||
btn.setAttribute('aria-label', '显示密码');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>';
|
||||
}
|
||||
}
|
||||
|
||||
function sendCode() {
|
||||
var btn = document.getElementById('getCodeBtn');
|
||||
var seconds = 60;
|
||||
btn.disabled = true;
|
||||
btn.style.opacity = '0.6';
|
||||
btn.textContent = seconds + 's';
|
||||
var timer = setInterval(function() {
|
||||
seconds--;
|
||||
if (seconds <= 0) {
|
||||
clearInterval(timer);
|
||||
btn.disabled = false;
|
||||
btn.style.opacity = '1';
|
||||
btn.textContent = '获取验证码';
|
||||
} else {
|
||||
btn.textContent = seconds + 's';
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
306
docs/opendesign/screens/monthly.html
Normal file
306
docs/opendesign/screens/monthly.html
Normal file
@@ -0,0 +1,306 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 月度概览</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px; height: 844px;
|
||||
overflow: hidden; background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute; top: 0; left: 0; right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto; padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
.month-header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.month-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl); font-weight: 700;
|
||||
}
|
||||
.month-nav { display: flex; gap: var(--space-2); }
|
||||
.month-nav button {
|
||||
min-width: 44px; min-height: 44px; border-radius: 50%;
|
||||
border: 1.5px solid var(--border); background: var(--surface);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
cursor: pointer; color: var(--fg); transition: all var(--motion-fast);
|
||||
}
|
||||
.month-nav button:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.month-nav button svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Monthly calendar grid - color coded */
|
||||
.month-grid {
|
||||
background: var(--surface); border-radius: var(--radius-md);
|
||||
padding: var(--space-4); margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft); border: 1px solid var(--border-soft);
|
||||
}
|
||||
.weekday-row {
|
||||
display: grid; grid-template-columns: repeat(7, 1fr);
|
||||
text-align: center; margin-bottom: var(--space-2);
|
||||
}
|
||||
.weekday-row span { font-size: 11px; color: var(--meta); font-weight: 500; }
|
||||
.m-grid {
|
||||
display: grid; grid-template-columns: repeat(7, 1fr);
|
||||
gap: 3px;
|
||||
}
|
||||
.m-cell {
|
||||
aspect-ratio: 1; border-radius: 6px;
|
||||
display: flex; flex-direction: column;
|
||||
align-items: center; justify-content: center;
|
||||
font-size: 12px; color: var(--fg);
|
||||
position: relative; cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
min-height: 44px;
|
||||
}
|
||||
.m-cell:hover { transform: scale(1.1); }
|
||||
.m-cell.empty { cursor: default; }
|
||||
.m-cell.empty:hover { transform: none; }
|
||||
.m-cell .mood-e { font-size: 10px; margin-top: 1px; }
|
||||
.m-cell.has-entry { background: rgba(255,255,255,0.5); }
|
||||
.m-cell.mood-happy { background: var(--secondary-soft); }
|
||||
.m-cell.mood-love { background: var(--rose-soft); }
|
||||
.m-cell.mood-calm { background: var(--tertiary-soft); }
|
||||
.m-cell.mood-sad { background: #D4DDE8; }
|
||||
.m-cell.mood-tired { background: #E8E4E0; }
|
||||
.m-cell.today {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: -2px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Month summary */
|
||||
.month-summary {
|
||||
background: var(--surface); border-radius: var(--radius-md);
|
||||
padding: var(--space-5); margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft); border: 1px solid var(--border-soft);
|
||||
}
|
||||
.month-summary h3 {
|
||||
font-family: var(--font-display); font-size: var(--text-lg);
|
||||
font-weight: 700; margin-bottom: var(--space-4);
|
||||
}
|
||||
.summary-grid {
|
||||
display: grid; grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.s-card {
|
||||
padding: var(--space-4); border-radius: var(--radius-sm);
|
||||
text-align: center;
|
||||
}
|
||||
.s-card .s-icon { font-size: 24px; margin-bottom: var(--space-2); }
|
||||
.s-card .s-val {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl); font-weight: 700;
|
||||
}
|
||||
.s-card .s-label {
|
||||
font-size: var(--text-xs); color: var(--muted); margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Highlight entries */
|
||||
.highlights {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.highlights h3 {
|
||||
font-family: var(--font-display); font-size: var(--text-lg);
|
||||
font-weight: 700; margin-bottom: var(--space-4);
|
||||
}
|
||||
.highlight-card {
|
||||
background: var(--surface); border-radius: var(--radius-md);
|
||||
padding: var(--space-4); margin-bottom: var(--space-3);
|
||||
box-shadow: var(--elev-soft); border: 1px solid var(--border-soft);
|
||||
display: flex; gap: var(--space-3); align-items: center;
|
||||
cursor: pointer; transition: transform var(--motion-fast);
|
||||
min-height: 44px;
|
||||
}
|
||||
.highlight-card:hover { transform: translateY(-1px); }
|
||||
.hl-emoji {
|
||||
width: 48px; height: 48px; border-radius: 50%;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 24px; flex-shrink: 0;
|
||||
}
|
||||
.hl-info { flex: 1; }
|
||||
.hl-info .hl-date { font-size: var(--text-xs); color: var(--muted); }
|
||||
.hl-info .hl-title {
|
||||
font-family: var(--font-display); font-size: var(--text-base);
|
||||
font-weight: 600; margin-top: 2px;
|
||||
}
|
||||
.hl-badge {
|
||||
padding: 4px 10px; border-radius: var(--radius-pill);
|
||||
font-size: 11px; font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<div class="month-header anim-fade">
|
||||
<div class="month-title">2026年5月</div>
|
||||
<div class="month-nav">
|
||||
<button aria-label="上个月"><svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M11 14l-5-5 5-5"/></svg></button>
|
||||
<button aria-label="下个月"><svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M7 4l5 5-5 5"/></svg></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Month grid - using standardized 5 moods -->
|
||||
<div class="month-grid anim-fade" style="animation-delay: 0.1s">
|
||||
<div class="weekday-row" aria-hidden="true">
|
||||
<span>日</span><span>一</span><span>二</span><span>三</span><span>四</span><span>五</span><span>六</span>
|
||||
</div>
|
||||
<div class="m-grid">
|
||||
<div class="m-cell empty"></div>
|
||||
<div class="m-cell empty"></div>
|
||||
<div class="m-cell empty"></div>
|
||||
<div class="m-cell empty"></div>
|
||||
<div class="m-cell empty"></div>
|
||||
<div class="m-cell mood-happy">1<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">2<span class="mood-e">😊</span></div>
|
||||
|
||||
<div class="m-cell mood-calm">3<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-sad">4<span class="mood-e">😢</span></div>
|
||||
<div class="m-cell mood-happy">5<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">6<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-tired">7<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">8<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-love">9<span class="mood-e">😡</span></div>
|
||||
|
||||
<div class="m-cell mood-calm">10<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">11<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-tired">12<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">13<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">14<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-calm">15<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">16<span class="mood-e">😊</span></div>
|
||||
|
||||
<div class="m-cell mood-sad">17<span class="mood-e">😢</span></div>
|
||||
<div class="m-cell mood-calm">18<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">19<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">20<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">21<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-tired">22<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">23<span class="mood-e">😊</span></div>
|
||||
|
||||
<div class="m-cell mood-happy">24<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-calm">25<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-calm">26<span class="mood-e">😐</span></div>
|
||||
<div class="m-cell mood-happy">27<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">28<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">29<span class="mood-e">😊</span></div>
|
||||
<div class="m-cell mood-happy">30<span class="mood-e">😊</span></div>
|
||||
|
||||
<div class="m-cell mood-happy today">31<span class="mood-e">😊</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Summary -->
|
||||
<div class="month-summary anim-fade" style="animation-delay: 0.15s">
|
||||
<h3>本月总结</h3>
|
||||
<div class="summary-grid">
|
||||
<div class="s-card" style="background: var(--tertiary-soft)">
|
||||
<div class="s-icon">📝</div>
|
||||
<div class="s-val" style="color:#B8860B">28</div>
|
||||
<div class="s-label">日记篇数</div>
|
||||
</div>
|
||||
<div class="s-card" style="background: var(--secondary-soft)">
|
||||
<div class="s-icon">🔥</div>
|
||||
<div class="s-val" style="color:#2D7D46">12</div>
|
||||
<div class="s-label">最长连续</div>
|
||||
</div>
|
||||
<div class="s-card" style="background: var(--rose-soft)">
|
||||
<div class="s-icon">😊</div>
|
||||
<div class="s-val" style="color:#9B4D4D">72%</div>
|
||||
<div class="s-label">好心情占比</div>
|
||||
</div>
|
||||
<div class="s-card" style="background: #D4DDE8">
|
||||
<div class="s-icon">📸</div>
|
||||
<div class="s-val" style="color:#4A6B8A">18</div>
|
||||
<div class="s-label">照片数量</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Highlights -->
|
||||
<div class="highlights anim-fade" style="animation-delay: 0.2s">
|
||||
<h3>本月精选</h3>
|
||||
|
||||
<div class="highlight-card">
|
||||
<div class="hl-emoji" style="background:var(--rose-soft)">😊</div>
|
||||
<div class="hl-info">
|
||||
<div class="hl-date">5月14日</div>
|
||||
<div class="hl-title">和朋友聚餐的欢乐时光</div>
|
||||
</div>
|
||||
<div class="hl-badge" style="background:var(--rose-soft);color:#9B4D4D">最佳心情</div>
|
||||
</div>
|
||||
|
||||
<div class="highlight-card">
|
||||
<div class="hl-emoji" style="background:var(--tertiary-soft)">⭐</div>
|
||||
<div class="hl-info">
|
||||
<div class="hl-date">5月21日</div>
|
||||
<div class="hl-title">完成了第一个小目标</div>
|
||||
</div>
|
||||
<div class="hl-badge" style="background:var(--tertiary-soft);color:#B8860B">里程碑</div>
|
||||
</div>
|
||||
|
||||
<div class="highlight-card">
|
||||
<div class="hl-emoji" style="background:var(--secondary-soft)">📚</div>
|
||||
<div class="hl-info">
|
||||
<div class="hl-date">5月28日</div>
|
||||
<div class="hl-title">期末考试结束</div>
|
||||
</div>
|
||||
<div class="hl-badge" style="background:var(--secondary-soft);color:#2D7D46">最详尽记录</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<nav class="tab-bar" role="tablist">
|
||||
<button class="tab-item" role="tab" aria-label="首页" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item active" role="tab" aria-label="日历" aria-selected="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="写日记" aria-selected="false" style="position:relative">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent-on)" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="发现" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="我的" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
433
docs/opendesign/screens/mood-tracker.html
Normal file
433
docs/opendesign/screens/mood-tracker.html
Normal file
@@ -0,0 +1,433 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 心情追踪</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto;
|
||||
padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
.page-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
/* Today mood card */
|
||||
.today-mood-card {
|
||||
background: linear-gradient(135deg, var(--accent), var(--tertiary));
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-6);
|
||||
margin-bottom: var(--space-5);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.today-mood-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
right: -20px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.today-mood-card .label {
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,248,240,0.85);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.today-mood-card .big-mood {
|
||||
font-size: 52px;
|
||||
margin: var(--space-3) 0;
|
||||
}
|
||||
.today-mood-card .mood-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--accent-on);
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.today-mood-card .mood-sub {
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,248,240,0.75);
|
||||
}
|
||||
|
||||
/* Weather card */
|
||||
.weather-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.weather-card h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.weather-row {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.weather-opt {
|
||||
flex: 1;
|
||||
aspect-ratio: 1;
|
||||
border-radius: var(--radius-md);
|
||||
border: 2px solid var(--border);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
background: var(--surface);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
font-size: 28px;
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
}
|
||||
.weather-opt span {
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.weather-opt.selected {
|
||||
border-color: var(--accent);
|
||||
background: var(--surface-warm);
|
||||
}
|
||||
.weather-opt.selected span { color: var(--accent); font-weight: 600; }
|
||||
.weather-opt:hover { transform: scale(1.05); }
|
||||
|
||||
/* Mood history chart */
|
||||
.mood-chart-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-chart-card h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.chart-period {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.period-btn {
|
||||
padding: 6px 16px;
|
||||
min-height: 44px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.period-btn.active { background: var(--accent); color: var(--accent-on); }
|
||||
|
||||
/* Simple line chart visualization */
|
||||
.mood-line-chart {
|
||||
height: 120px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 3px;
|
||||
margin-bottom: var(--space-4);
|
||||
padding-bottom: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.mood-line-chart::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
background: var(--border-soft);
|
||||
}
|
||||
.chart-bar {
|
||||
flex: 1;
|
||||
max-width: 14px;
|
||||
border-radius: 7px 7px 0 0;
|
||||
position: relative;
|
||||
transition: height var(--motion-base) var(--ease-bounce);
|
||||
cursor: pointer;
|
||||
}
|
||||
.chart-bar:hover { opacity: 0.8; }
|
||||
.chart-bar .tooltip {
|
||||
position: absolute;
|
||||
bottom: calc(100% + 8px);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: var(--fg);
|
||||
color: white;
|
||||
font-size: 11px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity var(--motion-fast);
|
||||
}
|
||||
.chart-bar:hover .tooltip { opacity: 1; }
|
||||
.chart-date {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 9px;
|
||||
color: var(--meta);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Stats grid */
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.stat-item {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
text-align: center;
|
||||
}
|
||||
.stat-item .icon { font-size: 28px; margin-bottom: var(--space-2); }
|
||||
.stat-item .value {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.stat-item .desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Mood insights */
|
||||
.insight-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.insight-card h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.insight-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3) 0;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
.insight-item:last-child { border-bottom: none; }
|
||||
.insight-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.insight-text {
|
||||
flex: 1;
|
||||
}
|
||||
.insight-text .title {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.insight-text .detail {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
.insight-badge {
|
||||
padding: 4px 10px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<div class="page-title anim-fade">心情与天气</div>
|
||||
|
||||
<!-- Today's mood - using standardized mood: happy -->
|
||||
<div class="today-mood-card anim-slide" style="animation-delay: 0.1s">
|
||||
<div class="label">今日心情 · 5月31日</div>
|
||||
<div class="big-mood">😊</div>
|
||||
<div class="mood-text">开心的一天</div>
|
||||
<div class="mood-sub">在图书馆享受了安静的午后时光</div>
|
||||
</div>
|
||||
|
||||
<!-- Weather -->
|
||||
<div class="weather-card anim-fade" style="animation-delay: 0.15s">
|
||||
<h4>今日天气</h4>
|
||||
<div class="weather-row">
|
||||
<button class="weather-opt selected" aria-label="晴天">☀️<span>晴天</span></button>
|
||||
<button class="weather-opt" aria-label="多云">⛅<span>多云</span></button>
|
||||
<button class="weather-opt" aria-label="下雨">🌧<span>下雨</span></button>
|
||||
<button class="weather-opt" aria-label="下雪">❄️<span>下雪</span></button>
|
||||
<button class="weather-opt" aria-label="有风">🍃<span>有风</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mood chart - using standardized 5 moods -->
|
||||
<div class="mood-chart-card anim-fade" style="animation-delay: 0.2s">
|
||||
<h4>心情趋势</h4>
|
||||
<div class="chart-period">
|
||||
<button class="period-btn active" aria-label="近7天">近7天</button>
|
||||
<button class="period-btn" aria-label="近30天">近30天</button>
|
||||
<button class="period-btn" aria-label="近3月">近3月</button>
|
||||
</div>
|
||||
<div class="mood-line-chart">
|
||||
<div class="chart-bar" style="height:70%;background:var(--secondary)"><div class="tooltip">😊 开心</div><span class="chart-date">25日</span></div>
|
||||
<div class="chart-bar" style="height:50%;background:var(--tertiary)"><div class="tooltip">😐 平静</div><span class="chart-date">26日</span></div>
|
||||
<div class="chart-bar" style="height:85%;background:var(--secondary)"><div class="tooltip">😊 开心</div><span class="chart-date">27日</span></div>
|
||||
<div class="chart-bar" style="height:75%;background:var(--secondary)"><div class="tooltip">😊 开心</div><span class="chart-date">28日</span></div>
|
||||
<div class="chart-bar" style="height:90%;background:var(--secondary)"><div class="tooltip">😊 开心</div><span class="chart-date">29日</span></div>
|
||||
<div class="chart-bar" style="height:65%;background:var(--secondary)"><div class="tooltip">😊 开心</div><span class="chart-date">30日</span></div>
|
||||
<div class="chart-bar" style="height:88%;background:var(--secondary)"><div class="tooltip">😊 开心</div><span class="chart-date">31日</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Stats -->
|
||||
<div class="stats-grid anim-fade" style="animation-delay: 0.25s">
|
||||
<div class="stat-item">
|
||||
<div class="icon">😊</div>
|
||||
<div class="value">72%</div>
|
||||
<div class="desc">本月好心情占比</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="icon">🔥</div>
|
||||
<div class="value">12天</div>
|
||||
<div class="desc">最长连续记录</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="icon">☀️</div>
|
||||
<div class="value">18天</div>
|
||||
<div class="desc">晴天记录次数</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="icon">📝</div>
|
||||
<div class="value">28篇</div>
|
||||
<div class="desc">本月日记篇数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Insights -->
|
||||
<div class="insight-card anim-fade" style="animation-delay: 0.3s">
|
||||
<h4>心情洞察</h4>
|
||||
<div class="insight-item">
|
||||
<div class="insight-icon" style="background: var(--secondary-soft)">🌟</div>
|
||||
<div class="insight-text">
|
||||
<div class="title">最佳心情日</div>
|
||||
<div class="detail">5月14日 — 和朋友聚餐的日子</div>
|
||||
</div>
|
||||
<div class="insight-badge" style="background:var(--secondary-soft);color:#2D7D46">开心</div>
|
||||
</div>
|
||||
<div class="insight-item">
|
||||
<div class="insight-icon" style="background: var(--tertiary-soft)">💡</div>
|
||||
<div class="insight-text">
|
||||
<div class="title">开心触发因素</div>
|
||||
<div class="detail">你的好心情常与「朋友」「美食」「学习」相关</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="insight-item">
|
||||
<div class="insight-icon" style="background: var(--rose-soft)">📊</div>
|
||||
<div class="insight-text">
|
||||
<div class="title">心情较上月提升</div>
|
||||
<div class="detail">好心情天数增加了 15%</div>
|
||||
</div>
|
||||
<div class="insight-badge" style="background:var(--secondary-soft);color:#2D7D46">+15%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<nav class="tab-bar" role="tablist">
|
||||
<button class="tab-item" role="tab" aria-label="首页" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="日历" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="写日记" aria-selected="false" style="position:relative">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent-on)" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="发现" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item active" role="tab" aria-label="我的" aria-selected="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
310
docs/opendesign/screens/onboarding.html
Normal file
310
docs/opendesign/screens/onboarding.html
Normal file
@@ -0,0 +1,310 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 引导页</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.skip-btn {
|
||||
position: absolute;
|
||||
top: calc(var(--safe-top) + 8px);
|
||||
right: var(--space-5);
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
z-index: 50;
|
||||
padding: var(--space-2);
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
}
|
||||
|
||||
.slides-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 300%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
|
||||
.slide {
|
||||
width: 390px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: calc(var(--safe-top) + 48px) var(--space-8) calc(var(--safe-bottom) + 120px);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.slide-illustration {
|
||||
width: 260px;
|
||||
height: 260px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: var(--space-10);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.slide-illustration svg {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.slide-illustration::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 110%;
|
||||
height: 110%;
|
||||
border-radius: 50%;
|
||||
border: 2px dashed var(--border);
|
||||
animation: spin 20s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.slide-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
|
||||
.slide-desc {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
text-align: center;
|
||||
line-height: var(--leading-body);
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
/* Bottom controls */
|
||||
.onboarding-bottom {
|
||||
position: absolute;
|
||||
bottom: calc(var(--safe-bottom) + 24px);
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-6);
|
||||
padding: 0 var(--space-8);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.dots {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
.dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--border);
|
||||
transition: all var(--motion-base) var(--ease-bounce);
|
||||
}
|
||||
.dot.active {
|
||||
width: 28px;
|
||||
border-radius: 4px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
box-shadow: 0 4px 20px var(--shadow-accent);
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.next-btn:hover { transform: translateY(-1px); }
|
||||
.next-btn:active { transform: scale(0.98); }
|
||||
|
||||
/* Step-specific backgrounds */
|
||||
.step-1 .slide-illustration { background: linear-gradient(135deg, var(--surface-warm), color-mix(in oklab, var(--accent), transparent 70%)); }
|
||||
.step-2 .slide-illustration { background: linear-gradient(135deg, var(--secondary-soft), color-mix(in oklab, var(--secondary), transparent 85%)); }
|
||||
.step-3 .slide-illustration { background: linear-gradient(135deg, var(--tertiary-soft), color-mix(in oklab, var(--tertiary), transparent 80%)); }
|
||||
|
||||
/* Floating deco for each slide */
|
||||
.slide-deco {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
opacity: 0.12;
|
||||
}
|
||||
|
||||
.page-num {
|
||||
font-family: var(--font-display);
|
||||
font-size: 120px;
|
||||
font-weight: 800;
|
||||
opacity: 0.04;
|
||||
position: absolute;
|
||||
top: calc(var(--safe-top) + 20px);
|
||||
left: var(--space-5);
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<button class="skip-btn" aria-label="跳过引导" onclick="goToSlide(2)">跳过</button>
|
||||
|
||||
<div class="slides-wrapper" id="slidesWrapper">
|
||||
|
||||
<!-- Step 1: Record -->
|
||||
<div class="slide step-1">
|
||||
<div class="page-num" aria-hidden="true">01</div>
|
||||
<div class="slide-illustration anim-scale" style="animation-delay: 0.2s">
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" aria-hidden="true">
|
||||
<!-- Notebook -->
|
||||
<rect x="25" y="15" width="90" height="110" rx="8" fill="white" stroke="var(--accent)" stroke-width="2.5"/>
|
||||
<rect x="35" y="15" width="6" height="110" fill="var(--accent)" opacity="0.2"/>
|
||||
<path d="M50 40h42M50 55h35M50 70h42M50 85h28" stroke="var(--accent)" stroke-width="2" stroke-linecap="round" opacity="0.6"/>
|
||||
<!-- Pen -->
|
||||
<g transform="translate(95, 50) rotate(30)">
|
||||
<rect x="0" y="0" width="8" height="50" rx="4" fill="var(--secondary)"/>
|
||||
<polygon points="2,50 6,50 4,58" fill="#2D2420"/>
|
||||
</g>
|
||||
<!-- Heart sticker -->
|
||||
<g transform="translate(80, 25)">
|
||||
<path d="M8 4C8 1.8 6.2 0 4 0S0 1.8 0 4c0 4 8 8 8 8s8-4 8-8c0-2.2-1.8-4-4-4z" fill="var(--accent)" opacity="0.7" transform="scale(1.2)"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="slide-title anim-fade" style="animation-delay: 0.3s">用手账的方式<br>记录每一天</div>
|
||||
<p class="slide-desc anim-fade" style="animation-delay: 0.4s">
|
||||
文字、贴纸、涂鸦、照片 — 选择你喜欢的方式,把日常变成一本温暖的手账
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Step 2: Decorate -->
|
||||
<div class="slide step-2">
|
||||
<div class="page-num" aria-hidden="true">02</div>
|
||||
<div class="slide-illustration anim-scale" style="animation-delay: 0.2s">
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" aria-hidden="true">
|
||||
<!-- Sticker sheet -->
|
||||
<rect x="20" y="20" width="100" height="100" rx="12" fill="white" stroke="var(--secondary)" stroke-width="2"/>
|
||||
<!-- Stickers -->
|
||||
<circle cx="50" cy="48" r="14" fill="var(--tertiary)" opacity="0.8"/>
|
||||
<text x="50" y="53" text-anchor="middle" font-size="16" aria-hidden="true">☀️</text>
|
||||
<circle cx="85" cy="48" r="14" fill="var(--rose)" opacity="0.6"/>
|
||||
<text x="85" y="53" text-anchor="middle" font-size="16" aria-hidden="true">🌸</text>
|
||||
<circle cx="50" cy="85" r="14" fill="var(--secondary)" opacity="0.5"/>
|
||||
<text x="50" y="90" text-anchor="middle" font-size="16" aria-hidden="true">🌿</text>
|
||||
<circle cx="85" cy="85" r="14" fill="var(--accent)" opacity="0.5"/>
|
||||
<text x="85" y="90" text-anchor="middle" font-size="16" aria-hidden="true">✏️</text>
|
||||
<!-- Sparkles -->
|
||||
<path d="M30 25l2 4 4 2-4 2-2 4-2-4-4-2 4-2z" fill="var(--tertiary)"/>
|
||||
<path d="M108 30l2 3 3 2-3 1.5-2 3-1.5-3-3-1.5 3-2z" fill="var(--secondary)"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="slide-title anim-fade" style="animation-delay: 0.3s">海量贴纸与模板<br>随心装饰</div>
|
||||
<p class="slide-desc anim-fade" style="animation-delay: 0.4s">
|
||||
数百款手绘贴纸、精美模板和装饰素材,让你的日记独一无二
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Step 3: Growth -->
|
||||
<div class="slide step-3">
|
||||
<div class="page-num" aria-hidden="true">03</div>
|
||||
<div class="slide-illustration anim-scale" style="animation-delay: 0.2s">
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" aria-hidden="true">
|
||||
<!-- Calendar grid -->
|
||||
<rect x="20" y="25" width="100" height="95" rx="10" fill="white" stroke="var(--tertiary)" stroke-width="2"/>
|
||||
<rect x="20" y="25" width="100" height="24" rx="10" fill="var(--tertiary)" opacity="0.2"/>
|
||||
<text x="70" y="42" text-anchor="middle" font-size="11" fill="#2D2420" font-weight="600" aria-hidden="true">心情日历</text>
|
||||
<!-- Grid dots (mood indicators) -->
|
||||
<g transform="translate(30, 58)">
|
||||
<circle cx="0" cy="0" r="5" fill="var(--secondary)"/><circle cx="16" cy="0" r="5" fill="var(--accent)"/>
|
||||
<circle cx="32" cy="0" r="5" fill="var(--tertiary)"/><circle cx="48" cy="0" r="5" fill="var(--secondary)"/>
|
||||
<circle cx="64" cy="0" r="5" fill="var(--secondary)"/><circle cx="80" cy="0" r="5" fill="var(--rose)"/>
|
||||
<circle cx="0" cy="18" r="5" fill="var(--accent)"/><circle cx="16" cy="18" r="5" fill="var(--secondary)"/>
|
||||
<circle cx="32" cy="18" r="5" fill="var(--secondary)"/><circle cx="48" cy="18" r="5" fill="var(--tertiary)"/>
|
||||
<circle cx="64" cy="18" r="5" fill="var(--secondary)"/><circle cx="80" cy="18" r="5" fill="var(--accent)"/>
|
||||
<circle cx="0" cy="36" r="5" fill="var(--secondary)"/><circle cx="16" cy="36" r="5" fill="var(--tertiary)"/>
|
||||
<circle cx="32" cy="36" r="5" fill="var(--secondary)"/>
|
||||
</g>
|
||||
<!-- Growth arrow -->
|
||||
<g transform="translate(100, 105)">
|
||||
<path d="M0 0 L10 -20 L20 0" stroke="var(--secondary)" stroke-width="2" fill="none" stroke-linecap="round"/>
|
||||
<circle cx="10" cy="-22" r="3" fill="var(--secondary)"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="slide-title anim-fade" style="animation-delay: 0.3s">回顾成长轨迹<br>看见自己的变化</div>
|
||||
<p class="slide-desc anim-fade" style="animation-delay: 0.4s">
|
||||
心情追踪、日历回顾、统计洞察 — 不仅仅是记录,更是了解自己的旅程
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Bottom controls -->
|
||||
<div class="onboarding-bottom">
|
||||
<div class="dots" aria-hidden="true">
|
||||
<div class="dot active" id="dot0"></div>
|
||||
<div class="dot" id="dot1"></div>
|
||||
<div class="dot" id="dot2"></div>
|
||||
</div>
|
||||
<button class="next-btn" id="nextBtn" aria-label="下一步" onclick="nextSlide()">下一步</button>
|
||||
</div>
|
||||
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:50" aria-hidden="true"></div>
|
||||
|
||||
<script>
|
||||
let currentSlide = 0;
|
||||
const totalSlides = 3;
|
||||
const wrapper = document.getElementById('slidesWrapper');
|
||||
const dots = [document.getElementById('dot0'), document.getElementById('dot1'), document.getElementById('dot2')];
|
||||
const nextBtn = document.getElementById('nextBtn');
|
||||
|
||||
function goToSlide(index) {
|
||||
currentSlide = Math.min(index, totalSlides - 1);
|
||||
wrapper.style.transform = `translateX(-${currentSlide * 390}px)`;
|
||||
dots.forEach((d, i) => d.classList.toggle('active', i === currentSlide));
|
||||
nextBtn.textContent = currentSlide === totalSlides - 1 ? '开始使用' : '下一步';
|
||||
nextBtn.setAttribute('aria-label', currentSlide === totalSlides - 1 ? '开始使用暖记' : '下一步');
|
||||
}
|
||||
|
||||
function nextSlide() {
|
||||
if (currentSlide < totalSlides - 1) {
|
||||
goToSlide(currentSlide + 1);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
330
docs/opendesign/screens/profile.html
Normal file
330
docs/opendesign/screens/profile.html
Normal file
@@ -0,0 +1,330 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 个人中心</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px; height: 844px;
|
||||
overflow: hidden; background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute; top: 0; left: 0; right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto; padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* Profile header */
|
||||
.profile-header {
|
||||
text-align: center; padding: var(--space-5) 0;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.avatar {
|
||||
width: 80px; height: 80px; border-radius: 50%;
|
||||
background: linear-gradient(135deg, var(--accent), var(--tertiary));
|
||||
margin: 0 auto var(--space-3);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 36px;
|
||||
box-shadow: 0 4px 16px var(--shadow-input-focus);
|
||||
}
|
||||
.username {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl); font-weight: 700;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.bio {
|
||||
font-size: var(--text-sm); color: var(--muted);
|
||||
}
|
||||
|
||||
/* Stats bar */
|
||||
.stats-bar {
|
||||
display: flex; background: var(--surface);
|
||||
border-radius: var(--radius-md); padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft); border: 1px solid var(--border-soft);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.stat-item {
|
||||
flex: 1; text-align: center;
|
||||
border-right: 1px solid var(--border-soft);
|
||||
}
|
||||
.stat-item:last-child { border-right: none; }
|
||||
.stat-item .num {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl); font-weight: 700; color: var(--fg);
|
||||
}
|
||||
.stat-item .num.accent { color: var(--accent); }
|
||||
.stat-item .num.green { color: var(--secondary); }
|
||||
.stat-item .label {
|
||||
font-size: var(--text-xs); color: var(--muted); margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Achievement badges */
|
||||
.badge-section {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.badge-section h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg); font-weight: 700;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.badge-row {
|
||||
display: flex; gap: var(--space-3); overflow-x: auto;
|
||||
padding-bottom: var(--space-2);
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.badge-row::-webkit-scrollbar { display: none; }
|
||||
.badge-item {
|
||||
flex-shrink: 0; width: 80px;
|
||||
display: flex; flex-direction: column;
|
||||
align-items: center; gap: 6px;
|
||||
}
|
||||
.badge-icon {
|
||||
width: 56px; height: 56px; border-radius: 50%;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
.badge-name {
|
||||
font-size: 11px; color: var(--muted); text-align: center;
|
||||
font-weight: 500;
|
||||
}
|
||||
.badge-item.earned .badge-name { color: var(--fg-2); }
|
||||
|
||||
/* Settings list */
|
||||
.settings-section {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.settings-section h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg); font-weight: 700;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.settings-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
overflow: hidden;
|
||||
}
|
||||
.setting-item {
|
||||
display: flex; align-items: center;
|
||||
padding: var(--space-4) var(--space-5);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: background var(--motion-fast);
|
||||
min-height: 44px;
|
||||
}
|
||||
.setting-item:last-child { border-bottom: none; }
|
||||
.setting-item:hover { background: var(--surface-warm); }
|
||||
.setting-item .icon {
|
||||
width: 36px; height: 36px; border-radius: var(--radius-sm);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
margin-right: var(--space-3); font-size: 18px; flex-shrink: 0;
|
||||
}
|
||||
.setting-item .text {
|
||||
flex: 1;
|
||||
}
|
||||
.setting-item .text .title {
|
||||
font-size: var(--text-base); font-weight: 500; color: var(--fg);
|
||||
}
|
||||
.setting-item .text .sub {
|
||||
font-size: var(--text-xs); color: var(--muted); margin-top: 1px;
|
||||
}
|
||||
.setting-item .arrow {
|
||||
color: var(--meta);
|
||||
min-width: 44px; min-height: 44px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.setting-item .arrow svg { width: 16px; height: 16px; }
|
||||
|
||||
/* Toggle */
|
||||
.toggle {
|
||||
width: 44px; height: 26px; border-radius: 13px;
|
||||
background: var(--border); position: relative;
|
||||
cursor: pointer; transition: background var(--motion-fast);
|
||||
}
|
||||
.toggle.on { background: var(--accent); }
|
||||
.toggle::after {
|
||||
content: ''; position: absolute;
|
||||
top: 3px; left: 3px;
|
||||
width: 20px; height: 20px; border-radius: 50%;
|
||||
background: white; transition: transform var(--motion-fast);
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.15);
|
||||
}
|
||||
.toggle.on::after { transform: translateX(18px); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<!-- Profile -->
|
||||
<div class="profile-header anim-fade">
|
||||
<div class="avatar" aria-hidden="true">🐹</div>
|
||||
<div class="username">小暖</div>
|
||||
<div class="bio">每一天都值得被温柔记录</div>
|
||||
</div>
|
||||
|
||||
<!-- Stats -->
|
||||
<div class="stats-bar anim-fade" style="animation-delay: 0.1s">
|
||||
<div class="stat-item">
|
||||
<div class="num accent">156</div>
|
||||
<div class="label">总日记</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="num green">12</div>
|
||||
<div class="label">连续天数</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="num">28</div>
|
||||
<div class="label">本月日记</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="num">342</div>
|
||||
<div class="label">使用贴纸</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Achievements -->
|
||||
<div class="badge-section anim-fade" style="animation-delay: 0.15s">
|
||||
<h3>成就徽章</h3>
|
||||
<div class="badge-row">
|
||||
<div class="badge-item earned">
|
||||
<div class="badge-icon" style="background:var(--tertiary-soft)" aria-hidden="true">🔥</div>
|
||||
<div class="badge-name">7天连续</div>
|
||||
</div>
|
||||
<div class="badge-item earned">
|
||||
<div class="badge-icon" style="background:var(--secondary-soft)" aria-hidden="true">📝</div>
|
||||
<div class="badge-name">百篇日记</div>
|
||||
</div>
|
||||
<div class="badge-item earned">
|
||||
<div class="badge-icon" style="background:var(--rose-soft)" aria-hidden="true">🌸</div>
|
||||
<div class="badge-name">贴纸达人</div>
|
||||
</div>
|
||||
<div class="badge-item">
|
||||
<div class="badge-icon" style="background:var(--border-soft);opacity:0.5" aria-hidden="true">🏆</div>
|
||||
<div class="badge-name">年度记录</div>
|
||||
</div>
|
||||
<div class="badge-item">
|
||||
<div class="badge-icon" style="background:var(--border-soft);opacity:0.5" aria-hidden="true">⭐</div>
|
||||
<div class="badge-name">30天连续</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Settings -->
|
||||
<div class="settings-section anim-fade" style="animation-delay: 0.2s">
|
||||
<h3>设置</h3>
|
||||
<div class="settings-card">
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--tertiary-soft)" aria-hidden="true">🔔</div>
|
||||
<div class="text">
|
||||
<div class="title">日记提醒</div>
|
||||
<div class="sub">每天 21:00 提醒写日记</div>
|
||||
</div>
|
||||
<div class="toggle on" role="switch" aria-label="日记提醒开关" aria-checked="true" tabindex="0"></div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--secondary-soft)" aria-hidden="true">🔒</div>
|
||||
<div class="text">
|
||||
<div class="title">隐私锁</div>
|
||||
<div class="sub">Face ID 解锁查看日记</div>
|
||||
</div>
|
||||
<div class="arrow" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 12l4-4-4-4"/></svg></div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--secondary-soft)" aria-hidden="true">☁️</div>
|
||||
<div class="text">
|
||||
<div class="title">云端同步</div>
|
||||
<div class="sub">已同步 · 上次 2分钟前</div>
|
||||
</div>
|
||||
<div class="arrow" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 12l4-4-4-4"/></svg></div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--rose-soft)" aria-hidden="true">🎨</div>
|
||||
<div class="text">
|
||||
<div class="title">主题外观</div>
|
||||
<div class="sub">暖色系 · 默认字体</div>
|
||||
</div>
|
||||
<div class="arrow" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 12l4-4-4-4"/></svg></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- More settings -->
|
||||
<div class="settings-section anim-fade" style="animation-delay: 0.25s">
|
||||
<div class="settings-card">
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--surface-warm)" aria-hidden="true">📦</div>
|
||||
<div class="text">
|
||||
<div class="title">导出数据</div>
|
||||
</div>
|
||||
<div class="arrow" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 12l4-4-4-4"/></svg></div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--surface-warm)" aria-hidden="true">💬</div>
|
||||
<div of="text">
|
||||
<div class="title">意见反馈</div>
|
||||
</div>
|
||||
<div class="arrow" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 12l4-4-4-4"/></svg></div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<div class="icon" style="background:var(--surface-warm)" aria-hidden="true">ℹ️</div>
|
||||
<div class="text">
|
||||
<div class="title">关于暖记</div>
|
||||
<div class="sub">版本 1.0.0</div>
|
||||
</div>
|
||||
<div class="arrow" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 12l4-4-4-4"/></svg></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<nav class="tab-bar" role="tablist">
|
||||
<button class="tab-item" role="tab" aria-label="首页" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="日历" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="写日记" aria-selected="false" style="position:relative">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent-on)" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="发现" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item active" role="tab" aria-label="我的" aria-selected="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
507
docs/opendesign/screens/search.html
Normal file
507
docs/opendesign/screens/search.html
Normal file
@@ -0,0 +1,507 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 搜索</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Focus styles */
|
||||
button:focus-visible, a:focus-visible, input:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Search header */
|
||||
.search-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: calc(var(--safe-top) + 52px);
|
||||
padding-top: var(--safe-top);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding-left: var(--space-4);
|
||||
padding-right: var(--space-4);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
z-index: 100;
|
||||
}
|
||||
.search-back-btn {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: background var(--motion-fast);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.search-back-btn:hover { background: var(--surface-warm); }
|
||||
.search-back-btn svg { width: 22px; height: 22px; }
|
||||
|
||||
.search-input-wrap {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-input-wrap svg {
|
||||
position: absolute;
|
||||
left: var(--space-4);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
.search-input {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface-warm);
|
||||
padding: 0 var(--space-4) 0 44px;
|
||||
font-size: var(--text-base);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.search-input::placeholder { color: var(--meta); }
|
||||
|
||||
.search-cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--accent);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
transition: opacity var(--motion-fast);
|
||||
}
|
||||
.search-cancel-btn:hover { opacity: 0.7; }
|
||||
|
||||
/* Content area */
|
||||
.search-content {
|
||||
position: absolute;
|
||||
top: calc(var(--safe-top) + 52px);
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-5);
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.search-content::-webkit-scrollbar { display: none; }
|
||||
|
||||
/* Section */
|
||||
.search-section {
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.search-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.search-section-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.search-section-action {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* History / hot tags */
|
||||
.search-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.search-tag {
|
||||
padding: 6px 16px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.search-tag:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Result tabs */
|
||||
.result-tabs {
|
||||
display: flex;
|
||||
gap: var(--space-1);
|
||||
margin-bottom: var(--space-4);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.result-tab {
|
||||
padding: var(--space-3) var(--space-4);
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
position: relative;
|
||||
transition: color var(--motion-fast);
|
||||
}
|
||||
.result-tab.active { color: var(--accent); }
|
||||
.result-tab.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
left: var(--space-4);
|
||||
right: var(--space-4);
|
||||
height: 3px;
|
||||
border-radius: 2px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
/* Result card */
|
||||
.result-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
margin-bottom: var(--space-3);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.result-card:hover { transform: translateY(-1px); }
|
||||
.result-card:active { transform: scale(0.98); }
|
||||
.result-card-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.result-card-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
}
|
||||
.result-card-title mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-card-date {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
margin-left: var(--space-3);
|
||||
}
|
||||
.result-card-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.result-card-excerpt mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-card-tags {
|
||||
display: flex;
|
||||
gap: var(--space-1);
|
||||
margin-top: var(--space-2);
|
||||
}
|
||||
.result-card-tag {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--accent);
|
||||
background: var(--surface-warm);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-pill);
|
||||
}
|
||||
|
||||
/* Template result grid */
|
||||
.result-template-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.result-template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.result-template-card:hover { border-color: var(--accent); transform: translateY(-2px); }
|
||||
.result-template-icon { font-size: 32px; margin-bottom: var(--space-2); }
|
||||
.result-template-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.result-template-desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.dynamic-island {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 126px;
|
||||
height: 36px;
|
||||
background: #000;
|
||||
border-radius: 20px;
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
.home-indicator {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 134px;
|
||||
height: 5px;
|
||||
background: var(--fg);
|
||||
opacity: 0.2;
|
||||
border-radius: 3px;
|
||||
z-index: 101;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Search header -->
|
||||
<div class="search-header">
|
||||
<button class="search-back-btn" aria-label="返回">
|
||||
<svg viewBox="0 0 22 22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg>
|
||||
</button>
|
||||
<div class="search-input-wrap">
|
||||
<svg viewBox="0 0 22 22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><line x1="16" y1="16" x2="20" y2="20"/></svg>
|
||||
<input class="search-input" type="text" id="searchInput" placeholder="搜索日记、模板、标签..." autocomplete="off" aria-label="搜索" autofocus>
|
||||
</div>
|
||||
<button class="search-cancel-btn" aria-label="取消搜索">取消</button>
|
||||
</div>
|
||||
|
||||
<!-- Search content -->
|
||||
<div class="search-content">
|
||||
|
||||
<!-- Before-search state -->
|
||||
<div id="searchBefore">
|
||||
<!-- Search history -->
|
||||
<div class="search-section">
|
||||
<div class="search-section-header">
|
||||
<span class="search-section-title">最近搜索</span>
|
||||
<button class="search-section-action" aria-label="清除搜索历史">清除</button>
|
||||
</div>
|
||||
<div class="search-tags">
|
||||
<button class="search-tag" aria-label="搜索 期末考试">期末考试</button>
|
||||
<button class="search-tag" aria-label="搜索 读书笔记">读书笔记</button>
|
||||
<button class="search-tag" aria-label="搜索 旅行计划">旅行计划</button>
|
||||
<button class="search-tag" aria-label="搜索 心情">心情</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hot searches -->
|
||||
<div class="search-section">
|
||||
<div class="search-section-header">
|
||||
<span class="search-section-title">热门搜索</span>
|
||||
</div>
|
||||
<div class="search-tags">
|
||||
<button class="search-tag" aria-label="搜索 期末">#期末</button>
|
||||
<button class="search-tag" aria-label="搜索 读书">#读书</button>
|
||||
<button class="search-tag" aria-label="搜索 心情">#心情</button>
|
||||
<button class="search-tag" aria-label="搜索 旅行">#旅行</button>
|
||||
<button class="search-tag" aria-label="搜索 美食">#美食</button>
|
||||
<button class="search-tag" aria-label="搜索 学习">#学习</button>
|
||||
<button class="search-tag" aria-label="搜索 运动">#运动</button>
|
||||
<button class="search-tag" aria-label="搜索 灵感">#灵感</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- After-search state (results) -->
|
||||
<div id="searchResults" style="display:none">
|
||||
<!-- Result tabs -->
|
||||
<div class="result-tabs" role="tablist">
|
||||
<button class="result-tab active" role="tab" aria-label="全部结果" aria-selected="true">全部</button>
|
||||
<button class="result-tab" role="tab" aria-label="日记结果" aria-selected="false">日记</button>
|
||||
<button class="result-tab" role="tab" aria-label="模板结果" aria-selected="false">模板</button>
|
||||
<button class="result-tab" role="tab" aria-label="标签结果" aria-selected="false">标签</button>
|
||||
</div>
|
||||
|
||||
<!-- Diary results -->
|
||||
<div id="resultDiary">
|
||||
<div class="result-card" aria-label="打开日记 期末考试周复习计划">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">期末<mark>考试</mark>周复习计划</span>
|
||||
<span class="result-card-date">2025年12月15日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">今天开始了为期两周的期末<mark>考试</mark>复习,列了详细的计划表,每一科都安排了时间...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#期末</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="result-card" aria-label="打开日记 考研倒计时30天">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">考研倒计时30天</span>
|
||||
<span class="result-card-date">2025年11月25日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">距离考研还有30天,今天复习了英语阅读和政治,感觉<mark>考试</mark>越来越近了...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#考研</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="result-card" aria-label="打开日记 考试后的放松手账">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title"><mark>考试</mark>后的放松手账</span>
|
||||
<span class="result-card-date">2025年6月20日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">终于考完试了!用手账记录了<mark>考试</mark>结束那一刻的心情,画了一幅小小的庆祝插画...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#心情</span>
|
||||
<span class="result-card-tag">#手账</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Template results -->
|
||||
<div id="resultTemplates" style="display:none">
|
||||
<div class="result-template-grid">
|
||||
<div class="result-template-card" aria-label="使用模板 考试复习计划">
|
||||
<div class="result-template-icon">📝</div>
|
||||
<div class="result-template-name"><mark>考试</mark>复习计划</div>
|
||||
<div class="result-template-desc">适合期末<mark>考试</mark>周使用</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 学习打卡">
|
||||
<div class="result-template-icon">📚</div>
|
||||
<div class="result-template-name">学习打卡</div>
|
||||
<div class="result-template-desc">每日学习记录模板</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 成绩分析">
|
||||
<div class="result-template-icon">📊</div>
|
||||
<div class="result-template-name">成绩分析</div>
|
||||
<div class="result-template-desc"><mark>考试</mark>成绩复盘模板</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 目标追踪">
|
||||
<div class="result-template-icon">🎯</div>
|
||||
<div class="result-template-name">目标追踪</div>
|
||||
<div class="result-template-desc">学期目标追踪模板</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tag results -->
|
||||
<div id="resultTags" style="display:none">
|
||||
<div class="search-tags" style="gap: var(--space-3);">
|
||||
<button class="search-tag" style="padding: 10px 20px; font-size: var(--text-base);" aria-label="搜索标签 考试">#考试 (3篇)</button>
|
||||
<button class="search-tag" style="padding: 10px 20px; font-size: var(--text-base);" aria-label="搜索标签 考研">#考研 (2篇)</button>
|
||||
<button class="search-tag" style="padding: 10px 20px; font-size: var(--text-base);" aria-label="搜索标签 考试周">#考试周 (1篇)</button>
|
||||
<button class="search-tag" style="padding: 10px 20px; font-size: var(--text-base);" aria-label="搜索标签 复习">#复习 (5篇)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-6)"></div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" aria-hidden="true"></div>
|
||||
|
||||
<script>
|
||||
var input = document.getElementById('searchInput');
|
||||
var beforeEl = document.getElementById('searchBefore');
|
||||
var resultsEl = document.getElementById('searchResults');
|
||||
var resultTabs = document.querySelectorAll('.result-tab');
|
||||
var panels = ['resultDiary', 'resultTemplates', 'resultTags'];
|
||||
|
||||
// Simulate search on input
|
||||
input.addEventListener('input', function() {
|
||||
if (this.value.trim().length > 0) {
|
||||
beforeEl.style.display = 'none';
|
||||
resultsEl.style.display = '';
|
||||
} else {
|
||||
beforeEl.style.display = '';
|
||||
resultsEl.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
// Tag click triggers search
|
||||
document.querySelectorAll('.search-tag').forEach(function(tag) {
|
||||
tag.addEventListener('click', function() {
|
||||
input.value = this.textContent.trim();
|
||||
input.dispatchEvent(new Event('input'));
|
||||
});
|
||||
});
|
||||
|
||||
// Result tabs
|
||||
resultTabs.forEach(function(tab, idx) {
|
||||
tab.addEventListener('click', function() {
|
||||
resultTabs.forEach(function(t) { t.classList.remove('active'); t.setAttribute('aria-selected', 'false'); });
|
||||
tab.classList.add('active');
|
||||
tab.setAttribute('aria-selected', 'true');
|
||||
panels.forEach(function(p, i) {
|
||||
document.getElementById(p).style.display = i === idx ? '' : 'none';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Focus input on load
|
||||
input.focus();
|
||||
</script>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
208
docs/opendesign/screens/splash.html
Normal file
208
docs/opendesign/screens/splash.html
Normal file
@@ -0,0 +1,208 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 启动页</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(165deg, var(--bg) 0%, var(--tertiary-soft) 40%, color-mix(in oklab, var(--accent), transparent 50%) 100%);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Floating decorative elements */
|
||||
.deco {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.deco-star {
|
||||
width: 28px; height: 28px;
|
||||
opacity: 0.25;
|
||||
animation: float 4s ease-in-out infinite;
|
||||
}
|
||||
.deco-circle {
|
||||
border-radius: 50%;
|
||||
opacity: 0.12;
|
||||
animation: float 5s ease-in-out infinite reverse;
|
||||
}
|
||||
.deco-leaf {
|
||||
opacity: 0.15;
|
||||
animation: float 6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% { transform: translateY(0) rotate(0deg); }
|
||||
50% { transform: translateY(-10px) rotate(5deg); }
|
||||
}
|
||||
|
||||
.splash-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
z-index: 10;
|
||||
animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
|
||||
}
|
||||
|
||||
.app-icon {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin: 0 auto 28px;
|
||||
border-radius: 32px;
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 8px 32px var(--shadow-accent);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app-icon::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -30%;
|
||||
right: -30%;
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
background: rgba(255,255,255,0.2);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.app-icon svg {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.app-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: 42px;
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.app-tagline {
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-md);
|
||||
color: var(--muted);
|
||||
font-weight: 400;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.splash-bottom {
|
||||
position: absolute;
|
||||
bottom: calc(var(--safe-bottom) + 40px);
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
animation: fadeIn 1s 0.5s both;
|
||||
}
|
||||
|
||||
.splash-bottom .hint {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--meta);
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.splash-handwritten-tagline {
|
||||
font-family: var(--font-handwritten);
|
||||
font-size: 22px;
|
||||
color: var(--accent);
|
||||
margin-bottom: 20px;
|
||||
letter-spacing: 1px;
|
||||
animation: fadeIn 1s 0.3s both;
|
||||
}
|
||||
|
||||
.enter-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 16px 48px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
box-shadow: 0 4px 20px var(--shadow-accent);
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.enter-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--focus-ring); }
|
||||
.enter-btn:active { transform: scale(0.97); }
|
||||
|
||||
/* Decorative hand-drawn elements */
|
||||
.wavy-line {
|
||||
position: absolute;
|
||||
bottom: 180px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
opacity: 0.08;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Decorative floating elements -->
|
||||
<svg class="deco deco-star" style="top:120px;left:60px" viewBox="0 0 24 24" fill="var(--accent)" aria-hidden="true">
|
||||
<path d="M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z"/>
|
||||
</svg>
|
||||
<svg class="deco deco-star" style="top:200px;right:50px;animation-delay:-1.5s" viewBox="0 0 24 24" fill="var(--secondary)" aria-hidden="true">
|
||||
<path d="M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z"/>
|
||||
</svg>
|
||||
<div class="deco deco-circle" style="width:80px;height:80px;background:var(--tertiary);top:160px;right:80px;animation-delay:-2s" aria-hidden="true"></div>
|
||||
<div class="deco deco-circle" style="width:50px;height:50px;background:var(--rose);bottom:300px;left:40px;animation-delay:-3s" aria-hidden="true"></div>
|
||||
<svg class="deco deco-star" style="bottom:350px;right:70px;animation-delay:-2.5s" viewBox="0 0 24 24" fill="var(--tertiary)" aria-hidden="true">
|
||||
<path d="M12 2l2.4 7.4H22l-6.2 4.5 2.4 7.4L12 16.8l-6.2 4.5 2.4-7.4L2 9.4h7.6z"/>
|
||||
</svg>
|
||||
|
||||
<div class="splash-content">
|
||||
<div class="app-icon">
|
||||
<!-- Journal/notebook icon -->
|
||||
<svg viewBox="0 0 56 56" fill="none" aria-hidden="true">
|
||||
<rect x="10" y="6" width="36" height="44" rx="4" fill="white" fill-opacity="0.9"/>
|
||||
<rect x="14" y="6" width="4" height="44" fill="white" fill-opacity="0.3"/>
|
||||
<path d="M20 18h18M20 24h14M20 30h18M20 36h10" stroke="var(--accent)" stroke-width="2" stroke-linecap="round"/>
|
||||
<circle cx="42" cy="14" r="8" fill="var(--tertiary)" fill-opacity="0.6"/>
|
||||
<path d="M39 14l2 2 4-4" stroke="var(--accent)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="app-name">暖记</div>
|
||||
<div class="app-tagline">用温暖的方式,记录每一天</div>
|
||||
</div>
|
||||
|
||||
<div class="splash-bottom">
|
||||
<div class="splash-handwritten-tagline" aria-hidden="true">每一页,都是你的故事</div>
|
||||
<button class="enter-btn" aria-label="开始使用暖记">
|
||||
开始记录
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" aria-hidden="true">
|
||||
<path d="M4 10h12M11 5l5 5-5 5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="hint">每一天都值得被温柔记录</div>
|
||||
</div>
|
||||
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%)" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
431
docs/opendesign/screens/stickers.html
Normal file
431
docs/opendesign/screens/stickers.html
Normal file
@@ -0,0 +1,431 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 贴纸素材库</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: auto;
|
||||
padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
padding-bottom: var(--safe-bottom);
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
.top-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.top-bar h2 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.back-btn {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.back-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
/* Search */
|
||||
.search-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: var(--space-3) var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.search-box svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
|
||||
.search-box input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-size: var(--text-base);
|
||||
background: transparent;
|
||||
color: var(--fg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.search-box input::placeholder { color: var(--meta); }
|
||||
|
||||
/* Category tabs */
|
||||
.cat-tabs {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-5);
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
.cat-tabs::-webkit-scrollbar { display: none; }
|
||||
.cat-tab {
|
||||
padding: 8px 18px;
|
||||
min-height: 44px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--surface);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
color: var(--fg-2);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.cat-tab.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.cat-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Featured pack */
|
||||
.featured-pack {
|
||||
background: linear-gradient(135deg, var(--secondary-soft), var(--secondary-soft));
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast);
|
||||
}
|
||||
.featured-pack:hover { transform: translateY(-2px); }
|
||||
.featured-icon {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: var(--radius-md);
|
||||
background: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 36px;
|
||||
box-shadow: var(--elev-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.featured-info h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.featured-info p {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.featured-info .tag {
|
||||
display: inline-block;
|
||||
padding: 3px 10px;
|
||||
background: var(--secondary);
|
||||
color: var(--accent-on);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Sticker pack grid */
|
||||
.pack-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.pack-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.pack-card:hover { transform: translateY(-2px); box-shadow: var(--elev-medium); }
|
||||
.pack-preview {
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 36px;
|
||||
gap: 8px;
|
||||
}
|
||||
.pack-info {
|
||||
padding: var(--space-3) var(--space-4);
|
||||
}
|
||||
.pack-info h5 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.pack-info .count {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
.pack-info .price {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
margin-top: 4px;
|
||||
}
|
||||
.pack-info .free {
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
/* Individual stickers grid */
|
||||
.section-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.section-head h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.section-head a {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sticker-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.sticker-cell {
|
||||
aspect-ratio: 1;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
position: relative;
|
||||
min-height: 44px;
|
||||
}
|
||||
.sticker-cell:hover { transform: scale(1.08); border-color: var(--accent); }
|
||||
.sticker-cell:active { transform: scale(0.95); }
|
||||
.sticker-cell .fav {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: opacity var(--motion-fast);
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
padding: 13px;
|
||||
box-sizing: content-box;
|
||||
top: -8px;
|
||||
right: -8px;
|
||||
}
|
||||
.sticker-cell:hover .fav { opacity: 1; }
|
||||
.sticker-cell .fav svg { width: 10px; height: 10px; color: var(--rose); }
|
||||
.sticker-cell .fav.active svg { fill: var(--rose); }
|
||||
|
||||
/* Empty state for empty favorites */
|
||||
.empty-state {
|
||||
display: none; /* Shown via JS when favorites are empty */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-10) var(--space-5);
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state .empty-circle {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
border: 2px dashed var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: var(--space-4);
|
||||
font-size: 32px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.empty-state .empty-text {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.empty-state .empty-hint {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--meta);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<!-- Top bar -->
|
||||
<div class="top-bar anim-fade">
|
||||
<button class="back-btn" aria-label="返回">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M13 17l-6-6 6-6"/></svg>
|
||||
</button>
|
||||
<h2>贴纸素材</h2>
|
||||
<div style="width:44px"></div>
|
||||
</div>
|
||||
|
||||
<!-- Search -->
|
||||
<div class="search-box anim-fade" style="animation-delay: 0.05s">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="9" cy="9" r="6"/><path d="M14 14l4 4"/></svg>
|
||||
<input type="text" placeholder="搜索贴纸、素材包..." aria-label="搜索贴纸">
|
||||
</div>
|
||||
|
||||
<!-- Categories -->
|
||||
<div class="cat-tabs anim-fade" style="animation-delay: 0.1s">
|
||||
<button class="cat-tab active" aria-label="推荐分类">推荐</button>
|
||||
<button class="cat-tab" aria-label="可爱分类">可爱</button>
|
||||
<button class="cat-tab" aria-label="植物分类">植物</button>
|
||||
<button class="cat-tab" aria-label="手绘分类">手绘</button>
|
||||
<button class="cat-tab" aria-label="校园分类">校园</button>
|
||||
<button class="cat-tab" aria-label="节日分类">节日</button>
|
||||
<button class="cat-tab" aria-label="文字分类">文字</button>
|
||||
<button class="cat-tab" aria-label="和纸胶带分类">和纸胶带</button>
|
||||
</div>
|
||||
|
||||
<!-- Featured pack -->
|
||||
<div class="featured-pack anim-slide" style="animation-delay: 0.15s">
|
||||
<div class="featured-icon">🌸</div>
|
||||
<div class="featured-info">
|
||||
<h4>春日花园系列</h4>
|
||||
<p>32款手绘花卉贴纸,让你的日记春意盎然</p>
|
||||
<span class="tag">限时免费</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Pack grid -->
|
||||
<div class="section-head anim-fade" style="animation-delay: 0.2s">
|
||||
<h3>热门素材包</h3>
|
||||
<a href="#" aria-label="查看全部素材包">查看全部</a>
|
||||
</div>
|
||||
<div class="pack-grid anim-fade" style="animation-delay: 0.25s">
|
||||
<div class="pack-card">
|
||||
<div class="pack-preview" style="background: var(--tertiary-soft)">☕📚</div>
|
||||
<div class="pack-info">
|
||||
<h5>学习日常</h5>
|
||||
<div class="count">24款贴纸</div>
|
||||
<div class="price free">免费</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pack-card">
|
||||
<div class="pack-preview" style="background: var(--secondary-soft)">🌿🍃</div>
|
||||
<div class="pack-info">
|
||||
<h5>清新植物</h5>
|
||||
<div class="count">36款贴纸</div>
|
||||
<div class="price">¥6</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pack-card">
|
||||
<div class="pack-preview" style="background: var(--rose-soft)">🎀💕</div>
|
||||
<div class="pack-info">
|
||||
<h5>甜蜜少女</h5>
|
||||
<div class="count">28款贴纸</div>
|
||||
<div class="price">¥3</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pack-card">
|
||||
<div class="pack-preview" style="background: var(--secondary-soft)">🦋✨</div>
|
||||
<div class="pack-info">
|
||||
<h5>梦幻星空</h5>
|
||||
<div class="count">20款贴纸</div>
|
||||
<div class="price free">免费</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Individual stickers -->
|
||||
<div class="section-head anim-fade" style="animation-delay: 0.3s">
|
||||
<h3>精选贴纸</h3>
|
||||
<a href="#" aria-label="查看收藏夹">收藏夹</a>
|
||||
</div>
|
||||
<div class="sticker-grid anim-fade" style="animation-delay: 0.35s">
|
||||
<div class="sticker-cell" aria-label="樱花贴纸">🌸<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="星星贴纸">⭐<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="树叶贴纸">🌿<div class="fav active"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="太阳贴纸">☀️<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="蛋糕贴纸">🍰<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="音乐贴纸">🎵<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="书本贴纸">📚<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="月亮贴纸">🌙<div class="fav active"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="蝴蝶结贴纸">🎀<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="枫叶贴纸">🍂<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="咖啡贴纸">☕<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
<div class="sticker-cell" aria-label="蝴蝶贴纸">🦋<div class="fav"><svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M6 10s-4-2.5-4-5a2 2 0 014 0 2 2 0 014 0c0 2.5-4 5-4 5z"/></svg></div></div>
|
||||
</div>
|
||||
|
||||
<!-- Empty state for empty favorites (hidden by default) -->
|
||||
<div class="empty-state" id="emptyFavorites">
|
||||
<div class="empty-circle">💜</div>
|
||||
<div class="empty-text">收藏夹是空的</div>
|
||||
<div class="empty-hint">长按贴纸可添加到收藏夹</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
485
docs/opendesign/screens/tablet/calendar.html
Normal file
485
docs/opendesign/screens/tablet/calendar.html
Normal file
@@ -0,0 +1,485 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, height=768, initial-scale=1">
|
||||
<title>暖记 — 平板端日历</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.calendar-layout {
|
||||
display: flex;
|
||||
height: 768px;
|
||||
}
|
||||
|
||||
.sidebar { position: relative; flex-shrink: 0; }
|
||||
|
||||
.calendar-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Top bar */
|
||||
.cal-topbar {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-6);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.cal-topbar-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
.cal-topbar-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.cal-nav {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.cal-nav button {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.cal-nav button:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.cal-nav button svg { width: 16px; height: 16px; }
|
||||
|
||||
.view-toggle {
|
||||
display: flex;
|
||||
background: var(--surface-warm);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 3px;
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.view-toggle button {
|
||||
padding: 7px 18px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: transparent;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.view-toggle button.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
|
||||
/* Two-column: calendar left + timeline right */
|
||||
.cal-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cal-left {
|
||||
flex: 1;
|
||||
padding: var(--space-6);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
.cal-left::-webkit-scrollbar { width: 4px; }
|
||||
.cal-left::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.cal-right {
|
||||
width: 340px;
|
||||
background: var(--surface);
|
||||
border-left: 1px solid var(--border-soft);
|
||||
padding: var(--space-6);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.cal-right::-webkit-scrollbar { width: 4px; }
|
||||
.cal-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
/* Mood summary card */
|
||||
.mood-summary {
|
||||
background: var(--bg);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
margin-bottom: var(--space-5);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-summary h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.mood-bar-chart {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: var(--space-4);
|
||||
height: 80px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.mood-bar {
|
||||
flex: 1;
|
||||
border-radius: 6px 6px 0 0;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
padding-bottom: 4px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.mood-labels {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.mood-labels span {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Calendar grid */
|
||||
.weekday-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.weekday-row span {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--meta);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.calendar-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 4px;
|
||||
}
|
||||
.cal-day {
|
||||
aspect-ratio: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: all var(--motion-fast);
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg);
|
||||
gap: 2px;
|
||||
}
|
||||
.cal-day:hover { background: var(--surface-warm); }
|
||||
.cal-day.empty { cursor: default; }
|
||||
.cal-day.empty:hover { background: transparent; }
|
||||
.cal-day.today {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
font-weight: 700;
|
||||
}
|
||||
.cal-day.selected {
|
||||
background: var(--surface-warm);
|
||||
border: 2px solid var(--accent);
|
||||
}
|
||||
.cal-day.today.selected { background: var(--accent); border: 2px solid var(--accent); }
|
||||
.mood-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
}
|
||||
.mood-dot.happy { background: var(--secondary); }
|
||||
.mood-dot.love { background: var(--accent); }
|
||||
.mood-dot.calm { background: var(--tertiary); }
|
||||
.mood-dot.sad { background: #5B7DB1; }
|
||||
.mood-dot.tired { background: #8B7E74; }
|
||||
.entry-indicator {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 5px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
}
|
||||
.cal-day.today .entry-indicator { background: var(--accent-on); }
|
||||
|
||||
/* Timeline on right panel */
|
||||
.timeline-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.timeline-date {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
.timeline-item {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-4);
|
||||
position: relative;
|
||||
}
|
||||
.timeline-line {
|
||||
width: 2px;
|
||||
background: var(--border);
|
||||
position: absolute;
|
||||
left: 17px;
|
||||
top: 38px;
|
||||
bottom: -12px;
|
||||
}
|
||||
.timeline-item:last-child .timeline-line { display: none; }
|
||||
|
||||
.timeline-dot {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
background: var(--bg);
|
||||
border: 2px solid var(--border-soft);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.timeline-content {
|
||||
flex: 1;
|
||||
background: var(--bg);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast);
|
||||
}
|
||||
.timeline-content:hover { transform: translateY(-1px); }
|
||||
|
||||
.tl-time {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.tl-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.tl-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="calendar-layout">
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" role="navigation" aria-label="主导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item" role="button" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item active" role="button" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="心情追踪">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="贴纸库">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg>
|
||||
贴纸库
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="模板">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
模板
|
||||
</button>
|
||||
</div>
|
||||
<button class="sidebar-write-btn" aria-label="写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
|
||||
写日记
|
||||
</button>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="calendar-main" role="main">
|
||||
<!-- Top bar -->
|
||||
<div class="cal-topbar">
|
||||
<div class="cal-topbar-left">
|
||||
<div class="cal-topbar-title">日历</div>
|
||||
<div class="cal-nav">
|
||||
<button aria-label="上一月"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M10 14l-5-5 5-5"/></svg></button>
|
||||
<button aria-label="下一月"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M6 2l5 5-5 5"/></svg></button>
|
||||
</div>
|
||||
<span style="font-size:var(--text-base);color:var(--fg-2);font-weight:500">2026年5月</span>
|
||||
</div>
|
||||
<div class="view-toggle">
|
||||
<button class="active">月视图</button>
|
||||
<button>周视图</button>
|
||||
<button>时间轴</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calendar + Timeline -->
|
||||
<div class="cal-body">
|
||||
<div class="cal-left">
|
||||
<!-- Mood summary -->
|
||||
<div class="mood-summary">
|
||||
<h4>本月心情概览</h4>
|
||||
<div class="mood-bar-chart">
|
||||
<div class="mood-bar" style="height:65%;background:var(--secondary)">😊</div>
|
||||
<div class="mood-bar" style="height:45%;background:var(--accent)">🥰</div>
|
||||
<div class="mood-bar" style="height:30%;background:var(--tertiary)">😌</div>
|
||||
<div class="mood-bar" style="height:15%;background:#5B7DB1">😔</div>
|
||||
<div class="mood-bar" style="height:20%;background:#8B7E74">😴</div>
|
||||
</div>
|
||||
<div class="mood-labels">
|
||||
<span>开心 12天</span>
|
||||
<span>幸福 8天</span>
|
||||
<span>平静 5天</span>
|
||||
<span>低落 2天</span>
|
||||
<span>疲惫 3天</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Calendar grid -->
|
||||
<div class="weekday-row">
|
||||
<span>日</span><span>一</span><span>二</span><span>三</span><span>四</span><span>五</span><span>六</span>
|
||||
</div>
|
||||
<div class="calendar-grid">
|
||||
<div class="cal-day empty"></div><div class="cal-day empty"></div><div class="cal-day empty"></div><div class="cal-day empty"></div><div class="cal-day empty"></div>
|
||||
<div class="cal-day" data-day="1"><span>1</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day" data-day="2"><span>2</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="3"><span>3</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="4"><span>4</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="5"><span>5</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="6"><span>6</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day" data-day="7"><span>7</span><div class="mood-dot tired"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="8"><span>8</span><div class="mood-dot happy"></div></div>
|
||||
<div class="cal-day" data-day="9"><span>9</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="10"><span>10</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="11"><span>11</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="12"><span>12</span><div class="mood-dot tired"></div></div>
|
||||
<div class="cal-day" data-day="13"><span>13</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="14"><span>14</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="15"><span>15</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="16"><span>16</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="17"><span>17</span><div class="mood-dot sad"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="18"><span>18</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="19"><span>19</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="20"><span>20</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="21"><span>21</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="22"><span>22</span><div class="mood-dot tired"></div></div>
|
||||
<div class="cal-day" data-day="23"><span>23</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="24"><span>24</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="25"><span>25</span><div class="mood-dot calm"></div></div>
|
||||
<div class="cal-day" data-day="26"><span>26</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="27"><span>27</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="28"><span>28</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="29"><span>29</span><div class="mood-dot love"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day" data-day="30"><span>30</span><div class="mood-dot happy"></div><div class="entry-indicator"></div></div>
|
||||
<div class="cal-day today selected" data-day="31"><span>31</span><div class="mood-dot love" style="background:var(--accent-on)"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right timeline panel -->
|
||||
<aside class="cal-right" role="complementary" aria-label="日期详情">
|
||||
<div class="timeline-title">5月31日 · 今天</div>
|
||||
<div class="timeline-date">3条记录</div>
|
||||
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line"></div>
|
||||
<div class="timeline-dot">🥰</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">14:30 · 心情: 幸福</div>
|
||||
<div class="tl-title">图书馆的午后时光</div>
|
||||
<div class="tl-excerpt">今天下午去图书馆自习,阳光从窗外洒进来,暖暖的...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line"></div>
|
||||
<div class="timeline-dot">😊</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">09:15 · 心情: 开心</div>
|
||||
<div class="tl-title">周末早起的奖励</div>
|
||||
<div class="tl-excerpt">难得周末早起,去食堂吃了喜欢的豆浆油条...</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timeline-item">
|
||||
<div class="timeline-line"></div>
|
||||
<div class="timeline-dot">😌</div>
|
||||
<div class="timeline-content">
|
||||
<div class="tl-time">07:00 · 心情: 平静</div>
|
||||
<div class="tl-title">晨跑记录</div>
|
||||
<div class="tl-excerpt">早起跑了两圈操场,空气很清新...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
638
docs/opendesign/screens/tablet/discover.html
Normal file
638
docs/opendesign/screens/tablet/discover.html
Normal file
@@ -0,0 +1,638 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, height=768, initial-scale=1">
|
||||
<title>暖记 — 平板端发现</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.main-content { height: 768px; }
|
||||
|
||||
.content-inner {
|
||||
padding: var(--space-6) var(--space-8);
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* Page header */
|
||||
.page-header {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.page-header h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-3xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.page-header-sub {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
margin-top: var(--space-1);
|
||||
}
|
||||
|
||||
/* Search bar */
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: var(--space-3) var(--space-5);
|
||||
margin-bottom: var(--space-6);
|
||||
border: 1px solid var(--border-soft);
|
||||
box-shadow: var(--elev-soft);
|
||||
transition: border-color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.search-bar:focus-within {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.search-bar svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.search-bar input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
background: none;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-md);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
}
|
||||
.search-bar input::placeholder {
|
||||
color: var(--meta);
|
||||
}
|
||||
|
||||
/* Two-column layout */
|
||||
.discover-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
|
||||
.left-col,
|
||||
.right-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
/* Section heading */
|
||||
.section-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.section-heading h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.section-heading .more {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-weight: 500;
|
||||
min-height: var(--touch-min);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.section-heading .more:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Topics */
|
||||
.topics-scroll {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.topic-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
padding: var(--space-2) var(--space-4);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
color: var(--fg-2);
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
min-height: var(--touch-min);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.topic-chip:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
.topic-chip:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
.topic-chip.active {
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.topic-chip .emoji {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Expert diary cards */
|
||||
.experts-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.expert-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.expert-card:hover { transform: translateY(-1px); }
|
||||
.expert-card:active { transform: scale(0.98); }
|
||||
.expert-avatar {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.expert-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.expert-name {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.expert-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.expert-preview {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.expert-likes {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.expert-likes svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: var(--rose);
|
||||
}
|
||||
|
||||
/* Inspiration card */
|
||||
.inspiration-card {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-6);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.inspiration-card:hover { transform: translateY(-2px); }
|
||||
.inspiration-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
right: -30px;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.inspiration-card::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 40px;
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.08);
|
||||
}
|
||||
.inspiration-label {
|
||||
font-size: var(--text-xs);
|
||||
color: rgba(255,255,255,0.7);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.inspiration-body {
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
align-items: center;
|
||||
}
|
||||
.inspiration-thumb {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
border-radius: var(--radius-md);
|
||||
background: rgba(255,255,255,0.2);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 40px;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.inspiration-info {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.inspiration-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.inspiration-author {
|
||||
font-size: var(--text-sm);
|
||||
color: rgba(255,255,255,0.75);
|
||||
}
|
||||
|
||||
/* Templates grid */
|
||||
.templates-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.template-card:hover { transform: translateY(-2px); }
|
||||
.template-card:active { transform: scale(0.97); }
|
||||
.template-thumb {
|
||||
height: 90px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
}
|
||||
.template-info {
|
||||
padding: var(--space-3);
|
||||
}
|
||||
.template-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-1);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.template-users {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.template-users svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-state {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-10) var(--space-5);
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state.visible {
|
||||
display: flex;
|
||||
}
|
||||
.empty-state .icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: var(--space-4);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.empty-state .text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.empty-state .subtext {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.5s var(--ease-standard) both; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.inspiration-card,
|
||||
.template-card,
|
||||
.expert-card,
|
||||
.topic-chip {
|
||||
transition: none;
|
||||
}
|
||||
.anim-fade { animation: none; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" aria-label="侧边导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="心情追踪">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="贴纸库">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg>
|
||||
贴纸库
|
||||
</button>
|
||||
<button class="sidebar-nav-item" aria-label="模板">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
模板
|
||||
</button>
|
||||
<button class="sidebar-nav-item active" aria-label="发现">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
发现
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="sidebar-write-btn" aria-label="写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
|
||||
写日记
|
||||
</button>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="main-content">
|
||||
<div class="content-inner">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="page-header anim-fade" data-od-id="discover-header">
|
||||
<h1>发现</h1>
|
||||
<div class="page-header-sub">探索灵感、模板和有趣的日记</div>
|
||||
</div>
|
||||
|
||||
<!-- Search bar -->
|
||||
<div class="search-bar anim-fade" style="animation-delay:0.05s" data-od-id="discover-search">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
|
||||
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
||||
</svg>
|
||||
<input type="text" placeholder="搜索日记、模板、话题..." aria-label="搜索日记、模板、话题">
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
<div class="empty-state" data-od-id="discover-empty" role="status">
|
||||
<span class="icon" aria-hidden="true">🔍</span>
|
||||
<div class="text">没有找到相关内容</div>
|
||||
<div class="subtext">换个关键词试试吧</div>
|
||||
</div>
|
||||
|
||||
<!-- Two-column grid -->
|
||||
<div class="discover-grid anim-fade" style="animation-delay:0.1s">
|
||||
|
||||
<!-- Left column: topics + experts -->
|
||||
<div class="left-col">
|
||||
|
||||
<!-- Hot topics -->
|
||||
<section data-od-id="discover-topics" aria-label="热门话题">
|
||||
<div class="section-heading">
|
||||
<h3>热门话题</h3>
|
||||
<button class="more" aria-label="查看更多话题">更多</button>
|
||||
</div>
|
||||
<div class="topics-scroll" role="list">
|
||||
<button class="topic-chip active" role="listitem" aria-label="话题:期末备考">
|
||||
<span class="emoji" aria-hidden="true">📚</span>#期末备考
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:读书笔记">
|
||||
<span class="emoji" aria-hidden="true">📖</span>#读书笔记
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:旅行手账">
|
||||
<span class="emoji" aria-hidden="true">✈️</span>#旅行手账
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:美食记录">
|
||||
<span class="emoji" aria-hidden="true">🍜</span>#美食记录
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:校园生活">
|
||||
<span class="emoji" aria-hidden="true">🎓</span>#校园生活
|
||||
</button>
|
||||
<button class="topic-chip" role="listitem" aria-label="话题:自我成长">
|
||||
<span class="emoji" aria-hidden="true">🌱</span>#自我成长
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Expert diaries -->
|
||||
<section data-od-id="discover-experts" aria-label="达人日记">
|
||||
<div class="section-heading">
|
||||
<h3>达人日记</h3>
|
||||
<button class="more" aria-label="查看更多达人日记">更多</button>
|
||||
</div>
|
||||
<div class="experts-list">
|
||||
<div class="expert-card" role="article" aria-label="达人日记:我的大学生活第100天">
|
||||
<div class="expert-avatar" style="background: var(--tertiary-soft)" aria-hidden="true">🌸</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">小暖</div>
|
||||
<div class="expert-title">我的大学生活第100天</div>
|
||||
<div class="expert-preview">不知不觉大学生活已经过了100天了,从最初的迷茫到现在的适应,记录下这段珍贵的时光...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
328
|
||||
</div>
|
||||
</div>
|
||||
<div class="expert-card" role="article" aria-label="达人日记:考研倒计时30天手账">
|
||||
<div class="expert-avatar" style="background: var(--secondary-soft)" aria-hidden="true">✏️</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">手账少女</div>
|
||||
<div class="expert-title">考研倒计时30天手账</div>
|
||||
<div class="expert-preview">最后冲刺阶段,用手账记录每一天的复习进度和心情变化,给自己加油打气...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
512
|
||||
</div>
|
||||
</div>
|
||||
<div class="expert-card" role="article" aria-label="达人日记:秋日校园手账记录">
|
||||
<div class="expert-avatar" style="background: var(--rose-soft)" aria-hidden="true">🍂</div>
|
||||
<div class="expert-info">
|
||||
<div class="expert-name">阿月</div>
|
||||
<div class="expert-title">秋日校园手账记录</div>
|
||||
<div class="expert-preview">银杏叶黄了,校园美得像画一样。收集了几片落叶夹在手账里,记录这个温柔的秋天...</div>
|
||||
</div>
|
||||
<div class="expert-likes">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 14s-5.5-3.5-5.5-7.5C2.5 3.5 4 2 5.75 2 6.86 2 7.86 2.56 8 3.5 8.14 2.56 9.14 2 10.25 2 12 2 13.5 3.5 13.5 6.5 13.5 10.5 8 14 8 14z"/></svg>
|
||||
276
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Right column: templates + inspiration -->
|
||||
<div class="right-col">
|
||||
|
||||
<!-- Featured templates -->
|
||||
<section data-od-id="discover-templates" aria-label="精选模板">
|
||||
<div class="section-heading">
|
||||
<h3>精选模板</h3>
|
||||
<button class="more" aria-label="查看更多模板">更多</button>
|
||||
</div>
|
||||
<div class="templates-grid">
|
||||
<div class="template-card" role="article" aria-label="模板:考试周复习计划">
|
||||
<div class="template-thumb" style="background: var(--tertiary-soft)" aria-hidden="true">📝</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">考试周复习计划</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
2.3k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:读书笔记手账">
|
||||
<div class="template-thumb" style="background: var(--secondary-soft)" aria-hidden="true">📖</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">读书笔记手账</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
1.8k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:月度心情打卡">
|
||||
<div class="template-thumb" style="background: var(--rose-soft)" aria-hidden="true">💫</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">月度心情打卡</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
3.1k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-card" role="article" aria-label="模板:旅行日记模板">
|
||||
<div class="template-thumb" style="background: var(--surface-warm)" aria-hidden="true">🗺️</div>
|
||||
<div class="template-info">
|
||||
<div class="template-name">旅行日记模板</div>
|
||||
<div class="template-users">
|
||||
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M10 3a3 3 0 11-6 0 3 3 0 016 0zM2 14v-1a4 4 0 014-4h4a4 4 0 014 4v1"/></svg>
|
||||
1.5k 人使用
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Daily inspiration -->
|
||||
<section data-od-id="discover-inspiration" aria-label="每日灵感">
|
||||
<div class="section-heading">
|
||||
<h3>每日灵感</h3>
|
||||
<button class="more" aria-label="查看更多灵感">更多</button>
|
||||
</div>
|
||||
<div class="inspiration-card" role="article" aria-label="今日灵感推荐:旅行手账排版技巧">
|
||||
<div class="inspiration-label">今日推荐</div>
|
||||
<div class="inspiration-body">
|
||||
<div class="inspiration-thumb" aria-hidden="true">🗺️</div>
|
||||
<div class="inspiration-info">
|
||||
<div class="inspiration-title">旅行手账排版技巧</div>
|
||||
<div class="inspiration-author">by 手账达人小林</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
892
docs/opendesign/screens/tablet/editor.html
Normal file
892
docs/opendesign/screens/tablet/editor.html
Normal file
@@ -0,0 +1,892 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, height=768, initial-scale=1">
|
||||
<title>暖记 — 平板端编辑器</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="../css/editor-common.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
/* Editor layout: sidebar + canvas + side panel */
|
||||
.editor-layout {
|
||||
display: flex;
|
||||
height: 768px;
|
||||
}
|
||||
|
||||
.sidebar { position: relative; flex-shrink: 0; }
|
||||
|
||||
.editor-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Top bar */
|
||||
.editor-topbar {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-6);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.topbar-left, .topbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.topbar-btn {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.topbar-btn:hover { background: var(--surface-warm); }
|
||||
.topbar-btn svg { width: 20px; height: 20px; }
|
||||
.topbar-center {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.save-btn {
|
||||
padding: 10px 24px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.save-btn:hover { background: var(--accent-hover); }
|
||||
|
||||
/* Undo/Redo */
|
||||
.topbar-undo-redo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.undo-btn, .redo-btn {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.undo-btn:hover:not(:disabled), .redo-btn:hover:not(:disabled) { background: var(--surface-warm); color: var(--fg); }
|
||||
.undo-btn:disabled, .redo-btn:disabled { opacity: 0.35; cursor: default; }
|
||||
.undo-btn svg, .redo-btn svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Auto-save */
|
||||
.autosave-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
font-size: 11px;
|
||||
color: var(--success);
|
||||
font-weight: 500;
|
||||
}
|
||||
.autosave-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: var(--success);
|
||||
}
|
||||
|
||||
/* Canvas + Panel split */
|
||||
.editor-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Canvas area */
|
||||
.canvas-wrapper {
|
||||
flex: 1;
|
||||
padding: var(--space-6);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
.canvas-wrapper::-webkit-scrollbar { width: 4px; }
|
||||
.canvas-wrapper::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.canvas-paper {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--elev-medium);
|
||||
border: 1px solid var(--border-soft);
|
||||
padding: var(--space-8);
|
||||
min-height: 600px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.canvas-grid {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
|
||||
background-size: 28px 28px;
|
||||
opacity: 0.4;
|
||||
pointer-events: none;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.washi-tape {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 40px;
|
||||
width: 110px;
|
||||
height: 22px;
|
||||
background: repeating-linear-gradient(45deg, var(--tertiary), var(--tertiary) 4px, var(--surface-warm) 4px, var(--surface-warm) 8px);
|
||||
transform: rotate(-8deg);
|
||||
border-radius: 2px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.placed-sticker {
|
||||
position: absolute;
|
||||
font-size: 36px;
|
||||
cursor: move;
|
||||
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
|
||||
}
|
||||
|
||||
.journal-content { position: relative; z-index: 1; }
|
||||
|
||||
.journal-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-4);
|
||||
border: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.format-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-2) 0;
|
||||
margin-bottom: var(--space-4);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
.format-btn {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.format-btn:hover { background: var(--surface-warm); color: var(--fg); }
|
||||
.format-btn.active { background: var(--accent); color: var(--accent-on); }
|
||||
.format-divider { width: 1px; height: 22px; background: var(--border); }
|
||||
.color-dot {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.color-dot:hover { transform: scale(1.15); }
|
||||
.color-dot.active { border-color: var(--fg); }
|
||||
|
||||
.journal-body {
|
||||
font-size: var(--text-base);
|
||||
line-height: 1.9;
|
||||
color: var(--fg-2);
|
||||
border: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
resize: none;
|
||||
min-height: 240px;
|
||||
}
|
||||
|
||||
.placed-photo {
|
||||
width: 100%;
|
||||
height: 160px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: linear-gradient(135deg, var(--secondary-soft), var(--secondary-soft));
|
||||
margin: var(--space-5) 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Right panel */
|
||||
.tool-panel-side {
|
||||
width: 320px;
|
||||
background: var(--surface);
|
||||
border-left: 1px solid var(--border-soft);
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tool-panel-side::-webkit-scrollbar { width: 4px; }
|
||||
.tool-panel-side::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
.panel-header {
|
||||
padding: var(--space-5);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.panel-tab {
|
||||
padding: 8px 16px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.panel-tab.active { background: var(--accent); color: var(--accent-on); }
|
||||
|
||||
.panel-content {
|
||||
padding: var(--space-5);
|
||||
}
|
||||
|
||||
.sticker-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.sticker-item {
|
||||
aspect-ratio: 1;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--surface-warm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.sticker-item:hover { transform: scale(1.1); border-color: var(--accent); }
|
||||
|
||||
.date-strip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-3) var(--space-6);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.date-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
}
|
||||
.date-info strong { color: var(--fg); font-weight: 600; }
|
||||
.mood-quick { display: flex; gap: 6px; }
|
||||
.mood-mini {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 15px;
|
||||
background: var(--surface);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.mood-mini.selected { border-color: var(--accent); background: var(--surface-warm); }
|
||||
|
||||
/* Brush tool panel */
|
||||
.brush-section-title {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.brush-tools-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.brush-tool-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-2) var(--space-3);
|
||||
border-radius: var(--radius-sm);
|
||||
border: 2px solid transparent;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
color: var(--muted);
|
||||
transition: all var(--motion-fast);
|
||||
width: 100%;
|
||||
}
|
||||
.brush-tool-item:hover { background: var(--surface-warm); color: var(--fg); }
|
||||
.brush-tool-item.active { border-color: var(--accent); color: var(--accent); background: var(--surface-warm); }
|
||||
.brush-tool-item svg { width: 22px; height: 22px; flex-shrink: 0; }
|
||||
.brush-tool-item span { font-size: var(--text-sm); font-weight: 500; }
|
||||
|
||||
.brush-size-preview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 32px;
|
||||
background: var(--surface-warm);
|
||||
border-radius: var(--radius-sm);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.brush-size-line {
|
||||
width: 80%;
|
||||
border-radius: 4px;
|
||||
background: var(--fg);
|
||||
transition: height var(--motion-fast);
|
||||
}
|
||||
.brush-size-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.brush-size-value {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
min-width: 36px;
|
||||
text-align: right;
|
||||
}
|
||||
.brush-slider {
|
||||
flex: 1;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
height: 4px;
|
||||
border-radius: 2px;
|
||||
background: var(--border);
|
||||
outline: none;
|
||||
}
|
||||
.brush-slider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
cursor: pointer;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
.brush-colors-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.brush-color-dot {
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 50%;
|
||||
border: 3px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.brush-color-dot:hover { transform: scale(1.1); }
|
||||
.brush-color-dot.active { border-color: var(--fg); box-shadow: 0 0 0 2px var(--surface); }
|
||||
|
||||
.brush-opacity-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
transition: opacity var(--motion-fast);
|
||||
}
|
||||
.brush-opacity-row.disabled { opacity: 0.35; pointer-events: none; }
|
||||
.brush-opacity-label {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
min-width: 40px;
|
||||
}
|
||||
.brush-opacity-value {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
min-width: 36px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Tags panel */
|
||||
.tags-section {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.tags-section-title {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.tag-selected-area {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
min-height: 36px;
|
||||
}
|
||||
.tag-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 12px;
|
||||
border-radius: 9999px;
|
||||
background: var(--surface-warm);
|
||||
color: var(--accent);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.tag-pill .remove {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
color: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
line-height: 1;
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.tag-pill .remove:hover { background: var(--accent-hover); }
|
||||
.tag-input-row {
|
||||
display: flex;
|
||||
}
|
||||
.tag-input {
|
||||
flex: 1;
|
||||
height: 44px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 0 var(--space-4);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg);
|
||||
background: var(--bg);
|
||||
outline: none;
|
||||
transition: border-color var(--motion-fast);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.tag-input::placeholder { color: var(--meta); }
|
||||
.tag-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--shadow-input-focus); }
|
||||
.tag-suggest-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.tag-suggest-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 6px 14px;
|
||||
border-radius: 9999px;
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
min-height: 44px;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.tag-suggest-item:hover { border-color: var(--accent); color: var(--accent); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="editor-layout">
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" role="navigation" aria-label="主导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="editor-main">
|
||||
<!-- Top bar -->
|
||||
<div class="editor-topbar">
|
||||
<div class="topbar-left">
|
||||
<button class="topbar-btn" aria-label="返回">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M15 18l-6-6 6-6"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="topbar-center">5月31日 · 周日</div>
|
||||
<div class="topbar-right">
|
||||
<div class="topbar-undo-redo">
|
||||
<button class="undo-btn" disabled aria-label="撤销">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10h10a5 5 0 015 5v2"/><polyline points="3 10 7 6"/><polyline points="3 10 7 14"/></svg>
|
||||
</button>
|
||||
<button class="redo-btn" disabled aria-label="重做">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10H11a5 5 0 00-5 5v2"/><polyline points="21 10 17 6"/><polyline points="21 10 17 14"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="autosave-status" aria-live="polite">
|
||||
<span class="autosave-dot"></span>
|
||||
<span>已保存</span>
|
||||
</div>
|
||||
<button class="topbar-btn" aria-label="上传">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 12v6h14v-6"/><polyline points="14 6 10 2 6 6"/><line x1="10" y1="2" x2="10" y2="13"/></svg>
|
||||
</button>
|
||||
<button class="save-btn">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Date strip -->
|
||||
<div class="date-strip">
|
||||
<div class="date-info">
|
||||
<strong>14:32</strong>
|
||||
<span>· 晴 26°</span>
|
||||
</div>
|
||||
<div class="mood-quick">
|
||||
<div class="mood-mini">😊</div>
|
||||
<div class="mood-mini selected">🥰</div>
|
||||
<div class="mood-mini">😌</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Canvas + Side Panel -->
|
||||
<div class="editor-body">
|
||||
<div class="canvas-wrapper">
|
||||
<div class="canvas-paper">
|
||||
<div class="canvas-grid"></div>
|
||||
<div class="washi-tape"></div>
|
||||
<div class="placed-sticker" style="top:10px;left:10px">🌸</div>
|
||||
<div class="placed-sticker" style="top:180px;right:16px">✨</div>
|
||||
|
||||
<div class="journal-content">
|
||||
<input class="journal-title" type="text" value="图书馆的午后时光" placeholder="给日记起个标题...">
|
||||
|
||||
<div class="format-bar">
|
||||
<button class="format-btn active" style="font-weight:800">B</button>
|
||||
<button class="format-btn" style="font-style:italic">I</button>
|
||||
<button class="format-btn" style="text-decoration:underline">U</button>
|
||||
<div class="format-divider"></div>
|
||||
<div class="color-dot active" style="background:#2D2420"></div>
|
||||
<div class="color-dot" style="background:var(--accent)"></div>
|
||||
<div class="color-dot" style="background:var(--secondary)"></div>
|
||||
<div class="color-dot" style="background:#5B7DB1"></div>
|
||||
<div class="format-divider"></div>
|
||||
<button class="format-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><rect x="1" y="3" width="14" height="2" rx="1"/><rect x="1" y="7" width="10" height="2" rx="1"/><rect x="1" y="11" width="6" height="2" rx="1"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<textarea class="journal-body" rows="10">今天下午去图书馆自习,找了一个靠窗的位置。阳光从窗外洒进来,落在摊开的高数课本上,暖暖的。
|
||||
|
||||
不知不觉就学了三个小时,中间喝了一杯抹茶拿铁☕。虽然期末压力大,但看到窗外的樱花还在开,觉得一切都会好的。
|
||||
|
||||
晚上回宿舍路上,买了喜欢的草莓蛋糕犒劳自己 🍰</textarea>
|
||||
|
||||
<div class="placed-photo">
|
||||
<div style="text-align:center;color:var(--secondary)">
|
||||
<svg width="36" height="36" viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="1.5" style="margin-bottom:4px"><rect x="4" y="6" width="24" height="20" rx="3"/><circle cx="12" cy="14" r="3"/><path d="M4 22l6-6 4 4 6-8 8 10"/></svg>
|
||||
<div style="font-size:13px">图书馆窗边的阳光 ☀</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right side panel -->
|
||||
<div class="tool-panel-side">
|
||||
<div class="panel-header">
|
||||
<button class="panel-tab active" onclick="switchPanel('stickers', this)">贴纸</button>
|
||||
<button class="panel-tab" onclick="switchPanel('brush', this)">画笔工具</button>
|
||||
<button class="panel-tab" onclick="switchPanel('templates', this)">模板</button>
|
||||
<button class="panel-tab" onclick="switchPanel('tags', this)">标签</button>
|
||||
<button class="panel-tab" onclick="switchPanel('background', this)">背景</button>
|
||||
</div>
|
||||
|
||||
<!-- Sticker panel -->
|
||||
<div class="panel-content" id="panelStickers">
|
||||
<div style="display:flex;gap:var(--space-2);margin-bottom:var(--space-4);flex-wrap:wrap">
|
||||
<button class="panel-tab" style="font-size:12px;padding:5px 12px">热门</button>
|
||||
<button class="panel-tab active" style="font-size:12px;padding:5px 12px">可爱</button>
|
||||
<button class="panel-tab" style="font-size:12px;padding:5px 12px">植物</button>
|
||||
<button class="panel-tab" style="font-size:12px;padding:5px 12px">天气</button>
|
||||
<button class="panel-tab" style="font-size:12px;padding:5px 12px">校园</button>
|
||||
</div>
|
||||
|
||||
<div class="sticker-grid">
|
||||
<div class="sticker-item">🌸</div>
|
||||
<div class="sticker-item">⭐</div>
|
||||
<div class="sticker-item">🌿</div>
|
||||
<div class="sticker-item">☀️</div>
|
||||
<div class="sticker-item">🌙</div>
|
||||
<div class="sticker-item">🍰</div>
|
||||
<div class="sticker-item">📚</div>
|
||||
<div class="sticker-item">🎵</div>
|
||||
<div class="sticker-item">💡</div>
|
||||
<div class="sticker-item">🎀</div>
|
||||
<div class="sticker-item">🍂</div>
|
||||
<div class="sticker-item">☕</div>
|
||||
<div class="sticker-item">🌈</div>
|
||||
<div class="sticker-item">✏️</div>
|
||||
<div class="sticker-item">🦋</div>
|
||||
<div class="sticker-item">🐱</div>
|
||||
<div class="sticker-item">🌸</div>
|
||||
<div class="sticker-item">🎈</div>
|
||||
<div class="sticker-item">🌻</div>
|
||||
<div class="sticker-item">🎨</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Brush tool panel -->
|
||||
<div class="panel-content" id="panelBrush" style="display:none">
|
||||
<div class="brush-section-title">工具</div>
|
||||
<div class="brush-tools-list">
|
||||
<button class="brush-tool-item active" data-tool="pen" onclick="selectBrushTool(this, 'pen')">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3l4 4L7 21H3v-4L17 3z"/></svg>
|
||||
<span>钢笔</span>
|
||||
</button>
|
||||
<button class="brush-tool-item" data-tool="pencil" onclick="selectBrushTool(this, 'pencil')">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 20l1.5-5.5L18 2l4 4L9.5 18.5 4 20z"/><path d="M15 5l4 4"/></svg>
|
||||
<span>铅笔</span>
|
||||
</button>
|
||||
<button class="brush-tool-item" data-tool="marker" onclick="selectBrushTool(this, 'marker')">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="3" width="14" height="8" rx="2" transform="rotate(45 13 7)"/><path d="M4 20l3-7"/></svg>
|
||||
<span>马克笔</span>
|
||||
</button>
|
||||
<button class="brush-tool-item" data-tool="eraser" onclick="selectBrushTool(this, 'eraser')">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20H9L3.5 14.5a2 2 0 010-2.83l9.17-9.17a2 2 0 012.83 0L20 7"/><path d="M6 12l6 6"/></svg>
|
||||
<span>橡皮擦</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="brush-section-title">粗细</div>
|
||||
<div class="brush-size-preview">
|
||||
<div class="brush-size-line" id="brushSizeLine" style="height:2px"></div>
|
||||
</div>
|
||||
<div class="brush-size-row">
|
||||
<input type="range" class="brush-slider" id="brushSizeSlider" min="1" max="20" value="2">
|
||||
<span class="brush-size-value" id="brushSizeValue">2px</span>
|
||||
</div>
|
||||
|
||||
<div class="brush-section-title">颜色</div>
|
||||
<div class="brush-colors-grid">
|
||||
<div class="brush-color-dot active" style="background:#2D2420" data-color="#2D2420" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--accent)" data-color="#E07A5F" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--secondary)" data-color="#81B29A" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--tertiary)" data-color="#F2CC8F" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:var(--rose)" data-color="#D4A5A5" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:#5B8FB9" data-color="#5B8FB9" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:#9B72AA" data-color="#9B72AA" onclick="selectBrushColor(this)"></div>
|
||||
<div class="brush-color-dot" style="background:#C93D3D" data-color="#C93D3D" onclick="selectBrushColor(this)"></div>
|
||||
</div>
|
||||
|
||||
<div class="brush-section-title">透明度</div>
|
||||
<div class="brush-opacity-row disabled" id="brushOpacityRow">
|
||||
<span class="brush-opacity-label">透明度</span>
|
||||
<input type="range" class="brush-slider" id="brushOpacitySlider" min="0" max="100" value="50">
|
||||
<span class="brush-opacity-value" id="brushOpacityValue">50%</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Templates panel -->
|
||||
<div class="panel-content" id="panelTemplates" style="display:none">
|
||||
<p style="color:var(--muted);font-size:var(--text-sm)">模板内容</p>
|
||||
</div>
|
||||
|
||||
<!-- Tags panel -->
|
||||
<div class="panel-content" id="panelTags" style="display:none">
|
||||
<div class="tags-section">
|
||||
<div class="tags-section-title">已选标签</div>
|
||||
<div class="tag-selected-area" id="tagSelectedArea">
|
||||
<span class="tag-pill">#图书馆<span class="remove" aria-label="删除标签 图书馆" role="button" onclick="this.parentElement.remove()">×</span></span>
|
||||
<span class="tag-pill">#学习<span class="remove" aria-label="删除标签 学习" role="button" onclick="this.parentElement.remove()">×</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags-section">
|
||||
<div class="tags-section-title">添加标签</div>
|
||||
<div class="tag-input-row">
|
||||
<input class="tag-input" type="text" id="tagInput" placeholder="输入标签后回车添加..." autocomplete="off" aria-label="输入新标签" onkeydown="handleTagInput(event)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags-section">
|
||||
<div class="tags-section-title">推荐标签</div>
|
||||
<div class="tag-suggest-grid">
|
||||
<button class="tag-suggest-item" aria-label="添加标签 日常" onclick="addSuggestedTag(this)">#日常</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 学习" onclick="addSuggestedTag(this)">#学习</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 读书" onclick="addSuggestedTag(this)">#读书</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 运动" onclick="addSuggestedTag(this)">#运动</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 旅行" onclick="addSuggestedTag(this)">#旅行</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 美食" onclick="addSuggestedTag(this)">#美食</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 心情" onclick="addSuggestedTag(this)">#心情</button>
|
||||
<button class="tag-suggest-item" aria-label="添加标签 灵感" onclick="addSuggestedTag(this)">#灵感</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Background panel -->
|
||||
<div class="panel-content" id="panelBackground" style="display:none">
|
||||
<p style="color:var(--muted);font-size:var(--text-sm)">背景内容</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function switchPanel(name, tabEl) {
|
||||
var tabs = tabEl.parentElement.querySelectorAll('.panel-tab');
|
||||
for (var i = 0; i < tabs.length; i++) tabs[i].classList.remove('active');
|
||||
tabEl.classList.add('active');
|
||||
|
||||
var panels = ['panelStickers', 'panelBrush', 'panelTemplates', 'panelTags', 'panelBackground'];
|
||||
var names = ['stickers', 'brush', 'templates', 'tags', 'background'];
|
||||
for (var i = 0; i < panels.length; i++) {
|
||||
var el = document.getElementById(panels[i]);
|
||||
if (el) el.style.display = names[i] === name ? '' : 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function selectBrushTool(btn, tool) {
|
||||
var items = document.querySelectorAll('.brush-tool-item');
|
||||
for (var i = 0; i < items.length; i++) items[i].classList.remove('active');
|
||||
btn.classList.add('active');
|
||||
|
||||
var defaults = { pen: 2, pencil: 3, marker: 8, eraser: 10 };
|
||||
var slider = document.getElementById('brushSizeSlider');
|
||||
slider.value = defaults[tool] || 2;
|
||||
updateSizePreview(slider.value);
|
||||
|
||||
var opacityRow = document.getElementById('brushOpacityRow');
|
||||
if (tool === 'marker') {
|
||||
opacityRow.classList.remove('disabled');
|
||||
} else {
|
||||
opacityRow.classList.add('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
function selectBrushColor(dot) {
|
||||
var dots = document.querySelectorAll('.brush-color-dot');
|
||||
for (var i = 0; i < dots.length; i++) dots[i].classList.remove('active');
|
||||
dot.classList.add('active');
|
||||
}
|
||||
|
||||
function updateSizePreview(val) {
|
||||
document.getElementById('brushSizeValue').textContent = val + 'px';
|
||||
var line = document.getElementById('brushSizeLine');
|
||||
if (line) line.style.height = Math.max(1, val) + 'px';
|
||||
}
|
||||
|
||||
document.getElementById('brushSizeSlider').addEventListener('input', function() {
|
||||
updateSizePreview(this.value);
|
||||
});
|
||||
|
||||
document.getElementById('brushOpacitySlider').addEventListener('input', function() {
|
||||
document.getElementById('brushOpacityValue').textContent = this.value + '%';
|
||||
});
|
||||
|
||||
/* Tags functionality */
|
||||
function handleTagInput(e) {
|
||||
if (e.key === 'Enter') {
|
||||
var input = e.target;
|
||||
var text = input.value.trim();
|
||||
if (text) {
|
||||
if (!text.startsWith('#')) text = '#' + text;
|
||||
var area = document.getElementById('tagSelectedArea');
|
||||
var pill = document.createElement('span');
|
||||
pill.className = 'tag-pill';
|
||||
pill.innerHTML = text + '<span class="remove" aria-label="删除标签 ' + text.slice(1) + '" role="button" onclick="this.parentElement.remove()">×</span>';
|
||||
area.appendChild(pill);
|
||||
input.value = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addSuggestedTag(btn) {
|
||||
var text = btn.textContent.trim();
|
||||
var area = document.getElementById('tagSelectedArea');
|
||||
var pill = document.createElement('span');
|
||||
pill.className = 'tag-pill';
|
||||
pill.innerHTML = text + '<span class="remove" aria-label="删除标签 ' + text.slice(1) + '" role="button" onclick="this.parentElement.remove()">×</span>';
|
||||
area.appendChild(pill);
|
||||
btn.style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
456
docs/opendesign/screens/tablet/home-daily.html
Normal file
456
docs/opendesign/screens/tablet/home-daily.html
Normal file
@@ -0,0 +1,456 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, height=768, initial-scale=1">
|
||||
<title>暖记 — 平板端首页</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.main-content { height: 768px; }
|
||||
|
||||
.content-inner {
|
||||
padding: var(--space-8) var(--space-8);
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* Greeting */
|
||||
.greeting { margin-bottom: var(--space-5); }
|
||||
.greeting-date {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-1);
|
||||
}
|
||||
.greeting-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-3xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.greeting-text span { color: var(--accent); }
|
||||
|
||||
.streak-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
background: var(--tertiary-soft);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: #B8860B;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
/* Mood + Today card row */
|
||||
.top-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-5);
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.mood-section {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.mood-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.mood-header span {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.mood-header .weather {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.mood-options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.mood-opt {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: var(--space-2) var(--space-3);
|
||||
border-radius: var(--radius-sm);
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.mood-opt:hover { background: var(--surface-warm); }
|
||||
.mood-opt.selected { background: var(--surface-warm); }
|
||||
.mood-opt .face { font-size: 32px; }
|
||||
.mood-opt .label { font-size: var(--text-xs); color: var(--muted); }
|
||||
.mood-opt.selected .label { color: var(--accent); font-weight: 600; }
|
||||
|
||||
/* Today card */
|
||||
.today-card {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, var(--tertiary) 100%);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-6);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.today-card:hover { transform: translateY(-2px); transition: transform var(--motion-fast) var(--ease-bounce); }
|
||||
.today-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
right: -30px;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.12);
|
||||
}
|
||||
.today-card::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 40px;
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.08);
|
||||
}
|
||||
.today-card .label {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent-on);
|
||||
font-weight: 500;
|
||||
margin-bottom: var(--space-2);
|
||||
opacity: 0.85;
|
||||
}
|
||||
.today-card .title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--accent-on);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.today-card .prompt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent-on);
|
||||
opacity: 0.7;
|
||||
}
|
||||
.today-card .write-btn {
|
||||
position: absolute;
|
||||
bottom: var(--space-5);
|
||||
right: var(--space-5);
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-bounce);
|
||||
}
|
||||
.today-card .write-btn:hover { transform: scale(1.1); }
|
||||
.today-card .write-btn svg { width: 24px; height: 24px; color: var(--accent); }
|
||||
|
||||
/* Quick stats */
|
||||
.quick-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--space-4);
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
.stat-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4) var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
.stat-card .num {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.stat-card .num.accent { color: var(--accent); }
|
||||
.stat-card .num.green { color: var(--secondary); }
|
||||
.stat-card .label {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Entries */
|
||||
.recent-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.recent-header h3 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
}
|
||||
.recent-header a {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.entries-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.entry-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.entry-card:hover { transform: translateY(-2px); }
|
||||
.entry-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.entry-date {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
.entry-mood { font-size: 20px; }
|
||||
.entry-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.entry-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.entry-preview-thumb {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
border-radius: var(--radius-sm);
|
||||
margin-top: var(--space-3);
|
||||
background: var(--surface-warm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.5s var(--ease-standard) both; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<nav class="sidebar" role="navigation" aria-label="主导航">
|
||||
<div class="sidebar-brand">
|
||||
<div class="sidebar-logo">📖</div>
|
||||
<div>
|
||||
<div class="sidebar-brand-text">暖记</div>
|
||||
<div class="sidebar-brand-sub">Warm Notes</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-nav">
|
||||
<button class="sidebar-nav-item active" role="button" aria-label="首页">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
首页
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="日历">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
日历
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="心情追踪">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg>
|
||||
心情追踪
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="贴纸库">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="18" height="18" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor"/><circle cx="15" cy="10" r="1.5" fill="currentColor"/><path d="M9 15c.8.8 2.2 1.2 3 1.2s2.2-.4 3-1.2"/></svg>
|
||||
贴纸库
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="模板">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>
|
||||
模板
|
||||
</button>
|
||||
<button class="sidebar-nav-item" role="button" aria-label="发现">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
发现
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="sidebar-write-btn" aria-label="写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
|
||||
写日记
|
||||
</button>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<div class="sidebar-avatar">🐱</div>
|
||||
<div>
|
||||
<div class="sidebar-user-name">小暖</div>
|
||||
<div class="sidebar-user-streak">连续记录 12 天</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content" role="main">
|
||||
<div class="content-inner">
|
||||
|
||||
<!-- Greeting -->
|
||||
<div class="greeting anim-fade">
|
||||
<div class="greeting-date">2026年5月31日 · 星期日</div>
|
||||
<div class="greeting-text">下午好,<span>小暖</span></div>
|
||||
</div>
|
||||
|
||||
<div class="streak-badge anim-fade" style="animation-delay:0.05s">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="#B8860B"><path d="M8 1l2 5h5l-4 3 1.5 5L8 11 3.5 14 5 9 1 6h5z"/></svg>
|
||||
连续记录 12 天
|
||||
</div>
|
||||
|
||||
<!-- Mood + Today card row -->
|
||||
<div class="top-row anim-fade" style="animation-delay:0.1s">
|
||||
<div class="mood-section">
|
||||
<div class="mood-header">
|
||||
<span>今天心情如何?</span>
|
||||
<div class="weather">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="var(--tertiary)">
|
||||
<circle cx="8" cy="8" r="5"/>
|
||||
</svg>
|
||||
晴 26°
|
||||
</div>
|
||||
</div>
|
||||
<div class="mood-options">
|
||||
<button class="mood-opt" aria-label="开心"><span class="face">😊</span><span class="label">开心</span></button>
|
||||
<button class="mood-opt" aria-label="平静"><span class="face">😌</span><span class="label">平静</span></button>
|
||||
<button class="mood-opt selected" aria-label="幸福"><span class="face">🥰</span><span class="label">幸福</span></button>
|
||||
<button class="mood-opt" aria-label="疲惫"><span class="face">😴</span><span class="label">疲惫</span></button>
|
||||
<button class="mood-opt" aria-label="低落"><span class="face">😔</span><span class="label">低落</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="today-card">
|
||||
<div>
|
||||
<div class="label">今天的日记</div>
|
||||
<div class="title">写点什么吧...</div>
|
||||
<div class="prompt">记录一个温暖的瞬间,或者今天发生的小事</div>
|
||||
</div>
|
||||
<button class="write-btn" aria-label="开始写日记">
|
||||
<svg viewBox="0 0 24 24" fill="none"><path d="M11 5v12M5 11h12" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick stats -->
|
||||
<div class="quick-stats anim-fade" style="animation-delay:0.15s">
|
||||
<div class="stat-card">
|
||||
<div class="num accent">28</div>
|
||||
<div class="label">本月日记</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="num green">12</div>
|
||||
<div class="label">连续天数</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="num">156</div>
|
||||
<div class="label">总日记数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recent entries -->
|
||||
<div class="recent-header anim-fade" style="animation-delay:0.2s">
|
||||
<h3>最近记录</h3>
|
||||
<a href="#">查看全部</a>
|
||||
</div>
|
||||
|
||||
<div class="entries-grid anim-fade" style="animation-delay:0.25s">
|
||||
<div class="entry-card">
|
||||
<div class="entry-top">
|
||||
<div class="entry-date">5月30日 · 周六</div>
|
||||
<div class="entry-mood">😊</div>
|
||||
</div>
|
||||
<div class="entry-title">图书馆的午后</div>
|
||||
<div class="entry-excerpt">今天在图书馆自习,窗外的阳光洒进来,暖暖的。复习了高数第三章...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--surface-warm)">🌸</div>
|
||||
</div>
|
||||
<div class="entry-card">
|
||||
<div class="entry-top">
|
||||
<div class="entry-date">5月29日 · 周五</div>
|
||||
<div class="entry-mood">🥰</div>
|
||||
</div>
|
||||
<div class="entry-title">和舍友的火锅局</div>
|
||||
<div class="entry-excerpt">考完试和舍友们去吃了火锅庆祝,大家都好开心,聊了很多有趣的事...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--secondary-soft)">🍃</div>
|
||||
</div>
|
||||
<div class="entry-card">
|
||||
<div class="entry-top">
|
||||
<div class="entry-date">5月28日 · 周四</div>
|
||||
<div class="entry-mood">😌</div>
|
||||
</div>
|
||||
<div class="entry-title">期末考试第一天</div>
|
||||
<div class="entry-excerpt">终于考完了英语,感觉发挥还可以。明天继续加油!给自己打个气...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--tertiary-soft)">📝</div>
|
||||
</div>
|
||||
<div class="entry-card">
|
||||
<div class="entry-top">
|
||||
<div class="entry-date">5月27日 · 周三</div>
|
||||
<div class="entry-mood">😌</div>
|
||||
</div>
|
||||
<div class="entry-title">夜跑打卡</div>
|
||||
<div class="entry-excerpt">晚上去操场跑了三圈,吹着晚风特别舒服。回来洗了个热水澡...</div>
|
||||
<div class="entry-preview-thumb" style="background:var(--rose-soft)">🌙</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
622
docs/opendesign/screens/tablet/login.html
Normal file
622
docs/opendesign/screens/tablet/login.html
Normal file
@@ -0,0 +1,622 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, height=768, initial-scale=1">
|
||||
<title>暖记 — 平板端登录/注册</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Focus styles */
|
||||
button:focus-visible, a:focus-visible, input:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Centered card */
|
||||
.login-card {
|
||||
display: flex;
|
||||
width: 540px;
|
||||
min-height: 480px;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--elev-medium);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Left brand panel */
|
||||
.brand-panel {
|
||||
width: 240px;
|
||||
flex-shrink: 0;
|
||||
background: linear-gradient(180deg, var(--bg) 0%, var(--tertiary-soft) 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--space-8);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* CSS-drawn notebook logo */
|
||||
.logo-wrap {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
position: relative;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.logo-notebook {
|
||||
width: 56px;
|
||||
height: 64px;
|
||||
border: 3px solid var(--accent);
|
||||
border-radius: 6px 10px 10px 6px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(224, 122, 95, 0.06);
|
||||
}
|
||||
.logo-spine {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 3px;
|
||||
height: 64px;
|
||||
background: var(--accent);
|
||||
border-radius: 2px;
|
||||
}
|
||||
.logo-heart {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -45%);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.logo-heart::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: var(--accent);
|
||||
clip-path: path('M8 14C8 14 1 9.5 1 5.5C1 3 3 1 5.5 1C6.8 1 7.8 1.6 8 2.5C8.2 1.6 9.2 1 10.5 1C13 1 15 3 15 5.5C15 9.5 8 14 8 14Z');
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.brand-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.brand-tagline {
|
||||
font-family: var(--font-handwritten);
|
||||
font-size: var(--text-md);
|
||||
color: var(--accent);
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Decorative elements */
|
||||
.deco {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
opacity: 0.15;
|
||||
}
|
||||
.deco-dot1 {
|
||||
width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
|
||||
top: 40px; left: 30px;
|
||||
}
|
||||
.deco-dot2 {
|
||||
width: 6px; height: 6px; border-radius: 50%; background: var(--secondary);
|
||||
top: 70px; right: 30px;
|
||||
}
|
||||
.deco-dot3 {
|
||||
width: 10px; height: 10px; border-radius: 50%; background: var(--tertiary);
|
||||
bottom: 60px; left: 40px;
|
||||
}
|
||||
.deco-wave {
|
||||
bottom: 40px; right: 30px;
|
||||
}
|
||||
.deco-wave svg { width: 30px; height: 12px; }
|
||||
.deco-flower {
|
||||
top: 120px; left: 20px;
|
||||
width: 14px; height: 14px;
|
||||
}
|
||||
.deco-flower::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 14px; height: 14px;
|
||||
background: var(--rose);
|
||||
clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
|
||||
}
|
||||
|
||||
/* Right form panel */
|
||||
.form-panel {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: var(--space-10) var(--space-8);
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
/* Input group */
|
||||
.input-group {
|
||||
position: relative;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.input-group .input-icon {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.input-group input {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
padding: 0 16px 0 46px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg);
|
||||
background: var(--surface);
|
||||
transition: border-color var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.input-group input::placeholder {
|
||||
color: var(--meta);
|
||||
}
|
||||
.input-group input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px var(--shadow-input-focus);
|
||||
}
|
||||
|
||||
/* Verification code */
|
||||
.input-group.has-action input {
|
||||
padding-right: 110px;
|
||||
}
|
||||
.input-group .input-action {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
padding: 6px 12px;
|
||||
background: none;
|
||||
border: none;
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
cursor: pointer;
|
||||
min-height: 36px;
|
||||
border-radius: var(--radius-pill);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.input-group .input-action:hover {
|
||||
background: var(--surface-warm);
|
||||
}
|
||||
|
||||
/* Password toggle */
|
||||
.input-group.has-toggle input {
|
||||
padding-right: 50px;
|
||||
}
|
||||
.input-group .toggle-password {
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.input-group .toggle-password:hover { color: var(--fg); }
|
||||
.input-group .toggle-password svg { width: 20px; height: 20px; }
|
||||
|
||||
/* Agreement */
|
||||
.agreement {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-4);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
line-height: 1.4;
|
||||
}
|
||||
.agreement input[type="checkbox"] {
|
||||
width: 16px; height: 16px;
|
||||
accent-color: var(--accent);
|
||||
margin-top: 1px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.agreement a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
.agreement a:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Submit button */
|
||||
.btn-login {
|
||||
width: 100%;
|
||||
min-height: 48px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--accent);
|
||||
color: var(--bg);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.btn-login:hover {
|
||||
background: var(--accent-hover);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 16px var(--shadow-accent-hover);
|
||||
}
|
||||
.btn-login:active {
|
||||
background: var(--accent-active);
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
/* Divider */
|
||||
.divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
margin-bottom: var(--space-4);
|
||||
color: var(--meta);
|
||||
font-size: var(--text-xs);
|
||||
}
|
||||
.divider::before,
|
||||
.divider::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
/* Social buttons */
|
||||
.social-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: var(--space-4);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.social-btn {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
background: var(--surface);
|
||||
}
|
||||
.social-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.social-btn:active { transform: scale(0.95); }
|
||||
.social-btn svg { width: 24px; height: 24px; }
|
||||
.social-btn.wechat { background: #07C160; border-color: #07C160; }
|
||||
.social-btn.wechat:hover { background: #06AD56; border-color: #06AD56; }
|
||||
.social-btn.apple { background: #1D1D1F; border-color: #1D1D1F; }
|
||||
.social-btn.apple:hover { background: #333; border-color: #333; }
|
||||
.social-btn.google { background: var(--surface); }
|
||||
|
||||
/* Bottom link */
|
||||
.bottom-link {
|
||||
text-align: center;
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
margin-top: auto;
|
||||
}
|
||||
.bottom-link a {
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
}
|
||||
.bottom-link a:hover { text-decoration: underline; }
|
||||
|
||||
/* Version */
|
||||
.version {
|
||||
position: absolute;
|
||||
bottom: var(--space-4);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: var(--text-xs);
|
||||
color: var(--meta);
|
||||
}
|
||||
|
||||
/* State toggling */
|
||||
.register-fields { display: none; }
|
||||
.is-register .register-fields { display: block; }
|
||||
.is-register .login-only { display: none; }
|
||||
|
||||
/* Reduced motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(8px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.anim-fade { animation: fadeIn 0.4s var(--ease-standard) both; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Centered login card -->
|
||||
<div class="login-card anim-fade">
|
||||
|
||||
<!-- Left: Brand panel -->
|
||||
<div class="brand-panel">
|
||||
<div class="deco deco-dot1" aria-hidden="true"></div>
|
||||
<div class="deco deco-dot2" aria-hidden="true"></div>
|
||||
<div class="deco deco-dot3" aria-hidden="true"></div>
|
||||
<div class="deco deco-flower" aria-hidden="true"></div>
|
||||
<div class="deco deco-wave" aria-hidden="true">
|
||||
<svg viewBox="0 0 30 12" fill="none" stroke="var(--accent)" stroke-width="2" stroke-linecap="round">
|
||||
<path d="M2 8 Q8 2, 15 8 Q22 14, 28 8"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="logo-wrap" aria-hidden="true">
|
||||
<div class="logo-notebook"></div>
|
||||
<div class="logo-spine"></div>
|
||||
<div class="logo-heart"></div>
|
||||
</div>
|
||||
<div class="brand-title">暖记</div>
|
||||
<div class="brand-tagline">用温暖记录每一天</div>
|
||||
</div>
|
||||
|
||||
<!-- Right: Form panel -->
|
||||
<div class="form-panel" id="formArea">
|
||||
|
||||
<h1 class="form-title" id="formTitle">欢迎回来</h1>
|
||||
|
||||
<form id="loginForm" autocomplete="on" novalidate>
|
||||
<!-- Register: nickname -->
|
||||
<div class="register-fields">
|
||||
<div class="input-group">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<circle cx="10" cy="7" r="4"/><path d="M3 18c0-3.3 3.1-6 7-6s7 2.7 7 6"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="text" id="nickname" name="nickname" placeholder="请输入昵称" autocomplete="nickname" aria-label="昵称">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="input-group">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="5" y="2" width="10" height="16" rx="2"/><line x1="8" y1="15" x2="12" y2="15"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="tel" id="phone" name="phone" placeholder="请输入手机号" autocomplete="tel" pattern="[0-9]*" aria-label="手机号">
|
||||
</div>
|
||||
|
||||
<!-- Register: password -->
|
||||
<div class="register-fields">
|
||||
<div class="input-group has-toggle">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="3" y="9" width="14" height="9" rx="2"/><path d="M6 9V6a4 4 0 018 0v3"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="password" id="regPassword" name="password" placeholder="请输入密码" autocomplete="new-password" aria-label="密码">
|
||||
<button type="button" class="toggle-password" aria-label="显示密码" onclick="togglePwd('regPassword', this)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Verification code -->
|
||||
<div class="input-group has-action">
|
||||
<span class="input-icon" aria-hidden="true">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round">
|
||||
<rect x="2" y="4" width="16" height="12" rx="2"/><path d="M6 8v4M10 7v6M14 8v4"/>
|
||||
</svg>
|
||||
</span>
|
||||
<input type="tel" id="code" name="code" placeholder="请输入验证码" autocomplete="one-time-code" pattern="[0-9]*" aria-label="验证码">
|
||||
<button type="button" class="input-action" aria-label="获取验证码" id="getCodeBtn" onclick="sendCode()">获取验证码</button>
|
||||
</div>
|
||||
|
||||
<!-- Register: agreement -->
|
||||
<div class="register-fields">
|
||||
<label class="agreement">
|
||||
<input type="checkbox" id="agreement" aria-label="同意用户协议">
|
||||
<span>我已阅读并同意<a href="#" onclick="return false">《用户协议》</a>和<a href="#" onclick="return false">《隐私政策》</a></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit -->
|
||||
<button type="submit" class="btn-login" id="submitBtn" aria-label="登录">登录</button>
|
||||
</form>
|
||||
|
||||
<!-- Divider -->
|
||||
<div class="divider">其他登录方式</div>
|
||||
|
||||
<!-- Social buttons -->
|
||||
<div class="social-row">
|
||||
<button type="button" class="social-btn wechat" aria-label="微信登录">
|
||||
<svg viewBox="0 0 28 28" fill="none">
|
||||
<path d="M19.1 12.5c-.2-3.3-3.2-5.9-6.8-5.9-3.8 0-6.9 2.8-6.9 6.3 0 1.8.9 3.4 2.3 4.5l-.6 1.8 2.1-1.1c.7.2 1.5.3 2.3.3h.4c-.1-.4-.2-.8-.2-1.2.1-2.6 2.7-4.7 5.9-4.7h.2c.1-.1.2-.1.3 0z" fill="#FFF"/>
|
||||
<path d="M11.6 11.5c-.5 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.5 1-1 1zM14.8 10.5c-.5 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.5-1-1-1z" fill="#07C160"/>
|
||||
<path d="M25.5 16.8c0-2.9-2.9-5.3-6.3-5.3s-6.3 2.4-6.3 5.3 2.9 5.3 6.3 5.3c.7 0 1.4-.1 2-.3l1.7.9-.5-1.5c1.3-1 2.1-2.5 2.1-4.1 0 .1 0-.1 0-.3zm-8.6-1c-.4 0-.8-.3-.8-.8s.3-.8.8-.8.8.3.8.8-.4.8-.8.8zm4.6 0c-.4 0-.8-.3-.8-.8s.3-.8.8-.8.8.3.8.8-.4.8-.8.8z" fill="#FFF"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="social-btn apple" aria-label="Apple登录">
|
||||
<svg viewBox="0 0 28 28" fill="#FFF">
|
||||
<path d="M20.2 14.3c0-2 1.2-3.1 1.3-3.2-0.7-1-1.8-1.6-3-1.6-1.3 0-2 .8-2.7.8-.7 0-1.4-.8-2.5-.8-1.7 0-3.5 1.4-3.5 4.1 0 1.6.6 3.3 1.4 4.5.7 1 1.4 1.8 2.3 1.8.9 0 1.3-.7 2.5-.7 1.2 0 1.5.7 2.5.7.9 0 1.6-.8 2.2-1.7.4-.6.7-1.2.9-1.9-2-.8-2.4-3.8-.4-5zm-1.8-3.3c.5-.6.9-1.4.8-2.2-.8 0-1.8.5-2.3 1.2-.5.6-.9 1.4-.8 2.2.8 0 1.7-.5 2.3-1.2z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button" class="social-btn google" aria-label="Google登录">
|
||||
<svg viewBox="0 0 28 28">
|
||||
<path d="M14 11.5v5.2h7.3c-.3 1.7-1.3 3.1-2.7 4.1l4.4 3.4c2.6-2.4 4-5.9 4-10.1 0-1-.1-1.9-.3-2.8H14z" fill="#4285F4"/>
|
||||
<path d="M6.3 16.4c-.4-1-.6-2.2-.6-3.4s.2-2.3.6-3.4L1.9 6.2C.7 8.5 0 11.2 0 14s.7 5.5 1.9 7.8l4.4-3.4z" fill="#FBBC05"/>
|
||||
<path d="M14 28c3.7 0 6.8-1.2 9.1-3.3l-4.4-3.4c-1.2.8-2.8 1.3-4.7 1.3-3.6 0-6.7-2.4-7.8-5.7l-4.4 3.4C4.2 24.7 8.7 28 14 28z" fill="#34A853"/>
|
||||
<path d="M14 5.6c2 0 3.9.7 5.3 2l4-4C20.8 1.2 17.7 0 14 0 8.7 0 4.2 3.3 2.1 8.1l4.4 3.4c1.1-3.3 4.2-5.9 7.5-5.9z" fill="#EA4335"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Bottom link -->
|
||||
<div class="bottom-link">
|
||||
<span class="login-only">还没有账号?</span>
|
||||
<a href="#" id="toggleLink" role="button" aria-label="切换到注册">立即注册</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Version -->
|
||||
<div class="version" aria-hidden="true">v1.0.0</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var isRegister = false;
|
||||
var formArea = document.getElementById('formArea');
|
||||
var formTitle = document.getElementById('formTitle');
|
||||
var submitBtn = document.getElementById('submitBtn');
|
||||
var toggleLink = document.getElementById('toggleLink');
|
||||
var phoneInput = document.getElementById('phone');
|
||||
|
||||
phoneInput.addEventListener('input', function() {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
|
||||
var codeInput = document.getElementById('code');
|
||||
codeInput.addEventListener('input', function() {
|
||||
this.value = this.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
|
||||
toggleLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
isRegister = !isRegister;
|
||||
|
||||
if (isRegister) {
|
||||
formArea.classList.add('is-register');
|
||||
formTitle.textContent = '创建账号';
|
||||
submitBtn.textContent = '注册';
|
||||
submitBtn.setAttribute('aria-label', '注册');
|
||||
toggleLink.textContent = '立即登录';
|
||||
toggleLink.setAttribute('aria-label', '切换到登录');
|
||||
toggleLink.previousElementSibling.textContent = '已有账号?';
|
||||
} else {
|
||||
formArea.classList.remove('is-register');
|
||||
formTitle.textContent = '欢迎回来';
|
||||
submitBtn.textContent = '登录';
|
||||
submitBtn.setAttribute('aria-label', '登录');
|
||||
toggleLink.textContent = '立即注册';
|
||||
toggleLink.setAttribute('aria-label', '切换到注册');
|
||||
toggleLink.previousElementSibling.textContent = '还没有账号?';
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
})();
|
||||
|
||||
function togglePwd(inputId, btn) {
|
||||
var input = document.getElementById(inputId);
|
||||
if (input.type === 'password') {
|
||||
input.type = 'text';
|
||||
btn.setAttribute('aria-label', '隐藏密码');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>';
|
||||
} else {
|
||||
input.type = 'password';
|
||||
btn.setAttribute('aria-label', '显示密码');
|
||||
btn.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>';
|
||||
}
|
||||
}
|
||||
|
||||
function sendCode() {
|
||||
var btn = document.getElementById('getCodeBtn');
|
||||
var seconds = 60;
|
||||
btn.disabled = true;
|
||||
btn.style.opacity = '0.6';
|
||||
btn.textContent = seconds + 's';
|
||||
var timer = setInterval(function() {
|
||||
seconds--;
|
||||
if (seconds <= 0) {
|
||||
clearInterval(timer);
|
||||
btn.disabled = false;
|
||||
btn.style.opacity = '1';
|
||||
btn.textContent = '获取验证码';
|
||||
} else {
|
||||
btn.textContent = seconds + 's';
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
471
docs/opendesign/screens/tablet/search.html
Normal file
471
docs/opendesign/screens/tablet/search.html
Normal file
@@ -0,0 +1,471 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=1024, height=768, initial-scale=1">
|
||||
<title>暖记 — 平板端搜索</title>
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<link rel="stylesheet" href="shared.css">
|
||||
<style>
|
||||
body {
|
||||
width: 1024px;
|
||||
height: 768px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
|
||||
.search-layout {
|
||||
display: flex;
|
||||
height: 768px;
|
||||
}
|
||||
|
||||
/* Full-screen search without sidebar */
|
||||
.search-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Search bar */
|
||||
.search-bar {
|
||||
height: 64px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
padding: 0 var(--space-8);
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.search-back-btn {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: var(--radius-pill);
|
||||
border: none;
|
||||
background: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
transition: background var(--motion-fast);
|
||||
}
|
||||
.search-back-btn:hover { background: var(--surface-warm); }
|
||||
.search-back-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
.search-input-wrap {
|
||||
flex: 1;
|
||||
max-width: 600px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-input-wrap svg {
|
||||
position: absolute;
|
||||
left: var(--space-4);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: var(--muted);
|
||||
pointer-events: none;
|
||||
}
|
||||
.search-input {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface-warm);
|
||||
padding: 0 var(--space-4) 0 44px;
|
||||
font-size: var(--text-base);
|
||||
color: var(--fg);
|
||||
outline: none;
|
||||
font-family: var(--font-body);
|
||||
}
|
||||
.search-input::placeholder { color: var(--meta); }
|
||||
|
||||
.search-cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
color: var(--accent);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.search-cancel-btn:hover { opacity: 0.7; }
|
||||
|
||||
/* Scrollable content */
|
||||
.search-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-6) var(--space-8);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
.search-content::-webkit-scrollbar { width: 4px; }
|
||||
.search-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
/* Sections */
|
||||
.search-section { margin-bottom: var(--space-6); }
|
||||
.search-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.search-section-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-lg);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
.search-section-action {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
|
||||
.search-tag {
|
||||
padding: 8px 18px;
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg-2);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.search-tag:hover { border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
/* Result tabs */
|
||||
.result-tabs {
|
||||
display: flex;
|
||||
gap: var(--space-1);
|
||||
margin-bottom: var(--space-5);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.result-tab {
|
||||
padding: var(--space-3) var(--space-5);
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
position: relative;
|
||||
transition: color var(--motion-fast);
|
||||
}
|
||||
.result-tab.active { color: var(--accent); }
|
||||
.result-tab.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
left: var(--space-5);
|
||||
right: var(--space-5);
|
||||
height: 3px;
|
||||
border-radius: 2px;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
/* Two-column results */
|
||||
.result-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.result-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: transform var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
.result-card:hover { transform: translateY(-1px); }
|
||||
.result-card-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.result-card-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
}
|
||||
.result-card-title mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-card-date {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
margin-left: var(--space-3);
|
||||
}
|
||||
.result-card-excerpt {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--muted);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.result-card-excerpt mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-card-tags { display: flex; gap: var(--space-1); margin-top: var(--space-2); }
|
||||
.result-card-tag {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--accent);
|
||||
background: var(--surface-warm);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-pill);
|
||||
}
|
||||
|
||||
.result-template-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--space-4);
|
||||
}
|
||||
.result-template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.result-template-card:hover { border-color: var(--accent); transform: translateY(-2px); }
|
||||
.result-template-icon { font-size: 36px; margin-bottom: var(--space-2); }
|
||||
.result-template-name {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.result-template-name mark {
|
||||
background: var(--tertiary-soft);
|
||||
color: var(--accent);
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.result-template-desc { font-size: var(--text-xs); color: var(--muted); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="search-layout">
|
||||
<div class="search-main">
|
||||
<div class="search-bar">
|
||||
<button class="search-back-btn" aria-label="返回">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M15 18l-6-6 6-6"/></svg>
|
||||
</button>
|
||||
<div class="search-input-wrap">
|
||||
<svg viewBox="0 0 22 22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><line x1="16" y1="16" x2="20" y2="20"/></svg>
|
||||
<input class="search-input" type="text" id="searchInput" placeholder="搜索日记、模板、标签..." autocomplete="off" aria-label="搜索" autofocus>
|
||||
</div>
|
||||
<button class="search-cancel-btn" aria-label="取消搜索">取消</button>
|
||||
</div>
|
||||
|
||||
<div class="search-content">
|
||||
<!-- Before-search state -->
|
||||
<div id="searchBefore">
|
||||
<div class="search-section">
|
||||
<div class="search-section-header">
|
||||
<span class="search-section-title">最近搜索</span>
|
||||
<button class="search-section-action" aria-label="清除搜索历史">清除</button>
|
||||
</div>
|
||||
<div class="search-tags">
|
||||
<button class="search-tag" aria-label="搜索 期末考试">期末考试</button>
|
||||
<button class="search-tag" aria-label="搜索 读书笔记">读书笔记</button>
|
||||
<button class="search-tag" aria-label="搜索 旅行计划">旅行计划</button>
|
||||
<button class="search-tag" aria-label="搜索 心情">心情</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-section">
|
||||
<div class="search-section-header">
|
||||
<span class="search-section-title">热门搜索</span>
|
||||
</div>
|
||||
<div class="search-tags">
|
||||
<button class="search-tag" aria-label="搜索 期末">#期末</button>
|
||||
<button class="search-tag" aria-label="搜索 读书">#读书</button>
|
||||
<button class="search-tag" aria-label="搜索 心情">#心情</button>
|
||||
<button class="search-tag" aria-label="搜索 旅行">#旅行</button>
|
||||
<button class="search-tag" aria-label="搜索 美食">#美食</button>
|
||||
<button class="search-tag" aria-label="搜索 学习">#学习</button>
|
||||
<button class="search-tag" aria-label="搜索 运动">#运动</button>
|
||||
<button class="search-tag" aria-label="搜索 灵感">#灵感</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Search results -->
|
||||
<div id="searchResults" style="display:none">
|
||||
<div class="result-tabs" role="tablist">
|
||||
<button class="result-tab active" role="tab" aria-label="全部结果" aria-selected="true">全部</button>
|
||||
<button class="result-tab" role="tab" aria-label="日记结果" aria-selected="false">日记</button>
|
||||
<button class="result-tab" role="tab" aria-label="模板结果" aria-selected="false">模板</button>
|
||||
<button class="result-tab" role="tab" aria-label="标签结果" aria-selected="false">标签</button>
|
||||
</div>
|
||||
|
||||
<div id="resultDiary">
|
||||
<div class="result-grid">
|
||||
<div class="result-card" aria-label="打开日记 期末考试周复习计划">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">期末<mark>考试</mark>周复习计划</span>
|
||||
<span class="result-card-date">2025年12月15日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">今天开始了为期两周的期末<mark>考试</mark>复习,列了详细的计划表,每一科都安排了时间...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#期末</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 考研倒计时30天">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">考研倒计时30天</span>
|
||||
<span class="result-card-date">2025年11月25日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">距离考研还有30天,今天复习了英语阅读和政治,感觉<mark>考试</mark>越来越近了...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#学习</span>
|
||||
<span class="result-card-tag">#考研</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 考试后的放松手账">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title"><mark>考试</mark>后的放松手账</span>
|
||||
<span class="result-card-date">2025年6月20日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">终于考完试了!用手账记录了<mark>考试</mark>结束那一刻的心情,画了一幅小小的庆祝插画...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#心情</span>
|
||||
<span class="result-card-tag">#手账</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result-card" aria-label="打开日记 图书馆的午后">
|
||||
<div class="result-card-top">
|
||||
<span class="result-card-title">图书馆的午后</span>
|
||||
<span class="result-card-date">2025年5月30日</span>
|
||||
</div>
|
||||
<div class="result-card-excerpt">今天在图书馆自习,窗外的阳光洒进来,暖暖的。复习了高数第三章...</div>
|
||||
<div class="result-card-tags">
|
||||
<span class="result-card-tag">#日常</span>
|
||||
<span class="result-card-tag">#学习</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="resultTemplates" style="display:none">
|
||||
<div class="result-template-grid">
|
||||
<div class="result-template-card" aria-label="使用模板 考试复习计划">
|
||||
<div class="result-template-icon">📝</div>
|
||||
<div class="result-template-name"><mark>考试</mark>复习计划</div>
|
||||
<div class="result-template-desc">适合期末<mark>考试</mark>周使用</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 学习打卡">
|
||||
<div class="result-template-icon">📚</div>
|
||||
<div class="result-template-name">学习打卡</div>
|
||||
<div class="result-template-desc">每日学习记录模板</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 成绩分析">
|
||||
<div class="result-template-icon">📊</div>
|
||||
<div class="result-template-name">成绩分析</div>
|
||||
<div class="result-template-desc"><mark>考试</mark>成绩复盘模板</div>
|
||||
</div>
|
||||
<div class="result-template-card" aria-label="使用模板 目标追踪">
|
||||
<div class="result-template-icon">🎯</div>
|
||||
<div class="result-template-name">目标追踪</div>
|
||||
<div class="result-template-desc">学期目标追踪模板</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="resultTags" style="display:none">
|
||||
<div class="search-tags" style="gap: var(--space-3);">
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 考试">#考试 (3篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 考研">#考研 (2篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 考试周">#考试周 (1篇)</button>
|
||||
<button class="search-tag" style="padding: 12px 24px; font-size: var(--text-base);" aria-label="搜索标签 复习">#复习 (5篇)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var input = document.getElementById('searchInput');
|
||||
var beforeEl = document.getElementById('searchBefore');
|
||||
var resultsEl = document.getElementById('searchResults');
|
||||
var resultTabs = document.querySelectorAll('.result-tab');
|
||||
var panels = ['resultDiary', 'resultTemplates', 'resultTags'];
|
||||
|
||||
input.addEventListener('input', function() {
|
||||
if (this.value.trim().length > 0) {
|
||||
beforeEl.style.display = 'none';
|
||||
resultsEl.style.display = '';
|
||||
} else {
|
||||
beforeEl.style.display = '';
|
||||
resultsEl.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.search-tag').forEach(function(tag) {
|
||||
tag.addEventListener('click', function() {
|
||||
input.value = this.textContent.trim();
|
||||
input.dispatchEvent(new Event('input'));
|
||||
});
|
||||
});
|
||||
|
||||
resultTabs.forEach(function(tab, idx) {
|
||||
tab.addEventListener('click', function() {
|
||||
resultTabs.forEach(function(t) { t.classList.remove('active'); t.setAttribute('aria-selected', 'false'); });
|
||||
tab.classList.add('active');
|
||||
tab.setAttribute('aria-selected', 'true');
|
||||
panels.forEach(function(p, i) {
|
||||
document.getElementById(p).style.display = i === idx ? '' : 'none';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
input.focus();
|
||||
</script>
|
||||
|
||||
<script src="../../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
227
docs/opendesign/screens/tablet/shared.css
Normal file
227
docs/opendesign/screens/tablet/shared.css
Normal file
@@ -0,0 +1,227 @@
|
||||
/* ─────────────────────────────────────────────────────────
|
||||
* 暖记 — 平板端 (iPad 1024×768) 共享布局组件
|
||||
* ───────────────────────────────────────────────────────── */
|
||||
|
||||
/* Sidebar navigation */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 260px;
|
||||
background: var(--surface);
|
||||
border-right: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 100;
|
||||
padding: var(--space-6) 0;
|
||||
}
|
||||
|
||||
.sidebar-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: 0 var(--space-6);
|
||||
margin-bottom: var(--space-8);
|
||||
}
|
||||
|
||||
.sidebar-logo {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: var(--radius-md);
|
||||
background: linear-gradient(135deg, var(--accent), var(--tertiary));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.sidebar-brand-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sidebar-brand-sub {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 0 var(--space-3);
|
||||
}
|
||||
|
||||
.sidebar-nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
min-height: 44px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 500;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
background: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
transition: all var(--motion-fast) var(--ease-standard);
|
||||
}
|
||||
|
||||
.sidebar-nav-item:hover {
|
||||
background: var(--surface-warm);
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sidebar-nav-item.active {
|
||||
background: var(--surface-warm);
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar-nav-item svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-write-btn {
|
||||
margin: var(--space-4) var(--space-5);
|
||||
padding: var(--space-4) var(--space-5);
|
||||
min-height: 44px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-2);
|
||||
transition: all var(--motion-fast) var(--ease-bounce);
|
||||
box-shadow: var(--shadow-accent);
|
||||
}
|
||||
|
||||
.sidebar-write-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: var(--shadow-accent-hover);
|
||||
}
|
||||
|
||||
.sidebar-write-btn:active { transform: scale(0.97); }
|
||||
.sidebar-write-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
.sidebar-footer {
|
||||
padding: var(--space-4) var(--space-5);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.sidebar-avatar {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: var(--secondary-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.sidebar-user-name {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sidebar-user-streak {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Main content area for tablet */
|
||||
.main-content {
|
||||
margin-left: 260px;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
background: var(--bg);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) transparent;
|
||||
}
|
||||
|
||||
.main-content::-webkit-scrollbar { width: 6px; }
|
||||
.main-content::-webkit-scrollbar-track { background: transparent; }
|
||||
.main-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
||||
|
||||
.content-inner {
|
||||
padding: var(--space-8) var(--space-10);
|
||||
max-width: 740px;
|
||||
}
|
||||
|
||||
/* Two-column layout */
|
||||
.two-col {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-5);
|
||||
}
|
||||
|
||||
/* Page header for tablet */
|
||||
.page-header {
|
||||
margin-bottom: var(--space-6);
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-3xl);
|
||||
font-weight: 700;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.page-header-sub {
|
||||
font-size: var(--text-base);
|
||||
color: var(--muted);
|
||||
margin-top: var(--space-1);
|
||||
}
|
||||
|
||||
/* Tablet status bar (simplified) */
|
||||
.tablet-statusbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 260px;
|
||||
right: 0;
|
||||
height: 28px;
|
||||
background: var(--surface);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 var(--space-5);
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
/* Focus visible styles for accessibility */
|
||||
button:focus-visible,
|
||||
a:focus-visible,
|
||||
[role="button"]:focus-visible {
|
||||
box-shadow: var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Minimum touch target for tablet */
|
||||
button,
|
||||
[role="button"] {
|
||||
min-height: 44px;
|
||||
}
|
||||
461
docs/opendesign/screens/templates.html
Normal file
461
docs/opendesign/screens/templates.html
Normal file
@@ -0,0 +1,461 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 模板画廊</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px;
|
||||
height: 844px;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: auto;
|
||||
padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
padding-bottom: var(--safe-bottom);
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
.top-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.top-bar h2 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.back-btn {
|
||||
min-width: 44px;
|
||||
min-height: 44px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
color: var(--fg);
|
||||
box-shadow: var(--elev-soft);
|
||||
}
|
||||
.back-btn svg { width: 20px; height: 20px; }
|
||||
|
||||
/* View type */
|
||||
.view-types {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.view-type-btn {
|
||||
flex: 1;
|
||||
padding: 12px;
|
||||
min-height: 44px;
|
||||
border-radius: var(--radius-md);
|
||||
border: 2px solid var(--border);
|
||||
background: var(--surface);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.view-type-btn.active {
|
||||
border-color: var(--accent);
|
||||
background: var(--surface-warm);
|
||||
}
|
||||
.view-type-btn .icon {
|
||||
font-size: 28px;
|
||||
}
|
||||
.view-type-btn .label {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
.view-type-btn.active .label { color: var(--accent); }
|
||||
|
||||
/* Template preview cards */
|
||||
.template-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.template-card {
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
box-shadow: var(--elev-soft);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.template-card:hover { transform: translateY(-2px); box-shadow: var(--elev-medium); }
|
||||
|
||||
.template-preview {
|
||||
height: 200px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Daily template previews */
|
||||
.tpl-daily-simple {
|
||||
background: linear-gradient(180deg, var(--bg), #FFE8D6);
|
||||
padding: var(--space-5);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tpl-daily-simple .tpl-date {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
.tpl-daily-simple .tpl-title-line {
|
||||
width: 60%;
|
||||
height: 8px;
|
||||
background: var(--fg);
|
||||
border-radius: 4px;
|
||||
opacity: 0.2;
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
.tpl-daily-simple .tpl-lines {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.tpl-daily-simple .tpl-line {
|
||||
height: 4px;
|
||||
background: var(--fg);
|
||||
border-radius: 2px;
|
||||
opacity: 0.08;
|
||||
}
|
||||
|
||||
.tpl-daily-photo {
|
||||
background: linear-gradient(180deg, var(--secondary-soft), #E8F4ED);
|
||||
padding: var(--space-5);
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
.tpl-daily-photo .tpl-text-col {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding-top: var(--space-4);
|
||||
}
|
||||
.tpl-daily-photo .tpl-text-col .line {
|
||||
height: 4px;
|
||||
background: var(--fg);
|
||||
border-radius: 2px;
|
||||
opacity: 0.1;
|
||||
}
|
||||
.tpl-daily-photo .tpl-photo-col {
|
||||
width: 80px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: rgba(255,255,255,0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.tpl-daily-grid {
|
||||
background: linear-gradient(180deg, var(--tertiary-soft), #FFF3E0);
|
||||
padding: var(--space-5);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.tpl-daily-grid .cell {
|
||||
background: rgba(255,255,255,0.5);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: var(--space-3);
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.tpl-daily-grid .cell .emoji { font-size: 18px; margin-bottom: 4px; }
|
||||
|
||||
/* Weekly preview */
|
||||
.tpl-weekly {
|
||||
background: linear-gradient(180deg, var(--rose-soft), #FFF0F0);
|
||||
padding: var(--space-4);
|
||||
}
|
||||
.tpl-weekly-row {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
.tpl-weekly-cell {
|
||||
flex: 1;
|
||||
background: rgba(255,255,255,0.5);
|
||||
border-radius: 6px;
|
||||
padding: 6px 4px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.tpl-weekly-cell .day { font-weight: 600; color: var(--fg-2); margin-bottom: 4px; }
|
||||
.tpl-weekly-cell .dot { width: 6px; height: 6px; border-radius: 50%; margin: 4px auto; }
|
||||
|
||||
/* Monthly preview */
|
||||
.tpl-monthly {
|
||||
background: linear-gradient(180deg, #E8F4ED, #F0FFF4);
|
||||
padding: var(--space-4);
|
||||
}
|
||||
.tpl-monthly-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 2px;
|
||||
}
|
||||
.tpl-monthly-cell {
|
||||
aspect-ratio: 1;
|
||||
border-radius: 4px;
|
||||
background: rgba(255,255,255,0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 8px;
|
||||
color: var(--meta);
|
||||
}
|
||||
|
||||
.template-meta {
|
||||
padding: var(--space-4) var(--space-5);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.template-meta .info h4 {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.template-meta .info .desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--muted);
|
||||
}
|
||||
.template-meta .use-btn {
|
||||
padding: 8px 20px;
|
||||
background: var(--accent);
|
||||
color: var(--accent-on);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
min-height: 44px;
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.template-meta .use-btn:hover { background: var(--accent-hover); }
|
||||
.template-meta .use-btn:active { transform: scale(0.95); }
|
||||
|
||||
/* Tags */
|
||||
.template-tags {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
padding: 0 var(--space-5) var(--space-4);
|
||||
}
|
||||
.tpl-tag {
|
||||
padding: 3px 10px;
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<!-- Top bar -->
|
||||
<div class="top-bar anim-fade">
|
||||
<button class="back-btn" aria-label="返回">
|
||||
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M13 17l-6-6 6-6"/></svg>
|
||||
</button>
|
||||
<h2>模板画廊</h2>
|
||||
<div style="width:44px"></div>
|
||||
</div>
|
||||
|
||||
<!-- View type selector -->
|
||||
<div class="view-types anim-fade" style="animation-delay: 0.1s">
|
||||
<button class="view-type-btn active" aria-label="日视图模板">
|
||||
<div class="icon">📝</div>
|
||||
<div class="label">日视图</div>
|
||||
</button>
|
||||
<button class="view-type-btn" aria-label="周视图模板">
|
||||
<div class="icon">📅</div>
|
||||
<div class="label">周视图</div>
|
||||
</button>
|
||||
<button class="view-type-btn" aria-label="月视图模板">
|
||||
<div class="icon">🗓</div>
|
||||
<div class="label">月视图</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Template list -->
|
||||
<div class="template-list">
|
||||
|
||||
<!-- Template 1: Student - Exam Prep -->
|
||||
<div class="template-card anim-fade" style="animation-delay: 0.15s">
|
||||
<div class="template-preview">
|
||||
<div class="tpl-daily-simple" style="background: linear-gradient(180deg, var(--secondary-soft), #C8E6D0)">
|
||||
<div class="tpl-date" style="color: #2D7D46">期末考试复习计划</div>
|
||||
<div class="tpl-title-line" style="background: var(--secondary); opacity: 0.4"></div>
|
||||
<div class="tpl-lines">
|
||||
<div class="tpl-line" style="width: 100%; background: var(--secondary); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 85%; background: var(--secondary); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 90%; background: var(--secondary); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 70%; background: var(--secondary); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 95%; background: var(--secondary); opacity: 0.15"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-meta">
|
||||
<div class="info">
|
||||
<h4>期末考试复习计划</h4>
|
||||
<div class="desc">按科目安排复习进度,记录重点难点</div>
|
||||
</div>
|
||||
<button class="use-btn" aria-label="使用期末考试复习计划模板">使用</button>
|
||||
</div>
|
||||
<div class="template-tags">
|
||||
<span class="tpl-tag" style="background: var(--secondary-soft); color: #2D7D46">学生专属</span>
|
||||
<span class="tpl-tag" style="background: var(--tertiary-soft); color: #B8860B">2.3k 人使用</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Template 2: Student - Course Schedule -->
|
||||
<div class="template-card anim-fade" style="animation-delay: 0.2s">
|
||||
<div class="template-preview">
|
||||
<div class="tpl-daily-grid" style="background: linear-gradient(180deg, var(--tertiary-soft), #FFE8C0)">
|
||||
<div class="cell" style="background: rgba(255,255,255,0.6)"><div class="emoji">📚</div>周一</div>
|
||||
<div class="cell" style="background: rgba(255,255,255,0.6)"><div class="emoji">✏️</div>周二</div>
|
||||
<div class="cell" style="background: rgba(255,255,255,0.6)"><div class="emoji">📖</div>周三</div>
|
||||
<div class="cell" style="background: rgba(255,255,255,0.6)"><div class="emoji">🔬</div>周四</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-meta">
|
||||
<div class="info">
|
||||
<h4>课程表周计划</h4>
|
||||
<div class="desc">每周课程安排+作业追踪</div>
|
||||
</div>
|
||||
<button class="use-btn" aria-label="使用课程表周计划模板">使用</button>
|
||||
</div>
|
||||
<div class="template-tags">
|
||||
<span class="tpl-tag" style="background: var(--secondary-soft); color: #2D7D46">学生专属</span>
|
||||
<span class="tpl-tag" style="background: var(--tertiary-soft); color: #B8860B">5.1k 人使用</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Template 3: Student - Reading Notes -->
|
||||
<div class="template-card anim-fade" style="animation-delay: 0.25s">
|
||||
<div class="template-preview">
|
||||
<div class="tpl-daily-photo" style="background: linear-gradient(180deg, var(--rose-soft), #FFE4E4)">
|
||||
<div class="tpl-text-col">
|
||||
<div class="line" style="width: 50%; height: 6px; background: var(--rose); opacity: 0.4"></div>
|
||||
<div class="line" style="width: 100%; background: var(--rose); opacity: 0.2"></div>
|
||||
<div class="line" style="width: 80%; background: var(--rose); opacity: 0.2"></div>
|
||||
<div class="line" style="width: 90%; background: var(--rose); opacity: 0.2"></div>
|
||||
<div class="line" style="width: 60%; background: var(--rose); opacity: 0.2"></div>
|
||||
</div>
|
||||
<div class="tpl-photo-col" style="background: rgba(255,255,255,0.5)">📖</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-meta">
|
||||
<div class="info">
|
||||
<h4>读书笔记手账</h4>
|
||||
<div class="desc">摘录+感悟+思维导图</div>
|
||||
</div>
|
||||
<button class="use-btn" aria-label="使用读书笔记手账模板">使用</button>
|
||||
</div>
|
||||
<div class="template-tags">
|
||||
<span class="tpl-tag" style="background: var(--secondary-soft); color: #2D7D46">学生专属</span>
|
||||
<span class="tpl-tag" style="background: var(--tertiary-soft); color: #B8860B">3.8k 人使用</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Template 4: Student - Campus Life -->
|
||||
<div class="template-card anim-fade" style="animation-delay: 0.3s">
|
||||
<div class="template-preview">
|
||||
<div class="tpl-daily-simple" style="background: linear-gradient(180deg, #FFE8D6, #FFD4B8)">
|
||||
<div class="tpl-date" style="color: var(--accent-active)">校园生活记录</div>
|
||||
<div class="tpl-title-line" style="background: var(--accent); opacity: 0.4"></div>
|
||||
<div class="tpl-lines">
|
||||
<div class="tpl-line" style="width: 100%; background: var(--accent); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 85%; background: var(--accent); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 90%; background: var(--accent); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 70%; background: var(--accent); opacity: 0.15"></div>
|
||||
<div class="tpl-line" style="width: 95%; background: var(--accent); opacity: 0.15"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-meta">
|
||||
<div class="info">
|
||||
<h4>校园生活记录</h4>
|
||||
<div class="desc">社团活动+友谊+成长</div>
|
||||
</div>
|
||||
<button class="use-btn" aria-label="使用校园生活记录模板">使用</button>
|
||||
</div>
|
||||
<div class="template-tags">
|
||||
<span class="tpl-tag" style="background: var(--secondary-soft); color: #2D7D46">学生专属</span>
|
||||
<span class="tpl-tag" style="background: var(--tertiary-soft); color: #B8860B">1.9k 人使用</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Template 5: Monthly -->
|
||||
<div class="template-card anim-fade" style="animation-delay: 0.35s">
|
||||
<div class="template-preview">
|
||||
<div class="tpl-monthly">
|
||||
<div style="font-size:11px;color:var(--muted);margin-bottom:8px;font-weight:600">2026年5月</div>
|
||||
<div class="tpl-monthly-grid">
|
||||
<div class="tpl-monthly-cell"></div><div class="tpl-monthly-cell"></div><div class="tpl-monthly-cell"></div><div class="tpl-monthly-cell"></div><div class="tpl-monthly-cell"></div><div class="tpl-monthly-cell" style="background:var(--secondary-soft)">1</div><div class="tpl-monthly-cell" style="background:var(--secondary-soft)">2</div>
|
||||
<div class="tpl-monthly-cell" style="background:var(--tertiary-soft)">3</div><div class="tpl-monthly-cell" style="background:var(--rose-soft)">4</div><div class="tpl-monthly-cell" style="background:var(--secondary-soft)">5</div><div class="tpl-monthly-cell" style="background:var(--secondary-soft)">6</div><div class="tpl-monthly-cell" style="background:#E0E0E0">7</div><div class="tpl-monthly-cell" style="background:var(--secondary-soft)">8</div><div class="tpl-monthly-cell" style="background:var(--rose-soft)">9</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-meta">
|
||||
<div class="info">
|
||||
<h4>月历手账</h4>
|
||||
<div class="desc">月度日历 + 心情色彩,一整月一目了然</div>
|
||||
</div>
|
||||
<button class="use-btn" aria-label="使用月历模板">使用</button>
|
||||
</div>
|
||||
<div class="template-tags">
|
||||
<span class="tpl-tag" style="background: var(--border-soft); color: var(--muted)">月视图</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
285
docs/opendesign/screens/weekly.html
Normal file
285
docs/opendesign/screens/weekly.html
Normal file
@@ -0,0 +1,285 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=390, height=844, initial-scale=1, viewport-fit=cover">
|
||||
<title>暖记 — 周概览</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../css/tokens.css">
|
||||
<link rel="stylesheet" href="../css/components.css">
|
||||
<style>
|
||||
body {
|
||||
width: 390px; height: 844px;
|
||||
overflow: hidden; background: var(--bg);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Global focus styles */
|
||||
button:focus-visible, a:focus-visible, [role="tab"]:focus-visible {
|
||||
box-shadow: 0 0 0 3px var(--focus-ring);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
position: absolute; top: 0; left: 0; right: 0;
|
||||
bottom: calc(var(--tab-height) + var(--safe-bottom));
|
||||
overflow-y: auto; padding: 0 var(--space-5);
|
||||
padding-top: calc(var(--safe-top) + var(--space-2));
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.content-area::-webkit-scrollbar { display: none; }
|
||||
|
||||
.week-header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
.week-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-2xl); font-weight: 700;
|
||||
}
|
||||
.week-nav { display: flex; gap: var(--space-2); }
|
||||
.week-nav button {
|
||||
min-width: 44px; min-height: 44px; border-radius: 50%;
|
||||
border: 1.5px solid var(--border); background: var(--surface);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
cursor: pointer; color: var(--fg);
|
||||
transition: all var(--motion-fast);
|
||||
}
|
||||
.week-nav button:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.week-nav button svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Week strip */
|
||||
.week-strip {
|
||||
display: flex; gap: 4px; margin-bottom: var(--space-5);
|
||||
}
|
||||
.week-day {
|
||||
flex: 1; text-align: center; padding: var(--space-3) 0;
|
||||
border-radius: var(--radius-md); cursor: pointer;
|
||||
transition: all var(--motion-fast);
|
||||
min-height: 44px;
|
||||
}
|
||||
.week-day:hover { background: var(--surface-warm); }
|
||||
.week-day .wd-name { font-size: 11px; color: var(--meta); margin-bottom: 4px; }
|
||||
.week-day .wd-num {
|
||||
font-family: var(--font-display); font-size: var(--text-lg);
|
||||
font-weight: 700; color: var(--fg-2);
|
||||
}
|
||||
.week-day .wd-mood { font-size: 16px; margin-top: 4px; }
|
||||
.week-day.today {
|
||||
background: var(--accent); border-radius: var(--radius-md);
|
||||
}
|
||||
.week-day.today .wd-name { color: rgba(255,248,240,0.85); }
|
||||
.week-day.today .wd-num { color: var(--accent-on); }
|
||||
.week-day.has-entry .wd-num::after {
|
||||
content: ''; display: block; width: 4px; height: 4px;
|
||||
border-radius: 50%; background: var(--accent); margin: 4px auto 0;
|
||||
}
|
||||
.week-day.today.has-entry .wd-num::after { background: white; }
|
||||
|
||||
/* Day cards */
|
||||
.day-card {
|
||||
background: var(--surface); border-radius: var(--radius-md);
|
||||
padding: var(--space-4); margin-bottom: var(--space-3);
|
||||
box-shadow: var(--elev-soft); border: 1px solid var(--border-soft);
|
||||
cursor: pointer; transition: all var(--motion-fast);
|
||||
}
|
||||
.day-card:hover { transform: translateY(-1px); }
|
||||
.day-card-header {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
margin-bottom: var(--space-3);
|
||||
}
|
||||
.day-card-header .date {
|
||||
font-size: var(--text-sm); font-weight: 600; color: var(--fg-2);
|
||||
}
|
||||
.day-card-header .mood-weather {
|
||||
display: flex; gap: var(--space-2); align-items: center;
|
||||
font-size: var(--text-sm);
|
||||
}
|
||||
.day-card-body {
|
||||
font-size: var(--text-sm); color: var(--muted); line-height: 1.6;
|
||||
display: -webkit-box; -webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical; overflow: hidden;
|
||||
}
|
||||
.day-card-tags {
|
||||
display: flex; gap: var(--space-2); margin-top: var(--space-3);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.day-tag {
|
||||
padding: 3px 10px; border-radius: var(--radius-pill);
|
||||
font-size: 11px; font-weight: 500;
|
||||
}
|
||||
.day-card-photo {
|
||||
width: 100%; height: 80px; border-radius: var(--radius-sm);
|
||||
margin-top: var(--space-3); object-fit: cover;
|
||||
}
|
||||
.photo-placeholder {
|
||||
width: 100%; height: 80px; border-radius: var(--radius-sm);
|
||||
background: linear-gradient(135deg, var(--surface-warm), var(--border-soft));
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
margin-top: var(--space-3); font-size: 24px;
|
||||
}
|
||||
|
||||
/* Week summary */
|
||||
.week-summary {
|
||||
background: var(--surface); border-radius: var(--radius-md);
|
||||
padding: var(--space-5); margin-bottom: var(--space-5);
|
||||
box-shadow: var(--elev-soft); border: 1px solid var(--border-soft);
|
||||
}
|
||||
.week-summary h4 {
|
||||
font-family: var(--font-display); font-size: var(--text-base);
|
||||
font-weight: 600; margin-bottom: var(--space-4);
|
||||
}
|
||||
.summary-row {
|
||||
display: flex; gap: var(--space-4); margin-bottom: var(--space-3);
|
||||
}
|
||||
.summary-item {
|
||||
flex: 1; text-align: center;
|
||||
}
|
||||
.summary-item .val {
|
||||
font-family: var(--font-display); font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
}
|
||||
.summary-item .val.accent { color: var(--accent); }
|
||||
.summary-item .val.green { color: var(--secondary); }
|
||||
.summary-item .desc {
|
||||
font-size: var(--text-xs); color: var(--muted); margin-top: 2px;
|
||||
}
|
||||
.mood-dist {
|
||||
display: flex; gap: var(--space-2); margin-top: var(--space-4);
|
||||
}
|
||||
.mood-seg {
|
||||
height: 8px; border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content-area">
|
||||
|
||||
<div class="week-header anim-fade">
|
||||
<div class="week-title">本周概览</div>
|
||||
<div class="week-nav">
|
||||
<button aria-label="上一周"><svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M11 14l-5-5 5-5"/></svg></button>
|
||||
<button aria-label="下一周"><svg viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M7 4l5 5-5 5"/></svg></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Week strip - using standardized 5 moods -->
|
||||
<div class="week-strip anim-fade" style="animation-delay: 0.1s">
|
||||
<div class="week-day has-entry">
|
||||
<div class="wd-name">一</div><div class="wd-num">25</div><div class="wd-mood">😊</div>
|
||||
</div>
|
||||
<div class="week-day has-entry">
|
||||
<div class="wd-name">二</div><div class="wd-num">26</div><div class="wd-mood">😐</div>
|
||||
</div>
|
||||
<div class="week-day has-entry">
|
||||
<div class="wd-name">三</div><div class="wd-num">27</div><div class="wd-mood">😊</div>
|
||||
</div>
|
||||
<div class="week-day has-entry">
|
||||
<div class="wd-name">四</div><div class="wd-num">28</div><div class="wd-mood">😊</div>
|
||||
</div>
|
||||
<div class="week-day has-entry">
|
||||
<div class="wd-name">五</div><div class="wd-num">29</div><div class="wd-mood">😊</div>
|
||||
</div>
|
||||
<div class="week-day has-entry">
|
||||
<div class="wd-name">六</div><div class="wd-num">30</div><div class="wd-mood">😊</div>
|
||||
</div>
|
||||
<div class="week-day today has-entry">
|
||||
<div class="wd-name">日</div><div class="wd-num">31</div><div class="wd-mood">😊</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Week summary -->
|
||||
<div class="week-summary anim-fade" style="animation-delay: 0.15s">
|
||||
<h4>本周总结</h4>
|
||||
<div class="summary-row">
|
||||
<div class="summary-item">
|
||||
<div class="val accent">6</div><div class="desc">记录天数</div>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<div class="val green">7</div><div class="desc">日记篇数</div>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<div class="val">12</div><div class="desc">使用贴纸</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mood-dist">
|
||||
<div class="mood-seg" style="flex:3;background:var(--secondary)"></div>
|
||||
<div class="mood-seg" style="flex:2;background:var(--tertiary)"></div>
|
||||
<div class="mood-seg" style="flex:1;background:#5B7DB1"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Day cards - using standardized 5 moods -->
|
||||
<div class="day-card anim-fade" style="animation-delay: 0.2s">
|
||||
<div class="day-card-header">
|
||||
<span class="date">周日 · 5月31日</span>
|
||||
<div class="mood-weather">😊 ☀️</div>
|
||||
</div>
|
||||
<div class="day-card-body">今天下午去图书馆自习,阳光从窗外洒进来,暖暖的。喝了抹茶拿铁,虽然期末压力大但看到窗外的樱花还在开,觉得一切都会好的。</div>
|
||||
<div class="day-card-tags">
|
||||
<span class="day-tag" style="background:var(--secondary-soft);color:#2D7D46">学习</span>
|
||||
<span class="day-tag" style="background:var(--tertiary-soft);color:#B8860B">美食</span>
|
||||
</div>
|
||||
<div class="photo-placeholder">📚</div>
|
||||
</div>
|
||||
|
||||
<div class="day-card anim-fade" style="animation-delay: 0.25s">
|
||||
<div class="day-card-header">
|
||||
<span class="date">周六 · 5月30日</span>
|
||||
<div class="mood-weather">😊 🌤</div>
|
||||
</div>
|
||||
<div class="day-card-body">今天在图书馆自习,窗外的阳光洒进来,暖暖的。复习了高数第三章,做了两套模拟题感觉还不错。</div>
|
||||
<div class="day-card-tags">
|
||||
<span class="day-tag" style="background:var(--secondary-soft);color:#2D7D46">学习</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="day-card anim-fade" style="animation-delay: 0.3s">
|
||||
<div class="day-card-header">
|
||||
<span class="date">周五 · 5月29日</span>
|
||||
<div class="mood-weather">😊 ☀️</div>
|
||||
</div>
|
||||
<div class="day-card-body">考完试和舍友们去吃了火锅庆祝,大家都好开心,聊了很多有趣的事。这学期终于结束了!</div>
|
||||
<div class="day-card-tags">
|
||||
<span class="day-tag" style="background:var(--rose-soft);color:#9B4D4D">朋友</span>
|
||||
<span class="day-tag" style="background:var(--tertiary-soft);color:#B8860B">美食</span>
|
||||
</div>
|
||||
<div class="photo-placeholder">🍲</div>
|
||||
</div>
|
||||
|
||||
<div style="height: var(--space-8)"></div>
|
||||
</div>
|
||||
|
||||
<!-- Tab bar -->
|
||||
<nav class="tab-bar" role="tablist">
|
||||
<button class="tab-item" role="tab" aria-label="首页" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
<span>首页</span>
|
||||
</button>
|
||||
<button class="tab-item active" role="tab" aria-label="日历" aria-selected="true">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
|
||||
<span>日历</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="写日记" aria-selected="false" style="position:relative">
|
||||
<div style="width:44px;height:44px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-16px;box-shadow:0 4px 12px var(--shadow-accent)">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="var(--accent-on)" stroke-width="2.5" stroke-linecap="round" style="width:22px;height:22px" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
|
||||
</div>
|
||||
<span style="margin-top:2px">写日记</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="发现" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||||
<span>发现</span>
|
||||
</button>
|
||||
<button class="tab-item" role="tab" aria-label="我的" aria-selected="false">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
<span>我的</span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="dynamic-island" aria-hidden="true"></div>
|
||||
<div class="home-indicator" style="position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:101" aria-hidden="true"></div>
|
||||
|
||||
<script src="../js/theme-switcher.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
1121
docs/opendesign/warm-notes-design-spec.md
Normal file
1121
docs/opendesign/warm-notes-design-spec.md
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user