mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
985 lines
23 KiB
CSS
985 lines
23 KiB
CSS
/* ========================================
|
||
Docsify-Style Documentation CSS
|
||
Software Manual Skill - Modern Theme
|
||
======================================== */
|
||
|
||
/* ========== CSS Variables ========== */
|
||
:root {
|
||
/* Light Theme - Teal Accent */
|
||
--bg-color: #ffffff;
|
||
--bg-secondary: #f8fafc;
|
||
--bg-tertiary: #f1f5f9;
|
||
--text-color: #1e293b;
|
||
--text-secondary: #64748b;
|
||
--text-muted: #94a3b8;
|
||
--border-color: #e2e8f0;
|
||
--accent-color: #14b8a6;
|
||
--accent-hover: #0d9488;
|
||
--accent-light: rgba(20, 184, 166, 0.1);
|
||
--link-color: #14b8a6;
|
||
--sidebar-bg: #ffffff;
|
||
--sidebar-width: 280px;
|
||
--code-bg: #1e293b;
|
||
--code-color: #e2e8f0;
|
||
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
|
||
--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
|
||
--shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
|
||
|
||
/* Callout Colors */
|
||
--tip-bg: rgba(20, 184, 166, 0.08);
|
||
--tip-border: #14b8a6;
|
||
--warning-bg: rgba(245, 158, 11, 0.08);
|
||
--warning-border: #f59e0b;
|
||
--danger-bg: rgba(239, 68, 68, 0.08);
|
||
--danger-border: #ef4444;
|
||
--info-bg: rgba(59, 130, 246, 0.08);
|
||
--info-border: #3b82f6;
|
||
|
||
/* Typography */
|
||
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
|
||
--font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, Consolas, monospace;
|
||
--font-size-xs: 0.75rem;
|
||
--font-size-sm: 0.875rem;
|
||
--font-size-base: 1rem;
|
||
--font-size-lg: 1.125rem;
|
||
--line-height: 1.75;
|
||
|
||
/* Spacing */
|
||
--space-xs: 0.25rem;
|
||
--space-sm: 0.5rem;
|
||
--space-md: 1rem;
|
||
--space-lg: 1.5rem;
|
||
--space-xl: 2rem;
|
||
--space-2xl: 3rem;
|
||
|
||
/* Border Radius */
|
||
--radius-sm: 4px;
|
||
--radius-md: 8px;
|
||
--radius-lg: 12px;
|
||
|
||
/* Transitions */
|
||
--transition: 0.2s ease;
|
||
--transition-slow: 0.3s ease;
|
||
}
|
||
|
||
/* Dark Theme */
|
||
[data-theme="dark"] {
|
||
--bg-color: #0f172a;
|
||
--bg-secondary: #1e293b;
|
||
--bg-tertiary: #334155;
|
||
--text-color: #f1f5f9;
|
||
--text-secondary: #94a3b8;
|
||
--text-muted: #64748b;
|
||
--border-color: #334155;
|
||
--sidebar-bg: #1e293b;
|
||
--code-bg: #0f172a;
|
||
--code-color: #e2e8f0;
|
||
--tip-bg: rgba(20, 184, 166, 0.15);
|
||
--warning-bg: rgba(245, 158, 11, 0.15);
|
||
--danger-bg: rgba(239, 68, 68, 0.15);
|
||
--info-bg: rgba(59, 130, 246, 0.15);
|
||
}
|
||
|
||
/* ========== Reset ========== */
|
||
*, *::before, *::after {
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
html, body {
|
||
height: 100%;
|
||
}
|
||
|
||
body {
|
||
font-family: var(--font-family);
|
||
font-size: var(--font-size-base);
|
||
line-height: var(--line-height);
|
||
color: var(--text-color);
|
||
background-color: var(--bg-color);
|
||
-webkit-font-smoothing: antialiased;
|
||
}
|
||
|
||
/* ========== Layout ========== */
|
||
.docsify-container {
|
||
display: flex;
|
||
min-height: 100vh;
|
||
}
|
||
|
||
/* ========== Sidebar ========== */
|
||
.sidebar {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: var(--sidebar-width);
|
||
height: 100vh;
|
||
background: var(--sidebar-bg);
|
||
border-right: 1px solid var(--border-color);
|
||
display: flex;
|
||
flex-direction: column;
|
||
z-index: 100;
|
||
transition: transform var(--transition);
|
||
}
|
||
|
||
.sidebar-header {
|
||
padding: var(--space-lg);
|
||
border-bottom: 1px solid var(--border-color);
|
||
}
|
||
|
||
.logo {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--space-sm);
|
||
}
|
||
|
||
.logo-icon {
|
||
width: 36px;
|
||
height: 36px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: linear-gradient(135deg, var(--accent-color), #3eaf7c);
|
||
border-radius: 8px;
|
||
color: #fff;
|
||
font-weight: bold;
|
||
font-size: 1.25rem;
|
||
}
|
||
|
||
.logo-text h1 {
|
||
font-size: var(--font-size-base);
|
||
font-weight: 600;
|
||
color: var(--text-color);
|
||
margin: 0;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.logo-text .version {
|
||
font-size: var(--font-size-sm);
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* ========== Search ========== */
|
||
.sidebar-search {
|
||
padding: var(--space-md);
|
||
position: relative;
|
||
}
|
||
|
||
.search-box {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.search-icon {
|
||
position: absolute;
|
||
left: 10px;
|
||
color: var(--text-muted);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.search-box input {
|
||
width: 100%;
|
||
padding: 10px 60px 10px 36px;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--radius-md);
|
||
font-size: var(--font-size-sm);
|
||
background: var(--bg-secondary);
|
||
color: var(--text-color);
|
||
transition: all var(--transition);
|
||
}
|
||
|
||
.search-box input:focus {
|
||
outline: none;
|
||
border-color: var(--accent-color);
|
||
box-shadow: 0 0 0 3px var(--accent-light);
|
||
background: var(--bg-color);
|
||
}
|
||
|
||
.search-box input::placeholder {
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* Keyboard shortcut hint */
|
||
.search-box::after {
|
||
content: 'Ctrl K';
|
||
position: absolute;
|
||
right: 10px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
font-size: var(--font-size-xs);
|
||
color: var(--text-muted);
|
||
background: var(--bg-color);
|
||
padding: 2px 6px;
|
||
border-radius: var(--radius-sm);
|
||
border: 1px solid var(--border-color);
|
||
font-family: var(--font-mono);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.search-results {
|
||
position: absolute;
|
||
top: 100%;
|
||
left: var(--space-md);
|
||
right: var(--space-md);
|
||
background: var(--bg-color);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: 8px;
|
||
box-shadow: var(--shadow-lg);
|
||
max-height: 400px;
|
||
overflow-y: auto;
|
||
opacity: 0;
|
||
visibility: hidden;
|
||
transform: translateY(-4px);
|
||
transition: all var(--transition);
|
||
z-index: 200;
|
||
}
|
||
|
||
.search-results.visible {
|
||
opacity: 1;
|
||
visibility: visible;
|
||
transform: translateY(0);
|
||
}
|
||
|
||
.search-result-item {
|
||
display: block;
|
||
padding: var(--space-sm) var(--space-md);
|
||
text-decoration: none;
|
||
color: var(--text-color);
|
||
border-bottom: 1px solid var(--border-color);
|
||
transition: background var(--transition);
|
||
}
|
||
|
||
.search-result-item:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.search-result-item:hover {
|
||
background: var(--bg-secondary);
|
||
}
|
||
|
||
.result-title {
|
||
font-weight: 600;
|
||
font-size: var(--font-size-sm);
|
||
margin-bottom: 2px;
|
||
}
|
||
|
||
.result-excerpt {
|
||
font-size: 0.8rem;
|
||
color: var(--text-secondary);
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.result-excerpt mark {
|
||
background: var(--accent-light);
|
||
color: var(--accent-color);
|
||
padding: 1px 4px;
|
||
border-radius: var(--radius-sm);
|
||
font-weight: 500;
|
||
}
|
||
|
||
.no-results {
|
||
padding: var(--space-md);
|
||
text-align: center;
|
||
color: var(--text-muted);
|
||
font-size: var(--font-size-sm);
|
||
}
|
||
|
||
/* ========== Sidebar Navigation ========== */
|
||
.sidebar-nav {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: var(--space-md) 0;
|
||
}
|
||
|
||
.nav-group {
|
||
margin-bottom: var(--space-xs);
|
||
}
|
||
|
||
.nav-group-header {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: var(--space-sm) var(--space-md);
|
||
cursor: pointer;
|
||
user-select: none;
|
||
transition: background var(--transition);
|
||
}
|
||
|
||
.nav-group-header:hover {
|
||
background: var(--bg-secondary);
|
||
}
|
||
|
||
.nav-group-toggle {
|
||
width: 20px;
|
||
height: 20px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-right: var(--space-xs);
|
||
background: none;
|
||
border: none;
|
||
color: var(--text-muted);
|
||
cursor: pointer;
|
||
transition: transform var(--transition);
|
||
}
|
||
|
||
.nav-group-toggle svg {
|
||
width: 12px;
|
||
height: 12px;
|
||
}
|
||
|
||
.nav-group.expanded .nav-group-toggle {
|
||
transform: rotate(90deg);
|
||
}
|
||
|
||
.nav-group-title {
|
||
font-size: var(--font-size-sm);
|
||
font-weight: 600;
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.nav-group-items {
|
||
display: none;
|
||
padding-left: var(--space-lg);
|
||
}
|
||
|
||
.nav-group.expanded .nav-group-items {
|
||
display: block;
|
||
}
|
||
|
||
.nav-item {
|
||
display: block;
|
||
padding: 8px var(--space-md) 8px calc(var(--space-md) + 4px);
|
||
font-size: var(--font-size-sm);
|
||
color: var(--text-secondary);
|
||
text-decoration: none;
|
||
border-left: 2px solid transparent;
|
||
margin: 2px 8px 2px 0;
|
||
border-radius: 0 var(--radius-md) var(--radius-md) 0;
|
||
transition: all var(--transition);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.nav-item:hover {
|
||
color: var(--text-color);
|
||
background: var(--bg-secondary);
|
||
}
|
||
|
||
.nav-item.active {
|
||
color: var(--accent-color);
|
||
border-left-color: var(--accent-color);
|
||
background: var(--accent-light);
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* Top-level nav items (no group) */
|
||
.nav-item.top-level {
|
||
padding-left: var(--space-md);
|
||
border-left: none;
|
||
margin: 2px 8px;
|
||
border-radius: var(--radius-md);
|
||
}
|
||
|
||
.nav-item.top-level.active {
|
||
background: var(--accent-light);
|
||
}
|
||
|
||
/* ========== Main Content ========== */
|
||
.main-content {
|
||
flex: 1;
|
||
margin-left: var(--sidebar-width);
|
||
min-height: 100vh;
|
||
overflow-y: auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.mobile-header {
|
||
display: none;
|
||
position: sticky;
|
||
top: 0;
|
||
padding: var(--space-sm) var(--space-md);
|
||
background: var(--bg-color);
|
||
border-bottom: 1px solid var(--border-color);
|
||
z-index: 50;
|
||
align-items: center;
|
||
gap: var(--space-sm);
|
||
}
|
||
|
||
.sidebar-toggle {
|
||
background: none;
|
||
border: none;
|
||
padding: var(--space-xs);
|
||
color: var(--text-color);
|
||
cursor: pointer;
|
||
border-radius: 4px;
|
||
transition: background var(--transition);
|
||
}
|
||
|
||
.sidebar-toggle:hover {
|
||
background: var(--bg-secondary);
|
||
}
|
||
|
||
.current-section {
|
||
flex: 1;
|
||
font-weight: 600;
|
||
font-size: var(--font-size-sm);
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.theme-toggle-mobile {
|
||
background: none;
|
||
border: none;
|
||
padding: var(--space-xs);
|
||
font-size: 1.25rem;
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* ========== Content Sections ========== */
|
||
.content-wrapper {
|
||
flex: 1;
|
||
max-width: 860px;
|
||
margin: 0 auto;
|
||
padding: var(--space-2xl) var(--space-xl);
|
||
width: 100%;
|
||
}
|
||
|
||
.content-section {
|
||
display: none;
|
||
animation: fadeIn 0.3s ease;
|
||
}
|
||
|
||
.content-section.active {
|
||
display: block;
|
||
}
|
||
|
||
@keyframes fadeIn {
|
||
from { opacity: 0; transform: translateY(8px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
/* ========== Content Typography ========== */
|
||
.content-section h1 {
|
||
font-size: 2rem;
|
||
font-weight: 700;
|
||
margin-bottom: var(--space-lg);
|
||
padding-bottom: var(--space-md);
|
||
border-bottom: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-section h2 {
|
||
font-size: 1.5rem;
|
||
font-weight: 600;
|
||
margin-top: var(--space-2xl);
|
||
margin-bottom: var(--space-md);
|
||
padding-bottom: var(--space-sm);
|
||
border-bottom: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-section h3 {
|
||
font-size: 1.25rem;
|
||
font-weight: 600;
|
||
margin-top: var(--space-xl);
|
||
margin-bottom: var(--space-sm);
|
||
}
|
||
|
||
.content-section h4 {
|
||
font-size: 1.1rem;
|
||
font-weight: 600;
|
||
margin-top: var(--space-lg);
|
||
margin-bottom: var(--space-sm);
|
||
}
|
||
|
||
.content-section p {
|
||
margin-bottom: var(--space-md);
|
||
}
|
||
|
||
.content-section a {
|
||
color: var(--link-color);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.content-section a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* Lists */
|
||
.content-section ul,
|
||
.content-section ol {
|
||
margin: var(--space-md) 0;
|
||
padding-left: var(--space-xl);
|
||
}
|
||
|
||
.content-section li {
|
||
margin-bottom: var(--space-sm);
|
||
}
|
||
|
||
.content-section li::marker {
|
||
color: var(--accent-color);
|
||
}
|
||
|
||
/* Inline Code */
|
||
.content-section code {
|
||
font-family: var(--font-mono);
|
||
font-size: 0.85em;
|
||
padding: 3px 8px;
|
||
background: var(--bg-tertiary);
|
||
color: var(--accent-color);
|
||
border-radius: var(--radius-sm);
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* Code Blocks */
|
||
.code-block-wrapper {
|
||
position: relative;
|
||
margin: var(--space-lg) 0;
|
||
border-radius: var(--radius-lg);
|
||
overflow: hidden;
|
||
box-shadow: var(--shadow-md);
|
||
}
|
||
|
||
.content-section pre {
|
||
margin: 0;
|
||
padding: var(--space-lg);
|
||
padding-top: calc(var(--space-lg) + 40px);
|
||
background: var(--code-bg);
|
||
overflow-x: auto;
|
||
border-radius: var(--radius-lg);
|
||
}
|
||
|
||
.content-section pre code {
|
||
display: block;
|
||
padding: 0;
|
||
background: none;
|
||
color: var(--code-color);
|
||
font-size: var(--font-size-sm);
|
||
line-height: 1.7;
|
||
}
|
||
|
||
/* Code Block Header */
|
||
.code-block-wrapper::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 40px;
|
||
background: rgba(255,255,255,0.03);
|
||
border-bottom: 1px solid rgba(255,255,255,0.05);
|
||
}
|
||
|
||
/* Code Block Actions */
|
||
.code-block-actions {
|
||
position: absolute;
|
||
top: 8px;
|
||
right: 12px;
|
||
display: flex;
|
||
gap: 8px;
|
||
z-index: 10;
|
||
}
|
||
|
||
.copy-code-btn {
|
||
position: absolute;
|
||
top: 8px;
|
||
right: 12px;
|
||
padding: 6px 12px;
|
||
background: rgba(255,255,255,0.08);
|
||
border: 1px solid rgba(255,255,255,0.1);
|
||
border-radius: var(--radius-md);
|
||
color: var(--code-color);
|
||
cursor: pointer;
|
||
opacity: 0;
|
||
transition: all var(--transition);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: var(--font-size-xs);
|
||
font-family: var(--font-family);
|
||
}
|
||
|
||
.code-block-wrapper:hover .copy-code-btn {
|
||
opacity: 1;
|
||
}
|
||
|
||
.copy-code-btn:hover {
|
||
background: rgba(255,255,255,0.15);
|
||
border-color: rgba(255,255,255,0.2);
|
||
}
|
||
|
||
.copy-code-btn.copied {
|
||
background: var(--accent-color);
|
||
border-color: var(--accent-color);
|
||
color: #fff;
|
||
}
|
||
|
||
/* Code syntax colors */
|
||
.content-section pre .keyword { color: #c678dd; }
|
||
.content-section pre .string { color: #98c379; }
|
||
.content-section pre .number { color: #d19a66; }
|
||
.content-section pre .comment { color: #5c6370; font-style: italic; }
|
||
.content-section pre .function { color: #61afef; }
|
||
.content-section pre .operator { color: #56b6c2; }
|
||
|
||
/* Tables */
|
||
.content-section table {
|
||
width: 100%;
|
||
margin: var(--space-lg) 0;
|
||
border-collapse: collapse;
|
||
font-size: var(--font-size-sm);
|
||
border-radius: var(--radius-md);
|
||
overflow: hidden;
|
||
box-shadow: var(--shadow-sm);
|
||
}
|
||
|
||
.content-section th {
|
||
padding: var(--space-md);
|
||
background: var(--accent-color);
|
||
color: #fff;
|
||
font-weight: 600;
|
||
text-align: left;
|
||
font-size: var(--font-size-sm);
|
||
letter-spacing: 0.02em;
|
||
}
|
||
|
||
.content-section th:first-child {
|
||
border-top-left-radius: var(--radius-md);
|
||
}
|
||
|
||
.content-section th:last-child {
|
||
border-top-right-radius: var(--radius-md);
|
||
}
|
||
|
||
.content-section td {
|
||
padding: var(--space-sm) var(--space-md);
|
||
border-bottom: 1px solid var(--border-color);
|
||
vertical-align: top;
|
||
}
|
||
|
||
.content-section tbody tr:nth-child(even) {
|
||
background: var(--bg-secondary);
|
||
}
|
||
|
||
.content-section tbody tr:hover {
|
||
background: var(--accent-light);
|
||
}
|
||
|
||
.content-section tbody tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.content-section tbody tr:last-child td:first-child {
|
||
border-bottom-left-radius: var(--radius-md);
|
||
}
|
||
|
||
.content-section tbody tr:last-child td:last-child {
|
||
border-bottom-right-radius: var(--radius-md);
|
||
}
|
||
|
||
/* Blockquote / Callouts */
|
||
.content-section blockquote {
|
||
position: relative;
|
||
margin: var(--space-lg) 0;
|
||
padding: var(--space-md) var(--space-lg);
|
||
padding-left: calc(var(--space-lg) + 32px);
|
||
background: var(--tip-bg);
|
||
border: 1px solid var(--tip-border);
|
||
border-radius: var(--radius-lg);
|
||
}
|
||
|
||
.content-section blockquote::before {
|
||
content: '💡';
|
||
position: absolute;
|
||
left: var(--space-md);
|
||
top: var(--space-md);
|
||
font-size: 1.25rem;
|
||
line-height: 1;
|
||
}
|
||
|
||
.content-section blockquote p:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.content-section blockquote p:first-child {
|
||
font-weight: 500;
|
||
color: var(--text-color);
|
||
}
|
||
|
||
/* Warning callout */
|
||
.content-section blockquote.warning,
|
||
.content-section blockquote:has(strong:first-child:contains("警告")),
|
||
.content-section blockquote:has(strong:first-child:contains("Warning")) {
|
||
background: var(--warning-bg);
|
||
border-color: var(--warning-border);
|
||
}
|
||
|
||
.content-section blockquote.warning::before {
|
||
content: '⚠️';
|
||
}
|
||
|
||
/* Danger callout */
|
||
.content-section blockquote.danger,
|
||
.content-section blockquote:has(strong:first-child:contains("危险")),
|
||
.content-section blockquote:has(strong:first-child:contains("Danger")) {
|
||
background: var(--danger-bg);
|
||
border-color: var(--danger-border);
|
||
}
|
||
|
||
.content-section blockquote.danger::before {
|
||
content: '🚨';
|
||
}
|
||
|
||
/* Info callout */
|
||
.content-section blockquote.info,
|
||
.content-section blockquote:has(strong:first-child:contains("注意")),
|
||
.content-section blockquote:has(strong:first-child:contains("Note")) {
|
||
background: var(--info-bg);
|
||
border-color: var(--info-border);
|
||
}
|
||
|
||
.content-section blockquote.info::before {
|
||
content: 'ℹ️';
|
||
}
|
||
|
||
/* Images */
|
||
.content-section img {
|
||
max-width: 100%;
|
||
height: auto;
|
||
border-radius: 8px;
|
||
box-shadow: var(--shadow-md);
|
||
margin: var(--space-md) 0;
|
||
}
|
||
|
||
.screenshot-placeholder {
|
||
padding: var(--space-xl);
|
||
background: var(--bg-secondary);
|
||
border: 2px dashed var(--border-color);
|
||
border-radius: 8px;
|
||
text-align: center;
|
||
color: var(--text-muted);
|
||
margin: var(--space-md) 0;
|
||
}
|
||
|
||
/* ========== Footer ========== */
|
||
.main-footer {
|
||
padding: var(--space-lg);
|
||
text-align: center;
|
||
color: var(--text-muted);
|
||
font-size: var(--font-size-sm);
|
||
border-top: 1px solid var(--border-color);
|
||
margin-top: auto;
|
||
}
|
||
|
||
/* ========== Theme Toggle (Desktop) ========== */
|
||
.theme-toggle {
|
||
position: fixed;
|
||
bottom: var(--space-lg);
|
||
right: var(--space-lg);
|
||
width: 44px;
|
||
height: 44px;
|
||
border-radius: 50%;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-color);
|
||
box-shadow: var(--shadow-md);
|
||
cursor: pointer;
|
||
font-size: 1.25rem;
|
||
z-index: 100;
|
||
transition: transform var(--transition);
|
||
}
|
||
|
||
.theme-toggle:hover {
|
||
transform: scale(1.1);
|
||
}
|
||
|
||
[data-theme="light"] .moon-icon { display: inline; }
|
||
[data-theme="light"] .sun-icon { display: none; }
|
||
[data-theme="dark"] .moon-icon { display: none; }
|
||
[data-theme="dark"] .sun-icon { display: inline; }
|
||
|
||
/* ========== Back to Top ========== */
|
||
.back-to-top {
|
||
position: fixed;
|
||
bottom: calc(var(--space-lg) + 56px);
|
||
right: var(--space-lg);
|
||
width: 40px;
|
||
height: 40px;
|
||
border-radius: 50%;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-color);
|
||
box-shadow: var(--shadow-md);
|
||
color: var(--text-secondary);
|
||
cursor: pointer;
|
||
opacity: 0;
|
||
visibility: hidden;
|
||
transition: all var(--transition);
|
||
z-index: 100;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.back-to-top.visible {
|
||
opacity: 1;
|
||
visibility: visible;
|
||
}
|
||
|
||
.back-to-top:hover {
|
||
color: var(--accent-color);
|
||
border-color: var(--accent-color);
|
||
}
|
||
|
||
/* ========== Responsive ========== */
|
||
@media (max-width: 960px) {
|
||
.sidebar {
|
||
transform: translateX(-100%);
|
||
}
|
||
|
||
.sidebar.open {
|
||
transform: translateX(0);
|
||
box-shadow: var(--shadow-lg);
|
||
}
|
||
|
||
.main-content {
|
||
margin-left: 0;
|
||
}
|
||
|
||
.mobile-header {
|
||
display: flex;
|
||
}
|
||
|
||
.content-wrapper {
|
||
padding: var(--space-lg);
|
||
}
|
||
|
||
.theme-toggle {
|
||
display: none;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 640px) {
|
||
.content-section h1 {
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
.content-section h2 {
|
||
font-size: 1.25rem;
|
||
}
|
||
|
||
.content-wrapper {
|
||
padding: var(--space-md);
|
||
}
|
||
}
|
||
|
||
/* ========== Print Styles ========== */
|
||
@media print {
|
||
.sidebar,
|
||
.mobile-header,
|
||
.theme-toggle,
|
||
.back-to-top,
|
||
.copy-code-btn {
|
||
display: none !important;
|
||
}
|
||
|
||
.main-content {
|
||
margin-left: 0;
|
||
}
|
||
|
||
.content-section {
|
||
display: block !important;
|
||
page-break-after: always;
|
||
}
|
||
|
||
.content-section pre {
|
||
background: #f5f5f5 !important;
|
||
color: #333 !important;
|
||
}
|
||
}
|
||
|
||
|
||
/* ========== Pygments Syntax Highlighting (One Dark Theme) ========== */
|
||
/* Generated for CodeHilite extension */
|
||
.highlight { background: #282c34; border-radius: 8px; padding: 1em; overflow-x: auto; margin: var(--spacing-md) 0; }
|
||
.highlight pre { margin: 0; background: transparent; padding: 0; }
|
||
.highlight code { background: transparent; border: none; padding: 0; color: #abb2bf; font-size: var(--font-size-sm); }
|
||
|
||
/* Pygments Token Colors - One Dark Theme */
|
||
.highlight .hll { background-color: #3e4451; }
|
||
.highlight .c { color: #5c6370; font-style: italic; } /* Comment */
|
||
.highlight .err { color: #e06c75; } /* Error */
|
||
.highlight .k { color: #c678dd; } /* Keyword */
|
||
.highlight .l { color: #98c379; } /* Literal */
|
||
.highlight .n { color: #abb2bf; } /* Name */
|
||
.highlight .o { color: #56b6c2; } /* Operator */
|
||
.highlight .p { color: #abb2bf; } /* Punctuation */
|
||
.highlight .ch { color: #5c6370; font-style: italic; } /* Comment.Hashbang */
|
||
.highlight .cm { color: #5c6370; font-style: italic; } /* Comment.Multiline */
|
||
.highlight .cp { color: #5c6370; font-style: italic; } /* Comment.Preproc */
|
||
.highlight .cpf { color: #5c6370; font-style: italic; } /* Comment.PreprocFile */
|
||
.highlight .c1 { color: #5c6370; font-style: italic; } /* Comment.Single */
|
||
.highlight .cs { color: #5c6370; font-style: italic; } /* Comment.Special */
|
||
.highlight .gd { color: #e06c75; } /* Generic.Deleted */
|
||
.highlight .ge { font-style: italic; } /* Generic.Emph */
|
||
.highlight .gh { color: #abb2bf; font-weight: bold; } /* Generic.Heading */
|
||
.highlight .gi { color: #98c379; } /* Generic.Inserted */
|
||
.highlight .go { color: #5c6370; } /* Generic.Output */
|
||
.highlight .gp { color: #5c6370; } /* Generic.Prompt */
|
||
.highlight .gs { font-weight: bold; } /* Generic.Strong */
|
||
.highlight .gu { color: #56b6c2; font-weight: bold; } /* Generic.Subheading */
|
||
.highlight .gt { color: #e06c75; } /* Generic.Traceback */
|
||
.highlight .kc { color: #c678dd; } /* Keyword.Constant */
|
||
.highlight .kd { color: #c678dd; } /* Keyword.Declaration */
|
||
.highlight .kn { color: #c678dd; } /* Keyword.Namespace */
|
||
.highlight .kp { color: #c678dd; } /* Keyword.Pseudo */
|
||
.highlight .kr { color: #c678dd; } /* Keyword.Reserved */
|
||
.highlight .kt { color: #e5c07b; } /* Keyword.Type */
|
||
.highlight .ld { color: #98c379; } /* Literal.Date */
|
||
.highlight .m { color: #d19a66; } /* Literal.Number */
|
||
.highlight .s { color: #98c379; } /* Literal.String */
|
||
.highlight .na { color: #d19a66; } /* Name.Attribute */
|
||
.highlight .nb { color: #e5c07b; } /* Name.Builtin */
|
||
.highlight .nc { color: #e5c07b; } /* Name.Class */
|
||
.highlight .no { color: #d19a66; } /* Name.Constant */
|
||
.highlight .nd { color: #e5c07b; } /* Name.Decorator */
|
||
.highlight .ni { color: #abb2bf; } /* Name.Entity */
|
||
.highlight .ne { color: #e06c75; } /* Name.Exception */
|
||
.highlight .nf { color: #61afef; } /* Name.Function */
|
||
.highlight .nl { color: #abb2bf; } /* Name.Label */
|
||
.highlight .nn { color: #e5c07b; } /* Name.Namespace */
|
||
.highlight .nx { color: #abb2bf; } /* Name.Other */
|
||
.highlight .py { color: #abb2bf; } /* Name.Property */
|
||
.highlight .nt { color: #e06c75; } /* Name.Tag */
|
||
.highlight .nv { color: #e06c75; } /* Name.Variable */
|
||
.highlight .ow { color: #56b6c2; } /* Operator.Word */
|
||
.highlight .w { color: #abb2bf; } /* Text.Whitespace */
|
||
.highlight .mb { color: #d19a66; } /* Literal.Number.Bin */
|
||
.highlight .mf { color: #d19a66; } /* Literal.Number.Float */
|
||
.highlight .mh { color: #d19a66; } /* Literal.Number.Hex */
|
||
.highlight .mi { color: #d19a66; } /* Literal.Number.Integer */
|
||
.highlight .mo { color: #d19a66; } /* Literal.Number.Oct */
|
||
.highlight .sa { color: #98c379; } /* Literal.String.Affix */
|
||
.highlight .sb { color: #98c379; } /* Literal.String.Backtick */
|
||
.highlight .sc { color: #98c379; } /* Literal.String.Char */
|
||
.highlight .dl { color: #98c379; } /* Literal.String.Delimiter */
|
||
.highlight .sd { color: #98c379; } /* Literal.String.Doc */
|
||
.highlight .s2 { color: #98c379; } /* Literal.String.Double */
|
||
.highlight .se { color: #d19a66; } /* Literal.String.Escape */
|
||
.highlight .sh { color: #98c379; } /* Literal.String.Heredoc */
|
||
.highlight .si { color: #98c379; } /* Literal.String.Interpol */
|
||
.highlight .sx { color: #98c379; } /* Literal.String.Other */
|
||
.highlight .sr { color: #56b6c2; } /* Literal.String.Regex */
|
||
.highlight .s1 { color: #98c379; } /* Literal.String.Single */
|
||
.highlight .ss { color: #56b6c2; } /* Literal.String.Symbol */
|
||
.highlight .bp { color: #e5c07b; } /* Name.Builtin.Pseudo */
|
||
.highlight .fm { color: #61afef; } /* Name.Function.Magic */
|
||
.highlight .vc { color: #e06c75; } /* Name.Variable.Class */
|
||
.highlight .vg { color: #e06c75; } /* Name.Variable.Global */
|
||
.highlight .vi { color: #e06c75; } /* Name.Variable.Instance */
|
||
.highlight .vm { color: #e06c75; } /* Name.Variable.Magic */
|
||
.highlight .il { color: #d19a66; } /* Literal.Number.Integer.Long */
|
||
|
||
/* Dark theme override for highlight */
|
||
[data-theme="dark"] .highlight {
|
||
background: #1e2128;
|
||
border: 1px solid #3d4450;
|
||
}
|