feat(reader): implement FEAT-01 Focus Zen Mode (100% vh/vw, auto-hiding HUD, hotkeys F/Esc, native fullscreen)
This commit is contained in:
1 parent
9bbc9473de
commit
f10965eff5
13 files changed
+3157
-792
No files matched your search
@@ -1688,3 +1688,151 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
FEAT-02: Murphy Cheatsheet Tables & Rich Detailed Notes
|
||||
========================================================================== */
|
||||
|
||||
.grammar-table-wrap {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border-color);
|
||||
background: var(--bg-card);
|
||||
box-shadow: var(--shadow-sm);
|
||||
margin: 12px 0 16px 0;
|
||||
}
|
||||
|
||||
.grammar-cheatsheet-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 13.5px;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.grammar-cheatsheet-table thead th {
|
||||
background: var(--bg-surface-hover);
|
||||
color: var(--text-main);
|
||||
font-weight: 700;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 2px solid var(--border-color);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.grammar-cheatsheet-table tbody td {
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
color: var(--text-main);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.grammar-cheatsheet-table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.grammar-cheatsheet-table tbody tr:hover {
|
||||
background: rgba(99, 102, 241, 0.04);
|
||||
}
|
||||
|
||||
.grammar-inline-code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
font-size: 12.5px;
|
||||
background: var(--bg-input);
|
||||
color: var(--color-primary);
|
||||
padding: 2px 5px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.grammar-notes-box {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 20px 24px;
|
||||
color: var(--text-main);
|
||||
font-size: 14px;
|
||||
line-height: 1.65;
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.grammar-notes-box .grammar-note-h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: var(--text-main);
|
||||
margin: 16px 0 8px 0;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.grammar-notes-box .grammar-note-h4 {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
margin: 16px 0 8px 0;
|
||||
}
|
||||
|
||||
.grammar-notes-box .grammar-note-h5 {
|
||||
font-size: 13.5px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
margin: 12px 0 6px 0;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
.grammar-notes-box .grammar-note-p {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.grammar-notes-box .grammar-note-quote {
|
||||
border-left: 3px solid var(--color-primary);
|
||||
background: rgba(99, 102, 241, 0.06);
|
||||
padding: 8px 14px;
|
||||
margin: 10px 0;
|
||||
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
|
||||
font-style: italic;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.grammar-notes-list {
|
||||
margin: 0 0 12px 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.grammar-notes-list li {
|
||||
margin-bottom: 6px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
/* Collapsible Practice Cheatsheet Drawer */
|
||||
.practice-cheatsheet-toggle-wrap {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.practice-cheatsheet-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
padding: 6px 12px;
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.practice-cheatsheet-btn:hover {
|
||||
color: var(--text-main);
|
||||
background: var(--bg-surface-hover);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.practice-cheatsheet-drawer {
|
||||
margin-top: 10px;
|
||||
animation: fadeIn 0.2s ease-out;
|
||||
}
|
||||
|
||||
|
||||
+187
-2
@@ -2061,6 +2061,191 @@
|
||||
font-size: 17px;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
FEAT-01: Focus Mode in Reader (Zen Reader — 100% vh & 100% vw)
|
||||
========================================================================== */
|
||||
|
||||
.reader-zen-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--text-main);
|
||||
border-color: var(--border-color);
|
||||
transition: var(--transition);
|
||||
}
|
||||
|
||||
.reader-zen-btn:hover {
|
||||
border-color: var(--primary);
|
||||
color: var(--primary);
|
||||
background-color: var(--primary-dim);
|
||||
}
|
||||
|
||||
/* Fullscreen / Zen Viewport Override */
|
||||
body.zen-mode-active {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
body.zen-mode-active #app-header,
|
||||
body.zen-mode-active #bottom-tab-bar,
|
||||
body.zen-mode-active .reader-toolbar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body.zen-mode-active .reader-view {
|
||||
max-width: 100% !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
body.zen-mode-active #reader-interface {
|
||||
position: fixed !important;
|
||||
inset: 0 !important;
|
||||
width: 100vw !important;
|
||||
height: 100dvh !important;
|
||||
z-index: 9999 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
background-color: var(--reader-bg) !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
body.zen-mode-active #reader-scroll-area {
|
||||
width: 100vw !important;
|
||||
height: 100dvh !important;
|
||||
padding-top: max(24px, env(safe-area-inset-top)) !important;
|
||||
padding-bottom: max(60px, env(safe-area-inset-bottom)) !important;
|
||||
box-sizing: border-box !important;
|
||||
overflow-y: auto !important;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* Floating Minimal HUD in Zen Mode */
|
||||
.reader-zen-hud {
|
||||
position: fixed;
|
||||
top: max(16px, env(safe-area-inset-top));
|
||||
right: max(20px, env(safe-area-inset-right));
|
||||
z-index: 10002;
|
||||
transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
user-select: none;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.reader-zen-hud.hud-idle {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
|
||||
.zen-hud-content {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: rgba(15, 23, 42, 0.82);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
border-radius: var(--radius-full);
|
||||
padding: 6px 14px;
|
||||
font-size: 13px;
|
||||
color: #e2e8f0;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.zen-hud-title {
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: 600;
|
||||
color: #f8fafc;
|
||||
}
|
||||
|
||||
.zen-hud-sep {
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.zen-hud-chapter {
|
||||
font-size: 12px;
|
||||
color: #cbd5e1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.zen-hud-progress {
|
||||
font-weight: 700;
|
||||
color: #38bdf8;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.zen-hud-exit-btn {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
color: #cbd5e1;
|
||||
border-radius: 50%;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
transition: all 0.15s ease;
|
||||
padding: 0;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.zen-hud-exit-btn:hover {
|
||||
background: rgba(239, 68, 68, 0.35);
|
||||
border-color: rgba(239, 68, 68, 0.6);
|
||||
color: #fca5a5;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
/* Theme-adaptive HUD styling for Sepia & Light themes */
|
||||
.reader-scroll-area.reader-theme-sepia ~ #reader-zen-hud .zen-hud-content {
|
||||
background: rgba(247, 237, 214, 0.88);
|
||||
border-color: rgba(146, 64, 14, 0.25);
|
||||
color: #453422;
|
||||
box-shadow: 0 4px 20px rgba(70, 50, 30, 0.18);
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-sepia ~ #reader-zen-hud .zen-hud-title {
|
||||
color: #291e14;
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-sepia ~ #reader-zen-hud .zen-hud-progress {
|
||||
color: #d97706;
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-sepia ~ #reader-zen-hud .zen-hud-exit-btn {
|
||||
background: rgba(146, 64, 14, 0.12);
|
||||
border-color: rgba(146, 64, 14, 0.2);
|
||||
color: #453422;
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-light ~ #reader-zen-hud .zen-hud-content {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-color: rgba(0, 0, 0, 0.12);
|
||||
color: #1e293b;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-light ~ #reader-zen-hud .zen-hud-title {
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-light ~ #reader-zen-hud .zen-hud-progress {
|
||||
color: #0284c7;
|
||||
}
|
||||
|
||||
.reader-scroll-area.reader-theme-light ~ #reader-zen-hud .zen-hud-exit-btn {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border-color: rgba(0, 0, 0, 0.15);
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user