Files
moon-anemone/templates/base.html
2025-04-10 04:57:17 +01:00

59 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="{% if page %}{{ page.lang }}{% else %}{{ config.default_language }}{% endif %}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index, follow">
{% block rss %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml", trailing_slash=false) }}">
{% endblock %}
<title>{{ config.title }}{% if page.title %} | {{ page.title }}{% endif %}</title>
<link rel="preload" href="{{ get_url(path='css/style.css') }}" as="style">
<link rel="stylesheet" href="https://raw.githack.com/Speyll/suCSS/main/reset-min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://raw.githack.com/Speyll/suCSS/main/suCSS-min.css" crossorigin="anonymous">
<link rel="stylesheet" href="{{ get_url(path='css/style.css') }}">
<link rel="stylesheet" href="{{ get_url(path='css/custom.css') }}">
<!-- Add favicon with appropriate sizes -->
<link rel="icon" href="{{ config.base_url }}/{{ config.extra.favicon | default(value='favicon.ico') }}">
</head>
<body>
{% set current_lang = config.default_language %}
{% if page %}
{% set current_lang = page.lang %}
{% elif section %}
{% set current_lang = section.lang %}
{% endif %}
<nav id="nav-bar">
{% for nav_item in config.extra.header_nav %}
<a href="{{ nav_item.url }}" class="{% if current_url is defined and nav_item.url == current_url %}active{% endif %}">
{% set language_key = 'name_' ~ current_lang %}
{{ nav_item[language_key] }}
</a>
{% endfor %}
<div class="theme-toggle" id="theme-toggle" role="button" tabindex="0" aria-label="Toggle theme"
data-icon-base="{{ get_url(path='icons.svg') }}"
data-icon-dark="#darkMode"
data-icon-light="#lightMode"
data-sound-src="{{ get_url(path='click.ogg') }}">
<svg class="icon">
<use id="theme-icon"></use>
</svg>
</div>
</nav>
<main>
{% block content %}{% endblock %}
</main>
<footer>
{% include "footer.html" %}
</footer>
<!-- Move JS to end of body and add defer -->
<script src="{{ get_url(path='js/script.js') }}" defer></script>
</body>
</html>