- Dynamic miller column sizing with flexbox layout - Root column (160px), middle slices (48px), active column (flex) - Auto-scroll browser to rightmost column on navigation - Offline indicator UI and IndexedDB cache integration - /api/documents endpoint for client-side document caching - Breadcrumb navigation in document content area - FTS5 search with SQLite virtual table - Client-side Mermaid and KaTeX rendering via CDN - Deep sample content (advanced-topics/raft-deep-dive) - Border removal (only search button keeps radius) - Full viewport layout with proper borders between sidebar/content
712 lines
13 KiB
CSS
712 lines
13 KiB
CSS
:root {
|
|
color-scheme: light;
|
|
--bg: #fbf7ef;
|
|
--panel: rgba(255, 255, 255, 0.82);
|
|
--panel-strong: #ffffff;
|
|
--text: #18202a;
|
|
--muted: #5b6675;
|
|
--accent: #0f5bd8;
|
|
--accent-soft: rgba(15, 91, 216, 0.1);
|
|
--border: rgba(24, 32, 42, 0.12);
|
|
--shadow: 0 16px 48px rgba(24, 32, 42, 0.08);
|
|
--radius-lg: 24px;
|
|
--radius-md: 16px;
|
|
--radius-sm: 10px;
|
|
font-family: "Charter", "Iowan Old Style", "Palatino Linotype", serif;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
color: var(--text);
|
|
background:
|
|
radial-gradient(circle at top left, rgba(56, 189, 248, 0.28), transparent 34%),
|
|
radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.22), transparent 30%),
|
|
linear-gradient(180deg, #eef6ff 0%, #dbeafe 100%);
|
|
}
|
|
|
|
a {
|
|
color: var(--accent);
|
|
}
|
|
|
|
code {
|
|
font-family: ui-monospace, SFMono-Regular, monospace;
|
|
}
|
|
|
|
.site-header {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.42);
|
|
background: rgba(238, 246, 255, 0.92);
|
|
backdrop-filter: blur(12px);
|
|
}
|
|
|
|
.site-header__inner,
|
|
.site-main {
|
|
width: 100%;
|
|
}
|
|
|
|
.site-header__inner {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
min-height: 64px;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.site-brand {
|
|
color: var(--text);
|
|
font-size: 1.15rem;
|
|
font-weight: 700;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.site-nav {
|
|
display: flex;
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.site-nav a {
|
|
text-decoration: none;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.site-search {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
flex: 1;
|
|
max-width: 320px;
|
|
margin: 0 1rem;
|
|
}
|
|
|
|
.site-search input {
|
|
width: 100%;
|
|
padding: 0.45rem 0.75rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: 0;
|
|
background: var(--panel-strong);
|
|
font: inherit;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.site-search input:focus {
|
|
outline: 2px solid var(--accent-soft);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.site-search button {
|
|
padding: 0.45rem 0.6rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--panel-strong);
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.site-main {
|
|
padding: 0;
|
|
height: calc(100vh - 64px);
|
|
}
|
|
|
|
/* Workspace layout - adaptive grid */
|
|
.workspace-shell {
|
|
display: grid;
|
|
grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
|
|
gap: 0;
|
|
align-items: stretch;
|
|
height: 100%;
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* Document view: sidebar gets reasonable fixed proportion */
|
|
.workspace-shell--document {
|
|
grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
|
|
}
|
|
|
|
/* Empty state: more balanced 50/50 feel */
|
|
.workspace-shell--empty {
|
|
grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
|
|
}
|
|
|
|
/* Miller browser - flex layout so all columns are visible as vertical slices */
|
|
.miller-browser {
|
|
display: flex;
|
|
flex-direction: row;
|
|
overflow-x: auto;
|
|
min-height: 100%;
|
|
max-height: 100%;
|
|
border: 1px solid var(--border);
|
|
border-right: 0;
|
|
border-radius: 0;
|
|
background: var(--panel);
|
|
}
|
|
|
|
.miller-browser + .document-shell {
|
|
border-left: 1px solid var(--border);
|
|
}
|
|
|
|
.miller-column {
|
|
flex: 0 0 auto;
|
|
border-left: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Root column - fixed width for top-level navigation */
|
|
.miller-column:first-child {
|
|
width: 160px;
|
|
border-left: 0;
|
|
}
|
|
|
|
/* Middle columns - narrow slices (48px shows ~32px of content) */
|
|
.miller-column:not(:first-child):not(:last-child) {
|
|
width: 48px;
|
|
}
|
|
|
|
/* Active/last column - grows to fill remaining sidebar space */
|
|
.miller-column:last-child {
|
|
flex: 1 1 auto;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.miller-column h2 {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
margin: 0;
|
|
padding: 0.7rem 0.8rem;
|
|
border-bottom: 1px solid var(--border);
|
|
background: rgba(255, 255, 255, 0.72);
|
|
color: var(--muted);
|
|
font: 700 0.72rem/1.2 ui-monospace, SFMono-Regular, monospace;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* Middle column headers - show just first couple chars */
|
|
.miller-column:not(:first-child):not(:last-child) h2 {
|
|
padding: 0.7rem 0.3rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) h2 .miller-column-title-text {
|
|
display: inline-block;
|
|
max-width: 2rem;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
vertical-align: bottom;
|
|
}
|
|
|
|
.miller-column ul {
|
|
margin: 0;
|
|
padding: 0.3rem;
|
|
list-style: none;
|
|
overflow-y: auto;
|
|
flex: 1;
|
|
}
|
|
|
|
.miller-column a {
|
|
display: flex;
|
|
min-height: 2.1rem;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.5rem;
|
|
padding: 0.4rem 0.5rem;
|
|
border-radius: 0;
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
font-size: 0.94rem;
|
|
}
|
|
|
|
/* Middle column items - icon + truncated text */
|
|
.miller-column:not(:first-child):not(:last-child) a {
|
|
padding: 0.4rem 0.2rem;
|
|
justify-content: center;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) .browser-item-label {
|
|
justify-content: center;
|
|
gap: 0.15rem;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) .browser-item-name {
|
|
display: inline-block;
|
|
max-width: 1.6rem;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
vertical-align: bottom;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) .browser-item-chevron {
|
|
display: none;
|
|
}
|
|
|
|
.browser-item-label {
|
|
display: inline-flex;
|
|
min-width: 0;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.browser-icon {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 1rem;
|
|
height: 0.9rem;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.browser-icon--folder {
|
|
margin-top: 0.1rem;
|
|
border: 1px solid rgba(15, 91, 216, 0.24);
|
|
border-radius: 0;
|
|
background: var(--accent-soft);
|
|
}
|
|
|
|
.browser-icon--folder::before {
|
|
position: absolute;
|
|
top: -0.22rem;
|
|
left: 0.1rem;
|
|
width: 0.45rem;
|
|
height: 0.25rem;
|
|
border: 1px solid rgba(15, 91, 216, 0.24);
|
|
border-bottom: 0;
|
|
border-radius: 0;
|
|
background: var(--accent-soft);
|
|
content: "";
|
|
}
|
|
|
|
.browser-icon--page {
|
|
border: 1px solid var(--border);
|
|
border-radius: 0;
|
|
background: rgba(255, 255, 255, 0.72);
|
|
}
|
|
|
|
.browser-icon--page::before {
|
|
position: absolute;
|
|
right: -1px;
|
|
top: -1px;
|
|
width: 0.3rem;
|
|
height: 0.3rem;
|
|
border-left: 1px solid var(--border);
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--panel);
|
|
content: "";
|
|
}
|
|
|
|
.browser-icon--root {
|
|
width: 0.85rem;
|
|
height: 0.85rem;
|
|
border: 1.5px solid var(--accent);
|
|
border-radius: 0;
|
|
background: var(--accent-soft);
|
|
}
|
|
|
|
.browser-icon--root::before {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 0.3rem;
|
|
height: 0.3rem;
|
|
border-radius: 0;
|
|
background: var(--accent);
|
|
transform: translate(-50%, -50%);
|
|
content: "";
|
|
}
|
|
|
|
.miller-column--root h2 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.35rem;
|
|
}
|
|
|
|
.miller-column a:hover,
|
|
.miller-column a.is-active {
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.browser-item-name {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Document shell */
|
|
.document-shell,
|
|
.error-panel,
|
|
.empty-preview {
|
|
border: 1px solid var(--border);
|
|
border-left: 0;
|
|
border-radius: 0;
|
|
background: var(--panel);
|
|
}
|
|
|
|
.error-panel,
|
|
.empty-preview {
|
|
padding: 2rem;
|
|
}
|
|
|
|
.document-shell {
|
|
padding: 1.5rem 2rem;
|
|
min-height: 100%;
|
|
max-height: 100%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.eyebrow {
|
|
margin: 0 0 0.8rem;
|
|
color: var(--accent);
|
|
font: 700 0.78rem/1.2 ui-monospace, SFMono-Regular, monospace;
|
|
letter-spacing: 0.16em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.lede {
|
|
max-width: 44rem;
|
|
color: var(--muted);
|
|
line-height: 1.7;
|
|
}
|
|
|
|
.tag-list {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.tag-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.tag-list a {
|
|
display: inline-flex;
|
|
padding: 0.15rem 0.4rem;
|
|
border-radius: 0;
|
|
background: var(--accent-soft);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.breadcrumbs {
|
|
margin-bottom: 0.75rem;
|
|
padding-bottom: 0.75rem;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.breadcrumbs ol {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.25rem;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.breadcrumbs li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.breadcrumbs li:not(:last-child)::after {
|
|
content: "/";
|
|
color: var(--muted);
|
|
margin-left: 0.25rem;
|
|
}
|
|
|
|
.breadcrumbs a {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.breadcrumbs a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.breadcrumbs span[aria-current="page"] {
|
|
color: var(--text);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.document-meta {
|
|
margin-bottom: 1.5rem;
|
|
padding-bottom: 1rem;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.document-meta h1 {
|
|
margin: 0 0 0.75rem;
|
|
font-size: 1.85rem;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.meta-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
gap: 0.75rem;
|
|
margin: 0;
|
|
}
|
|
|
|
.meta-grid div {
|
|
min-width: 0;
|
|
}
|
|
|
|
.meta-grid dt {
|
|
margin: 0 0 0.2rem;
|
|
color: var(--muted);
|
|
font: 700 0.68rem/1.2 ui-monospace, SFMono-Regular, monospace;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.meta-grid dd {
|
|
margin: 0;
|
|
color: var(--muted);
|
|
font-size: 0.86rem;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.markdown-body {
|
|
line-height: 1.75;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow-x: auto;
|
|
padding: 1rem;
|
|
border-radius: 0;
|
|
background: #18202a;
|
|
color: #f7f9fc;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin-left: 0;
|
|
padding: 0.9rem 1rem;
|
|
border-left: 4px solid var(--accent);
|
|
border-radius: 0;
|
|
background: rgba(15, 91, 216, 0.05);
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.version-notice {
|
|
position: fixed;
|
|
right: 1rem;
|
|
bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.85rem;
|
|
max-width: min(28rem, calc(100vw - 2rem));
|
|
padding: 0.75rem 0.85rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: 0;
|
|
background: var(--panel-strong);
|
|
}
|
|
|
|
.offline-notice {
|
|
position: fixed;
|
|
left: 1rem;
|
|
bottom: 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.6rem;
|
|
max-width: min(28rem, calc(100vw - 2rem));
|
|
padding: 0.6rem 0.85rem;
|
|
border: 1px solid rgba(234, 179, 8, 0.4);
|
|
border-radius: 0;
|
|
background: rgba(254, 252, 232, 0.95);
|
|
color: #854d0e;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.offline-notice[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.offline-icon {
|
|
display: inline-block;
|
|
width: 0.6rem;
|
|
height: 0.6rem;
|
|
border-radius: 0;
|
|
background: #eab308;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.version-notice[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.version-notice p {
|
|
margin: 0;
|
|
color: var(--text);
|
|
}
|
|
|
|
.version-notice button {
|
|
min-height: 2.2rem;
|
|
padding: 0 0.8rem;
|
|
border: 0;
|
|
border-radius: 0;
|
|
color: white;
|
|
background: var(--accent);
|
|
font: 700 0.9rem/1 ui-monospace, SFMono-Regular, monospace;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Adaptive breakpoints */
|
|
@media (max-width: 1024px) {
|
|
.workspace-shell,
|
|
.workspace-shell--document,
|
|
.workspace-shell--empty {
|
|
grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
|
|
gap: 0;
|
|
}
|
|
|
|
.document-shell {
|
|
padding: 1.25rem 1.5rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.site-header__inner {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
padding: 0.75rem 1rem;
|
|
min-height: auto;
|
|
}
|
|
|
|
.site-main {
|
|
height: auto;
|
|
min-height: calc(100vh - 64px);
|
|
}
|
|
|
|
.workspace-shell,
|
|
.workspace-shell--document,
|
|
.workspace-shell--empty {
|
|
grid-template-columns: 1fr;
|
|
gap: 0;
|
|
}
|
|
|
|
.miller-browser {
|
|
min-height: 16rem;
|
|
max-height: 50vh;
|
|
border-right: 1px solid var(--border);
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.miller-column,
|
|
.miller-column:first-child,
|
|
.miller-column:last-child,
|
|
.miller-column:not(:first-child):not(:last-child) {
|
|
flex: 0 0 auto;
|
|
width: auto;
|
|
min-width: 9rem;
|
|
max-width: none;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) h2 {
|
|
padding: 0.7rem 0.8rem;
|
|
text-align: left;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) h2 .miller-column-title-text {
|
|
max-width: none;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) a {
|
|
padding: 0.4rem 0.5rem;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) .browser-item-label {
|
|
justify-content: flex-start;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) .browser-item-name {
|
|
max-width: none;
|
|
}
|
|
|
|
.miller-column:not(:first-child):not(:last-child) .browser-item-chevron {
|
|
display: inline;
|
|
}
|
|
|
|
.document-shell {
|
|
padding: 1.25rem;
|
|
min-height: auto;
|
|
max-height: none;
|
|
border-left: 1px solid var(--border);
|
|
border-top: 0;
|
|
}
|
|
|
|
.meta-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1600px) {
|
|
.workspace-shell--document {
|
|
grid-template-columns: minmax(300px, 0.32fr) minmax(0, 1fr);
|
|
}
|
|
}
|
|
|
|
/* Search results */
|
|
.search-panel {
|
|
max-width: 800px;
|
|
padding: 2rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: 0;
|
|
background: var(--panel);
|
|
}
|
|
|
|
.search-results {
|
|
margin: 1.5rem 0 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.search-results li {
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.search-results li:last-child {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.search-results a {
|
|
display: block;
|
|
padding: 1rem 0;
|
|
color: var(--text);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.search-results a:hover {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.search-result-title {
|
|
display: block;
|
|
font-weight: 600;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.search-result-path {
|
|
display: block;
|
|
color: var(--muted);
|
|
font-size: 0.85rem;
|
|
font-family: ui-monospace, SFMono-Regular, monospace;
|
|
}
|