This commit is contained in:
2026-04-12 01:06:31 +07:00
commit 10d660cbcb
1066 changed files with 228596 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
/**
* Novel Theme - Base Styles
* Reset, html, body fundamentals
*/
/* Base Reset */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 18px;
scroll-behavior: smooth;
}
html[data-font-size="S"] { font-size: 16px; }
html[data-font-size="M"] { font-size: 18px; }
html[data-font-size="L"] { font-size: 20px; }
body {
font-family: var(--font-body);
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.7;
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Custom scrollbar for entire page */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 5px;
border: 2px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
/* Firefox scrollbar */
* {
scrollbar-width: thin;
scrollbar-color: var(--border) var(--bg-secondary);
}

View File

@@ -0,0 +1,188 @@
/**
* Novel Theme - Component Styles
* Code blocks, blockquotes, tables, images, horizontal rules
*/
/* Code */
code {
font-family: var(--font-mono);
font-size: 0.9em;
background: var(--code-bg);
padding: 0.15em 0.4em;
border-radius: 4px;
}
pre {
background: var(--code-bg);
padding: 1rem;
border-radius: 8px;
overflow-x: auto;
margin: 1.5rem 0;
border: 1px solid var(--border-light);
/* Use fit-content so wide ASCII art expands beyond .content container */
width: fit-content;
min-width: 100%;
max-width: calc(100vw - var(--sidebar-width) - 6rem);
/* Center the expanded code block relative to .content */
position: relative;
left: 50%;
transform: translateX(-50%);
/* Ensure ASCII art and wide code is scrollable, not clipped */
white-space: pre;
/* Always show scrollbar when content overflows */
scrollbar-width: thin;
}
/* Webkit scrollbar for code blocks */
pre::-webkit-scrollbar {
height: 8px;
}
pre::-webkit-scrollbar-track {
background: var(--bg-secondary);
border-radius: 4px;
}
pre::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
pre::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
pre code {
background: none;
padding: 0;
font-size: 0.85rem;
line-height: 1.6;
/* Preserve whitespace for ASCII art */
white-space: pre;
display: block;
}
/* Blockquote */
blockquote {
border-left: 3px solid var(--accent);
margin: 1.5rem 0;
padding: 0.5rem 1rem;
background: var(--bg-secondary);
border-radius: 0 8px 8px 0;
font-style: italic;
}
blockquote p:last-child {
margin-bottom: 0;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
font-size: 0.9rem;
}
th, td {
padding: 0.75rem 1rem;
text-align: left;
border: 1px solid var(--border);
}
th {
background: var(--bg-secondary);
font-weight: 600;
}
tr:nth-child(even) {
background: var(--bg-secondary);
}
/* Images */
img {
max-width: 100%;
height: auto;
border-radius: 8px;
margin: 1.5rem auto;
display: block;
box-shadow: 0 4px 12px var(--shadow);
}
/* Horizontal rule */
hr {
border: none;
border-top: 1px solid var(--border);
margin: 2rem 0;
}
/* Code block expand toggle (similar to mermaid) */
.code-wrapper {
position: relative;
margin: 1.5rem 0;
transition: width 0.2s ease, left 0.2s ease;
}
.code-wrapper pre {
margin: 0;
}
.code-expand-btn {
position: absolute;
top: 0.5rem;
right: 0.5rem;
z-index: 10;
padding: 0.25rem 0.5rem;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
cursor: pointer;
color: var(--text-muted);
font-size: 0.7rem;
line-height: 1;
transition: all 0.2s;
opacity: 0;
}
.code-wrapper:hover .code-expand-btn {
opacity: 1;
}
.code-expand-btn:hover {
background: var(--bg-secondary);
color: var(--text-primary);
border-color: var(--accent);
}
/* Always show button when expanded */
.code-wrapper.expanded .code-expand-btn {
opacity: 1;
background: var(--accent);
color: white;
border-color: var(--accent);
}
.code-wrapper.expanded .code-expand-btn:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
}
/* Expanded state for code blocks — width and offset set dynamically by JS (initCodeExpand)
to fill .main-content without affecting sibling content or using viewport units */
.code-wrapper.expanded {
max-width: none;
position: relative;
padding: 0 2rem;
}
.code-wrapper.expanded pre {
max-width: none;
overflow-x: auto;
}
/* Icon visibility toggle for code blocks */
.code-expand-btn .icon-expand { display: inline; }
.code-expand-btn .icon-collapse { display: none; }
.code-wrapper.expanded .code-expand-btn .icon-expand { display: none; }
.code-wrapper.expanded .code-expand-btn .icon-collapse { display: inline; }

View File

@@ -0,0 +1,178 @@
/**
* Novel Theme - Content Styles
* Main content area, typography, navigation footer
*/
/* Main Content */
.main-content {
flex: 1;
margin-left: var(--sidebar-width);
padding: 2rem;
transition: margin-left 0.15s ease;
overflow-y: auto;
}
/* Custom scrollbar for main content */
.main-content::-webkit-scrollbar {
width: 8px;
}
.main-content::-webkit-scrollbar-track {
background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
body:not(.has-plan) .main-content {
margin-left: var(--sidebar-width);
}
.sidebar.hidden + .main-content {
margin-left: 0;
}
.content {
max-width: var(--content-width);
margin: 0 auto;
padding-bottom: 4rem;
/* Allow code blocks to visually overflow beyond content width */
overflow: visible;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
font-weight: 700;
margin: 2rem 0 1rem;
line-height: 1.3;
text-align: center;
color: var(--text-heading);
}
h1 {
font-size: 2rem;
margin-top: 0;
padding-bottom: 1rem;
border-bottom: 2px solid var(--border);
}
h2 {
font-size: 1.5rem;
margin-top: 3rem;
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}
h2::before,
h2::after {
content: '';
width: 20px;
height: 1px;
background: var(--border);
}
h3 {
font-size: 1.25rem;
}
h4, h5, h6 {
font-size: 1rem;
text-align: left;
}
p {
margin-bottom: 1rem;
}
a {
color: var(--link);
text-decoration: underline;
text-decoration-color: var(--border);
transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover {
color: var(--link-hover);
text-decoration-color: var(--link-hover);
}
/* Lists */
ul, ol {
margin: 1rem 0;
padding-left: 1.5rem;
}
li {
margin-bottom: 0.5rem;
}
li > ul, li > ol {
margin: 0.5rem 0;
}
/* Task lists (GFM) */
ul:has(input[type="checkbox"]) {
list-style: none;
padding-left: 0;
}
ul:has(input[type="checkbox"]) li {
display: flex;
align-items: flex-start;
gap: 0.5rem;
}
input[type="checkbox"] {
margin-top: 0.35rem;
accent-color: var(--accent);
}
/* Navigation Footer */
.nav-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 3rem;
padding-top: 2rem;
border-top: 1px solid var(--border);
}
.nav-prev, .nav-next {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
color: var(--text-secondary);
text-decoration: none;
border: 1px solid var(--border);
border-radius: 8px;
transition: all 0.2s;
}
.nav-prev:hover, .nav-next:hover {
background: var(--bg-secondary);
color: var(--accent);
border-color: var(--accent);
}
.nav-arrow {
font-size: 1.2rem;
}
.nav-label {
font-size: 0.875rem;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@@ -0,0 +1,217 @@
/**
* Novel Theme - Header Styles
* Header, controls, navigation, theme toggle
*/
/* Header */
.reader-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--header-height);
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
z-index: 100;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.reader-header.is-hidden {
transform: translateY(-100%);
}
.reader-header.is-fixed {
box-shadow: 0 2px 8px var(--shadow);
}
.header-left,
.header-right {
display: flex;
align-items: center;
gap: 0.5rem;
}
.back-to-dashboard {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.375rem 0.625rem;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
border-radius: 6px;
transition: all 0.15s ease;
}
.back-to-dashboard:hover {
color: var(--accent);
background: var(--accent-bg);
}
.back-to-dashboard svg {
flex-shrink: 0;
}
.header-divider {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 0.25rem;
}
.header-center {
flex: 1;
text-align: center;
overflow: hidden;
}
.doc-title {
font-family: var(--font-heading);
font-size: 1rem;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.icon-btn {
background: transparent;
border: none;
padding: 0.5rem;
cursor: pointer;
color: var(--text-secondary);
border-radius: 6px;
transition: background 0.2s, color 0.2s;
}
.icon-btn:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
}
/* Back button (link styled as icon-btn) */
a.icon-btn {
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
padding: 0.5rem;
border-radius: 6px;
transition: background 0.2s, color 0.2s;
}
a.icon-btn.back-btn {
color: var(--text-secondary);
}
a.icon-btn.back-btn:hover {
color: var(--accent);
background: var(--bg-tertiary);
}
/* Header Navigation (prev/next in header) */
.header-nav {
display: flex;
align-items: center;
gap: 0.25rem;
margin-left: 0.5rem;
padding-left: 0.5rem;
border-left: 1px solid var(--border);
}
.header-nav-btn {
display: flex;
align-items: center;
gap: 0.25rem;
padding: 0.375rem 0.625rem;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.8125rem;
font-weight: 500;
border-radius: 6px;
transition: all 0.15s ease;
white-space: nowrap;
}
.header-nav-btn:hover {
color: var(--accent);
background: var(--bg-tertiary);
text-decoration: none;
}
.header-nav-btn svg {
flex-shrink: 0;
}
.header-nav-btn.prev svg {
margin-right: 0.125rem;
}
.header-nav-btn.next svg {
margin-left: 0.125rem;
}
/* Theme toggle icons */
.sun-icon { display: block; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
/* Font controls */
.font-controls {
display: flex;
gap: 2px;
background: var(--bg-tertiary);
border-radius: 6px;
padding: 2px;
}
.font-btn {
background: transparent;
border: none;
padding: 0.25rem 0.5rem;
cursor: pointer;
color: var(--text-muted);
font-size: 0.75rem;
font-weight: 600;
border-radius: 4px;
transition: all 0.2s;
}
.font-btn:hover {
color: var(--text-primary);
}
.font-btn.active {
background: var(--bg-primary);
color: var(--accent);
box-shadow: 0 1px 2px var(--shadow);
}
/* Progress bar */
.progress-bar-container {
position: fixed;
top: var(--header-height);
left: 0;
right: 0;
height: 3px;
background: var(--bg-tertiary);
z-index: 99;
transition: top 0.3s ease;
}
.reader-header.is-hidden ~ .progress-bar-container {
top: 0;
}
.progress-bar-fill {
height: 100%;
width: 0%;
background: linear-gradient(90deg, var(--accent), var(--accent-hover));
transition: width 0.1s ease-out;
}

View File

@@ -0,0 +1,153 @@
/**
* Novel Theme - Mermaid Diagram Styles
* Mermaid diagrams, error containers
*/
/* Mermaid Diagrams */
pre.mermaid,
.mermaid {
text-align: center;
margin: 1.5rem 0;
padding: 1rem;
background: var(--bg-secondary);
border-radius: 8px;
border: 1px solid var(--border-light);
overflow-x: auto;
/* Reset pre defaults for mermaid */
white-space: pre-wrap;
font-family: inherit;
}
pre.mermaid[data-processed="true"],
.mermaid-rendered {
background: transparent;
border: none;
padding: 0;
}
/* Ensure rendered SVGs scale within their container */
.mermaid svg {
max-width: 100%;
height: auto;
}
.mermaid-error-container {
background: #fff5f5;
border-color: #f5c6cb;
}
[data-theme="dark"] .mermaid-error-container {
background: #3a2020;
border-color: #6a3030;
}
.mermaid-error {
text-align: left;
color: #842029;
font-size: 0.875rem;
}
[data-theme="dark"] .mermaid-error {
color: #f8d7da;
}
.mermaid-error strong {
display: block;
margin-bottom: 0.5rem;
}
.mermaid-error pre {
background: rgba(0, 0, 0, 0.05);
padding: 0.5rem;
margin: 0.5rem 0;
font-size: 0.8rem;
white-space: pre-wrap;
word-break: break-word;
}
[data-theme="dark"] .mermaid-error pre {
background: rgba(255, 255, 255, 0.05);
}
.mermaid-error details {
margin-top: 0.5rem;
}
.mermaid-error summary {
cursor: pointer;
color: var(--text-muted);
}
/* Mermaid expand toggle */
.mermaid-wrapper {
position: relative;
margin: 1.5rem 0;
}
.mermaid-expand-btn {
position: absolute;
top: 0.5rem;
right: 0.5rem;
z-index: 10;
padding: 0.375rem;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
cursor: pointer;
color: var(--text-muted);
font-size: 0.875rem;
line-height: 1;
transition: all 0.2s;
opacity: 0;
}
.mermaid-wrapper:hover .mermaid-expand-btn,
.mermaid-wrapper:focus-within .mermaid-expand-btn {
opacity: 1;
}
/* Always show button when expanded so user can collapse */
.mermaid-wrapper.expanded .mermaid-expand-btn {
opacity: 1;
background: var(--accent);
color: white;
border-color: var(--accent);
}
.mermaid-expand-btn:hover {
background: var(--bg-secondary);
color: var(--text-primary);
border-color: var(--accent);
}
.mermaid-wrapper.expanded .mermaid-expand-btn:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
}
/* Expanded state — width and offset set dynamically by JS (initMermaidExpand)
to fill .main-content without affecting sibling content or using viewport units */
.mermaid-wrapper.expanded {
max-width: none;
position: relative;
padding: 1rem 2rem;
background: var(--bg-secondary);
border-radius: 8px;
}
.mermaid-wrapper.expanded .mermaid {
max-width: none;
}
/* Override Mermaid's inline max-width so SVG fills expanded container */
.mermaid-wrapper.expanded .mermaid svg {
max-width: 100% !important;
width: 100%;
}
/* Icon visibility toggle */
.mermaid-expand-btn .icon-expand { display: inline; }
.mermaid-expand-btn .icon-collapse { display: none; }
.mermaid-wrapper.expanded .mermaid-expand-btn .icon-expand { display: none; }
.mermaid-wrapper.expanded .mermaid-expand-btn .icon-collapse { display: inline; }

View File

@@ -0,0 +1,202 @@
/**
* Novel Theme - Overlays Module
* Toast notifications and keyboard shortcuts cheatsheet
*/
/* ===========================
KEYBOARD SHORTCUTS TOAST
=========================== */
.shortcuts-toast {
position: fixed;
bottom: 2rem;
right: 2rem;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem 1.25rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
display: flex;
align-items: center;
gap: 1rem;
z-index: 1000;
font-family: var(--font-body);
font-size: 0.9rem;
color: var(--text-primary);
opacity: 0;
transform: translateY(1rem);
transition: opacity 0.3s ease, transform 0.3s ease;
pointer-events: none;
}
.shortcuts-toast.show {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.shortcuts-toast kbd {
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.2rem 0.5rem;
font-family: var(--font-mono);
font-size: 0.85rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.toast-dismiss {
background: none;
border: none;
color: var(--text-secondary);
font-size: 1.5rem;
line-height: 1;
cursor: pointer;
padding: 0;
margin: 0;
transition: color 0.2s ease;
}
.toast-dismiss:hover {
color: var(--text-primary);
}
/* ===========================
KEYBOARD SHORTCUTS MODAL
=========================== */
.shortcuts-overlay {
position: fixed;
inset: 0;
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.shortcuts-overlay[hidden] {
display: none;
}
.shortcuts-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
cursor: pointer;
}
.shortcuts-modal {
position: relative;
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
max-width: 500px;
width: 100%;
max-height: 80vh;
overflow: auto;
font-family: var(--font-body);
}
.shortcuts-modal header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5rem;
border-bottom: 1px solid var(--border);
}
.shortcuts-modal h2 {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
color: var(--text-primary);
}
.modal-close {
background: none;
border: none;
color: var(--text-secondary);
font-size: 1.75rem;
line-height: 1;
cursor: pointer;
padding: 0;
margin: 0;
transition: color 0.2s ease;
}
.modal-close:hover {
color: var(--text-primary);
}
.shortcuts-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
.shortcuts-table tbody tr {
border-bottom: 1px solid var(--border);
}
.shortcuts-table tbody tr:last-child {
border-bottom: none;
}
.shortcuts-table td {
padding: 1rem 1.5rem;
}
.shortcuts-table td:first-child {
width: 100px;
font-weight: 500;
}
.shortcuts-table td:last-child {
color: var(--text-secondary);
}
.shortcuts-table kbd {
display: inline-block;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.25rem 0.5rem;
font-family: var(--font-mono);
font-size: 0.85rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
min-width: 2rem;
text-align: center;
}
/* ===========================
RESPONSIVE
=========================== */
@media (max-width: 768px) {
.shortcuts-toast {
bottom: 1rem;
right: 1rem;
left: 1rem;
font-size: 0.85rem;
}
.shortcuts-modal {
max-width: 100%;
border-radius: 8px;
}
.shortcuts-modal header {
padding: 1rem;
}
.shortcuts-table td {
padding: 0.75rem 1rem;
}
.shortcuts-table td:first-child {
width: 80px;
}
}

View File

@@ -0,0 +1,285 @@
/**
* Novel Theme - Responsive Styles
* Media queries for responsive design, print styles
*/
/* Responsive - Tablet */
@media (max-width: 900px) {
.sidebar {
transform: translateX(-100%);
box-shadow: 2px 0 8px var(--shadow);
}
.sidebar.visible {
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
}
/* Responsive - Mobile */
@media (max-width: 600px) {
html {
font-size: 16px;
}
.reader-header {
padding: 0 0.75rem;
}
.content {
padding: 0 0.5rem;
}
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1.25rem;
}
.font-controls {
display: none;
}
.nav-footer {
flex-direction: column;
gap: 1rem;
}
.nav-prev, .nav-next {
width: 100%;
justify-content: center;
}
/* Hide header nav text on small screens */
.header-nav-btn span {
display: none;
}
.header-nav-btn {
padding: 0.375rem;
}
}
/* Mobile FAB (Floating Action Button) Group */
.fab-group {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
display: none; /* Hidden on desktop */
flex-direction: column;
gap: 0.75rem;
z-index: 1000;
}
@media (max-width: 768px) {
.fab-group {
display: flex;
}
}
.fab {
width: 48px;
height: 48px;
min-width: 48px;
min-height: 48px;
border-radius: 50%;
background: var(--accent);
color: white;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px var(--shadow);
transition: transform 0.2s ease, box-shadow 0.2s ease;
text-decoration: none;
}
.fab:hover {
transform: scale(1.05);
box-shadow: 0 6px 16px var(--shadow);
}
.fab:active {
transform: scale(0.95);
}
.fab svg {
pointer-events: none;
}
/* FAB variants */
.fab-menu {
background: var(--accent);
}
.fab-prev,
.fab-next {
background: var(--bg-secondary);
color: var(--text-primary);
}
.fab-prev:hover,
.fab-next:hover {
background: var(--bg-tertiary);
}
/* Bottom Sheet */
.bottom-sheet {
position: fixed;
inset: 0;
z-index: 2000;
pointer-events: none;
display: none;
}
.bottom-sheet[aria-hidden="false"] {
display: block;
pointer-events: auto;
}
.bottom-sheet-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.3s ease;
}
.bottom-sheet[aria-hidden="false"] .bottom-sheet-backdrop {
opacity: 1;
}
.bottom-sheet-container {
position: absolute;
bottom: 0;
left: 0;
right: 0;
max-height: 85vh;
background: var(--bg-primary);
border-radius: 1rem 1rem 0 0;
box-shadow: 0 -4px 16px var(--shadow);
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
flex-direction: column;
overflow: hidden;
}
.bottom-sheet[aria-hidden="false"] .bottom-sheet-container {
transform: translateY(0);
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
.bottom-sheet-backdrop,
.bottom-sheet-container,
.fab {
transition: none;
}
}
.bottom-sheet-handle {
padding: 0.75rem;
display: flex;
justify-content: center;
cursor: grab;
flex-shrink: 0;
}
.bottom-sheet-handle:active {
cursor: grabbing;
}
.handle-bar {
width: 3rem;
height: 0.25rem;
background: var(--text-muted);
border-radius: 0.125rem;
opacity: 0.5;
}
.bottom-sheet-content {
overflow-y: auto;
overflow-x: hidden;
padding: 0 1rem 1.5rem 1rem;
flex: 1;
-webkit-overflow-scrolling: touch;
}
/* Clone sidebar styles for bottom sheet */
.bottom-sheet-content .toc-section {
margin-top: 1.5rem;
}
.bottom-sheet-content .toc-title {
font-weight: 600;
font-size: 0.875rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0.75rem;
}
.bottom-sheet-content .toc {
list-style: none;
padding: 0;
margin: 0;
}
.bottom-sheet-content .toc a {
display: block;
padding: 0.5rem 0.75rem;
color: var(--text-primary);
text-decoration: none;
border-radius: 0.375rem;
transition: background 0.15s ease;
}
.bottom-sheet-content .toc a:hover {
background: var(--bg-secondary);
}
/* Hide desktop sidebar on mobile when bottom sheet is active */
@media (max-width: 768px) {
.sidebar {
display: none;
}
}
/* Print styles */
@media print {
.reader-header,
.sidebar,
.nav-footer,
.font-controls,
#theme-toggle,
#sidebar-toggle,
.fab-group,
.bottom-sheet {
display: none !important;
}
.main-content {
margin-left: 0;
}
body {
background: white;
color: black;
}
a {
color: inherit;
text-decoration: underline;
}
pre {
border: 1px solid #ddd;
}
}

View File

@@ -0,0 +1,358 @@
/**
* Novel Theme - Sidebar Styles
* Layout, sidebar, plan navigation, TOC
*/
/* Layout */
.layout {
display: flex;
margin-top: var(--header-height);
min-height: calc(100vh - var(--header-height));
}
/* Sidebar */
.sidebar {
width: var(--sidebar-width);
min-width: 200px;
max-width: 480px;
background: var(--bg-secondary);
border-right: 1px solid var(--border);
padding: 1.5rem;
overflow-y: auto;
position: fixed;
top: var(--header-height);
bottom: 0;
left: 0;
transform: translateX(0);
transition: transform 0.3s ease;
}
/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
width: 6px;
}
.sidebar::-webkit-scrollbar-track {
background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
/* Resize handle */
.sidebar-resize-handle {
position: absolute;
top: 0;
right: -3px;
bottom: 0;
width: 6px;
cursor: col-resize;
background: transparent;
z-index: 10;
transition: background 0.2s;
}
.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
background: var(--accent);
}
.sidebar.hidden {
transform: translateX(-100%);
}
/* Plan Navigation */
.plan-nav {
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid var(--border);
}
.plan-title {
font-family: var(--font-heading);
font-size: 0.875rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.plan-icon {
font-size: 1rem;
}
.phase-list {
list-style: none;
}
.phase-item {
margin-bottom: 0.25rem;
}
/* Inline section items (anchors within same doc) - indented with visual distinction */
.phase-item.inline-section {
margin-left: 0.75rem;
position: relative;
}
.phase-item.inline-section::before {
content: '';
position: absolute;
left: -0.5rem;
top: 0;
bottom: 0;
width: 2px;
background: var(--border);
border-radius: 1px;
}
.phase-item a {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.875rem;
border-radius: 6px;
transition: all 0.2s;
}
/* Inline sections have subtler styling */
.phase-item.inline-section a {
font-size: 0.8125rem;
padding: 0.375rem 0.625rem;
background: var(--bg-secondary);
border: 1px solid transparent;
}
.phase-item.inline-section a:hover {
background: var(--bg-tertiary);
border-color: var(--border);
}
.phase-item a:hover {
background: var(--bg-tertiary);
color: var(--text-primary);
}
.phase-item.active a {
background: var(--accent);
color: white;
}
.phase-item.inline-section.active a {
background: var(--accent);
color: white;
border-color: var(--accent);
}
/* Type indicator icon */
.phase-type-icon {
width: 14px;
height: 14px;
flex-shrink: 0;
opacity: 0.6;
}
.phase-item.active .phase-type-icon {
opacity: 1;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.pending { background: #d4a574; }
.status-dot.in-progress { background: #4a90d9; }
.status-dot.completed, .status-dot.done { background: #5cb85c; }
.status-dot.overview { background: #8b4513; }
/* Unavailable/Planned phases */
.phase-item.unavailable {
opacity: 0.6;
}
.phase-item.unavailable .phase-link-disabled {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
color: var(--text-muted);
font-size: 0.875rem;
border-radius: 6px;
cursor: not-allowed;
background: var(--bg-tertiary);
border: 1px dashed var(--border);
}
.phase-item.unavailable .status-dot {
background: var(--text-muted);
opacity: 0.5;
}
.unavailable-badge,
.nav-badge {
font-size: 0.65rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
padding: 0.15rem 0.4rem;
border-radius: 3px;
background: var(--text-muted);
color: var(--bg-primary);
margin-left: auto;
}
/* Nav footer unavailable state */
.nav-unavailable {
opacity: 0.5;
cursor: not-allowed;
border-style: dashed !important;
}
.nav-unavailable .nav-badge {
font-size: 0.6rem;
margin: 0 0.25rem;
}
/* Phase accordion */
.phase-group {
margin-bottom: 0.5rem;
}
.phase-header {
display: flex;
align-items: center;
gap: 0.5rem;
width: 100%;
padding: 0.625rem 0.75rem;
background: transparent;
border: none;
border-radius: 6px;
cursor: pointer;
font-family: inherit;
font-size: 0.875rem;
font-weight: 600;
color: var(--text-primary);
text-align: left;
transition: background 0.2s;
}
.phase-header:hover {
background: var(--bg-tertiary);
}
.phase-chevron {
font-size: 0.625rem;
color: var(--text-muted);
transition: transform 0.2s ease;
flex-shrink: 0;
}
.phase-group.collapsed .phase-chevron {
transform: rotate(-90deg);
}
.phase-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Progress badges */
.phase-badge {
font-size: 0.75rem;
padding: 0.125rem 0.375rem;
border-radius: 4px;
font-weight: 600;
flex-shrink: 0;
}
.badge-done {
background: #d4edda;
color: #155724;
}
[data-theme="dark"] .badge-done {
background: #1e3a2f;
color: #75d49b;
}
.badge-progress {
background: #cce5ff;
color: #004085;
}
[data-theme="dark"] .badge-progress {
background: #1a3a5c;
color: #6db3f2;
}
.badge-pending {
background: var(--bg-tertiary);
color: var(--text-muted);
}
/* Phase items container — visible by default, collapsed state hides */
.phase-items {
list-style: none;
padding-left: 1.25rem;
margin-top: 0.25rem;
transition: max-height 0.3s ease, opacity 0.2s ease;
}
.phase-group.collapsed .phase-items {
max-height: 0;
overflow: hidden;
opacity: 0;
margin-top: 0;
}
/* TOC */
.toc-section {
margin-top: 1rem;
}
.toc-title {
font-family: var(--font-heading);
font-size: 0.75rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0.75rem;
}
.toc-list {
list-style: none;
}
.toc-list li {
margin-bottom: 0.25rem;
}
.toc-list a {
display: block;
padding: 0.25rem 0;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.875rem;
transition: color 0.2s;
}
.toc-list a:hover {
color: var(--accent);
}

View File

@@ -0,0 +1,56 @@
/**
* Novel Theme - CSS Custom Properties
* Light and dark theme variables
*/
:root {
/* Light Theme (Default) */
--bg-primary: #faf8f3;
--bg-secondary: #f5f2eb;
--bg-tertiary: #ebe7de;
--text-heading: #3a3a3a;
--text-primary: #5a5a5a;
--text-secondary: #6a6a6a;
--text-muted: #8c8c8c;
--accent: #8b4513;
--accent-hover: #6d360f;
--border: #e8e4db;
--border-light: #f0ece3;
--shadow: rgba(0, 0, 0, 0.08);
--code-bg: #f8f5ef;
--link: #5c4033;
--link-hover: #8b4513;
/* Fonts */
--font-heading: 'Libre Baskerville', Georgia, serif;
--font-body: 'Inter', system-ui, -apple-system, sans-serif;
--font-mono: 'JetBrains Mono', 'Fira Code', monospace;
/* Spacing */
--content-width: 720px;
--sidebar-width: 280px;
--header-height: 56px;
}
/* Content width responsive to font size */
html[data-font-size="S"] { --content-width: 640px; }
html[data-font-size="M"] { --content-width: 720px; }
html[data-font-size="L"] { --content-width: 800px; }
[data-theme="dark"] {
--bg-primary: #1a1a1a;
--bg-secondary: #252525;
--bg-tertiary: #303030;
--text-heading: #e0dcd3;
--text-primary: #b0aca3;
--text-secondary: #9a9a9a;
--text-muted: #707070;
--accent: #d4a574;
--accent-hover: #e0b98a;
--border: #3a3a3a;
--border-light: #2a2a2a;
--shadow: rgba(0, 0, 0, 0.3);
--code-bg: #2a2a2a;
--link: #d4a574;
--link-hover: #e8c9a0;
}