Files
sukr/docs/templates/base.html
Timothy DeHerrera cfb0881d1f 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
2026-02-01 14:09:27 -07:00

67 lines
2.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% if page.description %}
<meta name="description" content="{{ page.description }}" />{% endif %}
<title>{{ title }} | {{ config.title }}</title>
<link rel="canonical" href="{{ base_url }}{{ page_path }}" />
<link rel="stylesheet" href="{{ prefix }}/style.css" />
<link rel="icon" type="image/png" href="{{ prefix }}/logo.png" />
</head>
<body>
<aside class="sidebar">
<header>
<a href="{{ prefix }}/index.html" class="logo">
<img src="{{ prefix }}/logo.png" alt="" class="logo-img" />
sukr
</a>
<span class="tagline">suckless static sites</span>
<input type="checkbox" id="nav-toggle" class="nav-toggle" />
<label for="nav-toggle" class="hamburger" aria-label="Toggle navigation">
<span></span>
<span></span>
<span></span>
</label>
</header>
<nav>
{% for item in nav %}
{% set section_prefix = item.path | replace(from="index.html", to="") %}
{% set is_current_section = page_path is starting_with(section_prefix) %}
<a href="{{ prefix }}{{ item.path }}" {% if page_path==item.path %}class="active" {% endif %}>{{ item.label }}</a>
{% if page_path == item.path and page.toc and anchors %}
<div class="nav-anchors">
{% for anchor in anchors %}
<a href="#{{ anchor.id }}" class="anchor-link level-{{ anchor.level }}">{{ anchor.label | strip_parens }}</a>
{% endfor %}
</div>
{% endif %}
{% if config.nested_nav and item.children %}
<div class="nav-children{% if is_current_section %} expanded{% endif %}">
{% for child in item.children %}
<a href="{{ prefix }}{{ child.path }}" {% if page_path==child.path %}class="active" {% endif %}>{{ child.label
}}</a>
{% if page_path == child.path and page.toc and anchors %}
<div class="nav-anchors">
{% for anchor in anchors %}
<a href="#{{ anchor.id }}" class="anchor-link level-{{ anchor.level }}">{{ anchor.label | strip_parens }}</a>
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}
</nav>
<footer class="sidebar-footer">
<a href="https://github.com/nrdxp/sukr">GitHub</a>
<span>© 2024 nrdxp — MIT</span>
</footer>
</aside>
<main>{% block content %}{% endblock content %}</main>
</body>
</html>