KaTeX renders square roots using a 400em-wide SVG that relies on CSS `overflow: hidden` to clip to the correct length. Without the KaTeX stylesheet, this SVG extends across the entire page. Changes: - Add KaTeX CDN stylesheet link to base.html for fonts and layout - Add .katex-display local margin/overflow overrides - Add .hide-tail svg max-width fallback for file:// CORS blocking The CDN provides full KaTeX styling when accessible. The SVG constraint serves as a fallback when CDN is blocked (e.g., local file:// access).
27 lines
890 B
HTML
27 lines
890 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{{ title }} | {{ config.title }}</title>
|
|
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
|
|
<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" />
|
|
</head>
|
|
|
|
<body>
|
|
<aside class="sidebar">
|
|
<header>
|
|
<a href="{{ prefix }}/index.html" class="logo">sukr</a>
|
|
<span class="tagline">suckless static sites</span>
|
|
</header>
|
|
<nav>
|
|
{% for item in nav %}<a href="{{ prefix }}{{ item.path }}" {% if page_path==item.path %} class="active" {% endif
|
|
%}>{{ item.label }}</a>{% endfor %}
|
|
</nav>
|
|
</aside>
|
|
<main>{% block content %}{% endblock content %}</main>
|
|
</body>
|
|
|
|
</html> |