blog/templates/base.html
2026-01-30 17:09:46 +01:00

44 lines
2 KiB
HTML

<!DOCTYPE html>
<html lang="{{ lang | default(value="en") }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
<link rel="stylesheet" href="{{ get_url(path='style.css') }}">
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path='rss.xml') }}">
<!-- KaTeX for math rendering -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js"
onload="renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false}
]
});"></script>
</head>
<body>
<header>
<nav>
<a href="{{ get_url(path='/') }}" class="site-title">{{ config.title }}</a>
{% set root = get_section(path="_index.md") %}
{% for path in root.subsections %}
{% set s = get_section(path=path) %}
<a href="{{ s.permalink }}">{{ s.title }}</a>
{% endfor %}
</nav>
</header>
<main>
{% block content %}{% endblock content %}
</main>
<footer>
<div class="footer-links">
<a href="https://www.yanlincs.com" target="_blank">Homepage</a>
<a href="https://github.com/Logan-Lin" target="_blank">GitHub</a>
<a href="mailto:s@yanlincs.com">Email</a>
</div>
<p>&copy; {{ now() | date(format="%Y") }} {{ config.extra.author }}. Content licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">CC BY-SA 4.0</a>.</p>
</footer>
</body>
</html>