fix(app): 全链路验证修复 — 编译错误/CORS/迁移/启动脚本
Some checks failed
Main Merge / backend (push) Has been cancelled
Main Merge / frontend (push) Has been cancelled

前端修复:
- 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:
iven
2026-06-02 01:03:58 +08:00
parent 749ef55b89
commit b320641d9c
56 changed files with 20696 additions and 239 deletions

View 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>

View 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>

View 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()">&times;</span></span>
<span class="tag-pill">#学习<span class="remove" aria-label="删除标签 学习" role="button" onclick="this.parentElement.remove()">&times;</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()">&times;</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()">&times;</span>';
area.appendChild(pill);
btn.style.display = 'none';
}
</script>
<script src="../../js/theme-switcher.js"></script>
</body>
</html>

View 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>

View 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>

View 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>

View 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;
}