takahe/templates/base.html

88 lines
4.5 KiB
HTML
Raw Permalink 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 identity and public_styling %}
{% if identity.domain.config_domain.custom_css %}
<style>{{ identity.domain.config_domain.custom_css|safe }}</style>
{% endif %}
{% else %}
{% if request.domain.config_domain.custom_css %}
<style>{{ request.domain.config_domain.custom_css|safe }}</style>
{% endif %}
{% 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>
<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>
<a class="logo" href="/">
{% if identity and public_styling %}
<img src="{{ identity.domain.config_domain.site_icon|default:config.site_icon }}" width="32">
{{ identity.domain.config_domain.site_name|default:config.site_name }}
{% else %}
<img src="{{ request.domain.config_domain.site_icon|default:config.site_icon }}" width="32">
{{ request.domain.config_domain.site_name|default:config.site_name }}
{% endif %}
</a>
2023-01-09 16:58:17 +00:00
{% if user.is_authenticated %}
<a href="/" title="My Account"><i class="fa-solid fa-user"></i></a>
{% 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>
2023-01-09 16:58:17 +00:00
{% 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 %}
<a href="{% url "login" %}" title="Login"><i class="fa-solid fa-right-to-bracket"></i></a>
{% if config.signup_allowed %}
<a href="{% url "signup" %}" title="Create Account"><i class="fa-solid fa-user-plus"></i></a>
{% endif %}
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
{% block announcements %}
{% include "_announcements.html" %}
{% endblock %}
{% include "activities/_image_viewer.html" %}
{% 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 %}
{% 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>