website: add diagram Prism language, CodeBlock showLineNumbers prop, brighter dark mode links
- Custom 'diagram' Prism language: box-drawing chars get neutral color, text labels get a saturated blue so they pop against the structure - CodeBlock gains showLineNumbers prop (default true) and skips Prism highlighting when lang is empty - Diagram block in index page uses lang='diagram' with line numbers off - Dark mode --link-accent bumped from #58a6ff to #79bbff for better visibility against dark backgrounds
This commit is contained in:
@@ -130,6 +130,20 @@ pre[class*='language-'] {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
/* Diagram language: neutral box-drawing, colored text labels */
|
||||
.language-diagram .token.box-drawing {
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.language-diagram .token.line-char {
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.language-diagram .token.label {
|
||||
color: #0550ae;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* No text shadow on any token */
|
||||
.token {
|
||||
text-shadow: none;
|
||||
@@ -159,6 +173,8 @@ pre[class*='language-'] {
|
||||
--prism-spread: #ff7b72;
|
||||
--prism-regex: #a5d6ff;
|
||||
--prism-bash-fn: #79c0ff;
|
||||
--prism-diagram-structure: #555;
|
||||
--prism-diagram-label: #79bbff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,3 +300,16 @@ pre[class*='language-'] {
|
||||
color: var(--prism-bash-fn);
|
||||
}
|
||||
}
|
||||
|
||||
.language-diagram .token.box-drawing,
|
||||
.language-diagram .token.line-char {
|
||||
@variant dark {
|
||||
color: var(--prism-diagram-structure);
|
||||
}
|
||||
}
|
||||
|
||||
.language-diagram .token.label {
|
||||
@variant dark {
|
||||
color: var(--prism-diagram-label);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
rgba(255, 255, 255, 0.05) 0px 2px 8px, rgba(255, 255, 255, 0.02) 0px 4px 16px,
|
||||
rgba(255, 255, 255, 0.06) 0px 0px 0px 1px inset;
|
||||
|
||||
--link-accent: #58a6ff;
|
||||
--link-accent: #79bbff;
|
||||
--brand-primary: #60a5fa;
|
||||
--brand-secondary: #f5a623;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user