cs-midi-docs/internal/server/static/style.css

447 lines
16 KiB
CSS

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #fafafa;
--fg: #1a1a1a;
--sidebar-bg: #f0f0f0;
--sidebar-w: 280px;
--accent: #2563eb;
--border: #ddd;
--code-bg: #f6f8fa;
--code-fg: #24292e;
}
[data-theme="dark"] {
--bg: #1a1a2e;
--fg: #e0e0e0;
--sidebar-bg: #16213e;
--accent: #60a5fa;
--border: #333;
--code-bg: #0d1117;
--code-fg: #e0e0e0;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #1a1a2e;
--fg: #e0e0e0;
--sidebar-bg: #16213e;
--accent: #60a5fa;
--border: #333;
--code-bg: #0d1117;
--code-fg: #e0e0e0;
}
}
body {
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg);
color: var(--fg);
line-height: 1.6;
}
.layout {
display: flex;
min-height: 100vh;
}
.sidebar {
width: var(--sidebar-w);
background: var(--sidebar-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
position: fixed;
top: 0;
bottom: 0;
overflow-y: auto;
}
.sidebar-header {
padding: 1.5em 1em 1em;
border-bottom: 1px solid var(--border);
}
.site-title {
display: block;
font-size: 1.2em;
font-weight: 700;
color: var(--fg);
text-decoration: none;
margin-bottom: 0.8em;
}
.search-form input {
width: 100%;
padding: 0.4em 0.6em;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg);
color: var(--fg);
font-size: 0.9em;
}
.sidebar-nav {
flex: 1;
padding: 1em 0;
overflow-y: auto;
}
.nav-section {
margin-bottom: 1em;
}
.nav-heading {
display: block;
padding: 0.3em 1em;
font-size: 0.75em;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--fg);
opacity: 0.6;
}
.sidebar-nav ul {
list-style: none;
}
.sidebar-nav li a {
display: block;
padding: 0.3em 1em 0.3em 1.5em;
color: var(--fg);
text-decoration: none;
font-size: 0.9em;
border-left: 3px solid transparent;
}
.sidebar-nav li a:hover {
background: var(--bg);
}
.sidebar-nav li.active a {
border-left-color: var(--accent);
color: var(--accent);
font-weight: 600;
}
.sidebar-controls {
padding: 0.8em 1em;
border-bottom: 1px solid var(--border);
display: flex;
gap: 0.6em;
}
.sidebar-controls > div {
flex: 1;
}
.sidebar-controls label {
display: block;
font-size: 0.75em;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
opacity: 0.6;
margin-bottom: 0.4em;
}
.sidebar-controls select {
width: 100%;
padding: 0.4em 0.6em;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--bg);
color: var(--fg);
font-size: 0.85em;
}
.platform-notice {
padding: 1em;
border: 1px dashed var(--border);
border-radius: 6px;
opacity: 0.6;
font-style: italic;
margin: 1em 0;
}
.sidebar-footer {
padding: 1em;
border-top: 1px solid var(--border);
display: flex;
gap: 1em;
font-size: 0.85em;
}
.sidebar-footer a {
color: var(--accent);
text-decoration: none;
}
.content {
flex: 1;
margin-left: var(--sidebar-w);
padding: 2em 3em;
max-width: 900px;
}
.content h1 { font-size: 2em; margin: 0.5em 0; border-bottom: 2px solid var(--border); padding-bottom: 0.3em; }
.content h2 { font-size: 1.5em; margin: 1.5em 0 0.5em; border-bottom: 1px solid var(--border); padding-bottom: 0.2em; }
.content h3 { font-size: 1.2em; margin: 1.2em 0 0.4em; }
.content p { margin: 0.8em 0; }
.content ul, .content ol { margin: 0.8em 0; padding-left: 2em; }
.content li { margin: 0.3em 0; }
.content blockquote { border-left: 3px solid var(--border); padding-left: 1em; margin: 0.8em 0; opacity: 0.8; }
.content pre {
background: var(--code-bg);
color: var(--code-fg);
padding: 1em;
border-radius: 6px;
border: 1px solid var(--border);
overflow-x: auto;
margin: 1em 0;
font-size: 0.9em;
}
.content code {
font-family: 'SF Mono', 'Fira Code', monospace;
font-size: 0.9em;
}
.content p code, .content li code, .content td code {
background: var(--code-bg);
padding: 0.15em 0.4em;
border-radius: 3px;
}
.content table {
border-collapse: collapse;
margin: 1em 0;
width: 100%;
}
.content th, .content td {
border: 1px solid var(--border);
padding: 0.5em 0.8em;
text-align: left;
}
.content th {
background: var(--sidebar-bg);
font-weight: 600;
}
.content a { color: var(--accent); }
.page-nav {
display: flex;
justify-content: space-between;
margin-top: 3em;
padding-top: 1.5em;
border-top: 1px solid var(--border);
}
.page-nav a {
color: var(--accent);
text-decoration: none;
font-size: 0.95em;
}
.page-nav .next { margin-left: auto; }
.search-results { list-style: none; padding: 0; }
.search-results li { margin: 1.5em 0; }
.search-results a { font-size: 1.1em; font-weight: 600; }
.search-results .snippet { margin-top: 0.3em; color: var(--fg); opacity: 0.7; font-size: 0.9em; }
@media (max-width: 768px) {
.sidebar { position: static; width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
.content { margin-left: 0; padding: 1.5em; }
.layout { flex-direction: column; }
}
/* ------------------------------------------------------------------ */
/* Syntax highlighting — light theme (github) */
/* ------------------------------------------------------------------ */
.hl-chroma { background-color: transparent; }
.hl-chroma .hl-err { color: #a61717; background-color: #e3d2d2 }
.hl-chroma .hl-k { color: #0550ae; font-weight: bold }
.hl-chroma .hl-kc { color: #0550ae; font-weight: bold }
.hl-chroma .hl-kd { color: #0550ae; font-weight: bold }
.hl-chroma .hl-kn { color: #0550ae; font-weight: bold }
.hl-chroma .hl-kp { color: #0550ae; font-weight: bold }
.hl-chroma .hl-kr { color: #0550ae; font-weight: bold }
.hl-chroma .hl-kt { color: #445588; font-weight: bold }
.hl-chroma .hl-na { color: #008080 }
.hl-chroma .hl-nb { color: #0086b3 }
.hl-chroma .hl-bp { color: #999999 }
.hl-chroma .hl-nc { color: #445588; font-weight: bold }
.hl-chroma .hl-no { color: #008080 }
.hl-chroma .hl-nd { color: #3c5d5d; font-weight: bold }
.hl-chroma .hl-ni { color: #800080 }
.hl-chroma .hl-ne { color: #990000; font-weight: bold }
.hl-chroma .hl-nf { color: #6f42c1 }
.hl-chroma .hl-nl { color: #990000; font-weight: bold }
.hl-chroma .hl-nn { color: #555555 }
.hl-chroma .hl-nt { color: #22863a }
.hl-chroma .hl-nv { color: #008080 }
.hl-chroma .hl-vc { color: #008080 }
.hl-chroma .hl-vg { color: #008080 }
.hl-chroma .hl-vi { color: #008080 }
.hl-chroma .hl-s { color: #032f62 }
.hl-chroma .hl-sa { color: #032f62 }
.hl-chroma .hl-sb { color: #032f62 }
.hl-chroma .hl-sc { color: #032f62 }
.hl-chroma .hl-dl { color: #032f62 }
.hl-chroma .hl-sd { color: #032f62 }
.hl-chroma .hl-s2 { color: #032f62 }
.hl-chroma .hl-se { color: #032f62 }
.hl-chroma .hl-sh { color: #032f62 }
.hl-chroma .hl-si { color: #032f62 }
.hl-chroma .hl-sx { color: #032f62 }
.hl-chroma .hl-sr { color: #009926 }
.hl-chroma .hl-s1 { color: #032f62 }
.hl-chroma .hl-ss { color: #990073 }
.hl-chroma .hl-m { color: #005cc5 }
.hl-chroma .hl-mb { color: #005cc5 }
.hl-chroma .hl-mf { color: #005cc5 }
.hl-chroma .hl-mh { color: #005cc5 }
.hl-chroma .hl-mi { color: #005cc5 }
.hl-chroma .hl-il { color: #005cc5 }
.hl-chroma .hl-mo { color: #005cc5 }
.hl-chroma .hl-o { color: #d73a49 }
.hl-chroma .hl-ow { color: #d73a49 }
.hl-chroma .hl-c { color: #6a737d; font-style: italic }
.hl-chroma .hl-ch { color: #6a737d; font-style: italic }
.hl-chroma .hl-cm { color: #6a737d; font-style: italic }
.hl-chroma .hl-c1 { color: #6a737d; font-style: italic }
.hl-chroma .hl-cs { color: #6a737d; font-weight: bold; font-style: italic }
.hl-chroma .hl-cp { color: #6a737d; font-weight: bold; font-style: italic }
.hl-chroma .hl-cpf { color: #6a737d; font-weight: bold; font-style: italic }
.hl-chroma .hl-gd { color: #b31d28; background-color: #ffeef0 }
.hl-chroma .hl-gi { color: #22863a; background-color: #f0fff4 }
.hl-chroma .hl-ge { font-style: italic }
.hl-chroma .hl-gs { font-weight: bold }
.hl-chroma .hl-gh { color: #999999 }
.hl-chroma .hl-gu { color: #aaaaaa }
/* ------------------------------------------------------------------ */
/* Syntax highlighting — dark theme (monokai) */
/* ------------------------------------------------------------------ */
[data-theme="dark"] .hl-chroma .hl-err { color: #960050; background-color: #1e0010 }
[data-theme="dark"] .hl-chroma .hl-k { color: #66d9ef; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-kc { color: #66d9ef; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-kd { color: #66d9ef; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-kn { color: #f92672; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-kp { color: #66d9ef; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-kr { color: #66d9ef; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-kt { color: #66d9ef; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-na { color: #a6e22e }
[data-theme="dark"] .hl-chroma .hl-nb { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-bp { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-nc { color: #a6e22e; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-no { color: #66d9ef }
[data-theme="dark"] .hl-chroma .hl-nd { color: #a6e22e; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-ni { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-ne { color: #a6e22e; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-nf { color: #a6e22e }
[data-theme="dark"] .hl-chroma .hl-nl { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-nn { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-nt { color: #f92672 }
[data-theme="dark"] .hl-chroma .hl-nv { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-vc { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-vg { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-vi { color: #f8f8f2 }
[data-theme="dark"] .hl-chroma .hl-s { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-sa { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-sb { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-sc { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-dl { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-sd { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-s2 { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-se { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-sh { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-si { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-sx { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-sr { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-s1 { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-ss { color: #e6db74 }
[data-theme="dark"] .hl-chroma .hl-m { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-mb { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-mf { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-mh { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-mi { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-il { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-mo { color: #ae81ff }
[data-theme="dark"] .hl-chroma .hl-o { color: #f92672; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-ow { color: #f92672; font-weight: normal }
[data-theme="dark"] .hl-chroma .hl-c { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-ch { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-cm { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-c1 { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-cs { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-cp { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-cpf { color: #75715e; font-style: italic }
[data-theme="dark"] .hl-chroma .hl-gd { color: #f92672 }
[data-theme="dark"] .hl-chroma .hl-gi { color: #a6e22e }
[data-theme="dark"] .hl-chroma .hl-ge { font-style: italic }
[data-theme="dark"] .hl-chroma .hl-gs { font-weight: bold }
[data-theme="dark"] .hl-chroma .hl-gh { color: #75715e }
[data-theme="dark"] .hl-chroma .hl-gu { color: #75715e }
/* Dark syntax when auto-detected via media query */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .hl-chroma .hl-err { color: #960050; background-color: #1e0010 }
:root:not([data-theme="light"]) .hl-chroma .hl-k { color: #66d9ef; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-kc { color: #66d9ef; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-kd { color: #66d9ef; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-kn { color: #f92672; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-kp { color: #66d9ef; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-kr { color: #66d9ef; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-kt { color: #66d9ef; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-na { color: #a6e22e }
:root:not([data-theme="light"]) .hl-chroma .hl-nb { color: #f8f8f2 }
:root:not([data-theme="light"]) .hl-chroma .hl-bp { color: #f8f8f2 }
:root:not([data-theme="light"]) .hl-chroma .hl-nc { color: #a6e22e; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-no { color: #66d9ef }
:root:not([data-theme="light"]) .hl-chroma .hl-nd { color: #a6e22e; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-ne { color: #a6e22e; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-nf { color: #a6e22e }
:root:not([data-theme="light"]) .hl-chroma .hl-nn { color: #f8f8f2 }
:root:not([data-theme="light"]) .hl-chroma .hl-nt { color: #f92672 }
:root:not([data-theme="light"]) .hl-chroma .hl-nv { color: #f8f8f2 }
:root:not([data-theme="light"]) .hl-chroma .hl-s { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-sa { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-sb { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-sc { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-dl { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-sd { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-s2 { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-se { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-sh { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-si { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-sx { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-sr { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-s1 { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-ss { color: #e6db74 }
:root:not([data-theme="light"]) .hl-chroma .hl-m { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-mb { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-mf { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-mh { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-mi { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-il { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-mo { color: #ae81ff }
:root:not([data-theme="light"]) .hl-chroma .hl-o { color: #f92672; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-ow { color: #f92672; font-weight: normal }
:root:not([data-theme="light"]) .hl-chroma .hl-c { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-ch { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-cm { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-c1 { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-cs { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-cp { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-cpf { color: #75715e; font-style: italic }
:root:not([data-theme="light"]) .hl-chroma .hl-gd { color: #f92672 }
:root:not([data-theme="light"]) .hl-chroma .hl-gi { color: #a6e22e }
}