takahe/templates/base.html

72 lines
3.5 KiB
HTML
Raw Normal View History

2022-11-05 20:17:27 +00:00
<!DOCTYPE html>
<html lang="en">
2023-01-09 16:58:17 +00:00
<head>
<title>{% block title %}{% endblock %} - {{ config.site_name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
{% load static %}
<link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static "fonts/raleway/raleway.css" %}" type="text/css" />
<link rel="stylesheet" href="{% static "fonts/font_awesome/all.min.css" %}" type="text/css" />
<link rel="shortcut icon" href="{{ config.site_icon }}">
<script src="{% static "js/hyperscript.min.js" %}"></script>
<script src="{% static "js/htmx.min.js" %}"></script>
<script src="{% static "js/takahe.min.js" %}"></script>
<style>
body, body.light-theme {
2023-01-09 16:58:17 +00:00
--color-highlight: {{ config.highlight_color }};
--color-text-link: {{ config.highlight_color }};
2023-01-09 16:58:17 +00:00
}
</style>
{% if config_identity.custom_css %}
<style>{{ config_identity.custom_css|safe }}</style>
{% endif %}
2023-01-09 16:58:17 +00:00
{% block opengraph %}
{% include "_opengraph.html" with opengraph_local=opengraph_defaults %}
{% endblock %}
{% block extra_head %}{% endblock %}
{% block custom_head %}{% if config.custom_head %}{{ config.custom_head|safe }}{% endif %}{% endblock %}
</head>
2023-04-29 20:53:53 +00:00
<body class="{% if user.config_user.light_theme %}theme-light {% endif %}{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
2023-01-14 17:32:48 +00:00
<a id="skip-to-main" class="screenreader-text" href="#main-content">Skip to Content</a>
<a id="skip-to-nav" class="screenreader-text" href="#side-navigation">Skip to Navigation</a>
2023-01-09 16:58:17 +00:00
<main>
{% block body_main %}
<header>
<menu>
2023-04-27 06:54:38 +00:00
<a class="logo" href="/">
<img src="{{ config.site_icon }}" width="32">
2023-04-29 20:53:53 +00:00
{{ request.domain.config_domain.site_name|default:config.site_name }}
2023-04-27 06:54:38 +00:00
</a>
2023-01-09 16:58:17 +00:00
{% if user.is_authenticated %}
2023-04-27 06:54:38 +00:00
<a href="/" title="My Account"><i class="fa-solid fa-user"></i></a>
2023-04-29 20:53:53 +00:00
{% if identity %}
<a href="{{ identity.urls.settings }}" title="Settings"><i class="fa-solid fa-gear"></i></a>
{% else %}
<a href="/settings" title="Settings"><i class="fa-solid fa-gear"></i></a>
{% endif %}
{% if user.admin %}
<a href="/admin" title="Administration"><i class="fa-solid fa-screwdriver-wrench"></i></a>
{% endif %}
{% elif not request.domain.config_domain.hide_login %}
2023-04-27 06:54:38 +00:00
<a href="{% url "login" %}" title="Login"><i class="fa-solid fa-right-to-bracket"></i></a>
2022-11-06 02:10:39 +00:00
{% endif %}
2023-01-09 16:58:17 +00:00
</menu>
</header>
2022-11-05 20:17:27 +00:00
2023-04-29 20:53:53 +00:00
{% block announcements %}
{% include "_announcements.html" %}
{% endblock %}
2023-04-27 06:54:38 +00:00
{% block content %}
2023-01-09 16:58:17 +00:00
{% endblock %}
{% endblock %}
</main>
2022-11-05 20:17:27 +00:00
2023-01-09 16:58:17 +00:00
{% block footer %}
2023-04-27 06:54:38 +00:00
{% include "_footer.html" %}
2023-01-09 16:58:17 +00:00
{% endblock %}
2023-01-09 16:58:17 +00:00
</body>
2022-11-05 20:17:27 +00:00
</html>