refactor(math): use native MathML instead of KaTeX CDN
Remove external KaTeX stylesheet dependency in favor of browser-native MathML rendering. Aligns with suckless philosophy—zero external deps, works offline, smaller page loads. - Remove KaTeX CDN links from base.html - Hide katex-html layer, let browsers render MathML natively - Clean up obsolete CSS (.hide-tail, .katex-display) - Add minimal .math-display for block math layout
This commit is contained in:
13
docs/static/style.css
vendored
13
docs/static/style.css
vendored
@@ -262,22 +262,19 @@ a:hover {
|
|||||||
color: var(--accent-hover);
|
color: var(--accent-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* KaTeX display math - local overrides */
|
/* Math (native MathML rendering) */
|
||||||
.katex-display {
|
.math-display {
|
||||||
|
display: block;
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide katex-html (requires CDN fonts), use native MathML rendering instead */
|
/* Hide KaTeX HTML layer, use browser's native MathML instead */
|
||||||
.katex-html {
|
.katex-html {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fallback: constrain radical SVG when CDN blocked */
|
|
||||||
.hide-tail svg {
|
|
||||||
max-width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code */
|
/* Code */
|
||||||
code {
|
code {
|
||||||
font-family:
|
font-family:
|
||||||
|
|||||||
6
docs/templates/base.html
vendored
6
docs/templates/base.html
vendored
@@ -9,12 +9,6 @@
|
|||||||
<title>{{ title }} | {{ config.title }}</title>
|
<title>{{ title }} | {{ config.title }}</title>
|
||||||
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
|
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
|
||||||
<link rel="stylesheet" href="{{ prefix }}/style.css" />
|
<link rel="stylesheet" href="{{ prefix }}/style.css" />
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css" crossorigin="anonymous"
|
|
||||||
media="print" onload="this.media='all'" />
|
|
||||||
<noscript>
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css"
|
|
||||||
crossorigin="anonymous" />
|
|
||||||
</noscript>
|
|
||||||
<link rel="icon" type="image/png" href="{{ prefix }}/logo.png" />
|
<link rel="icon" type="image/png" href="{{ prefix }}/logo.png" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user