1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-19 15:43:45 +02:00
RPGnotes/templates/base.jinja
2022-06-19 16:03:59 +02:00

63 lines
2.3 KiB
Django/Jinja

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %} - RPGnotes</title>
<!-- Bootstrap -->
{% if debug %}
<link rel="stylesheet" href="{{ url("css") }}">
{% else %}
<link rel="stylesheet" href="{{ static("css/main.css") }}">
{% endif %}
</head>
<body>
<div class="container">
{% for message in messages %}
{{ bootstrap_alert(message.message|default(""),alert_type=message|bootstrap_message_alert_type,extra_classes=message.extra_tags) }}
{% endfor %}
{% block mainpage %}{% endblock %}
</div>
<footer>
<nav class="navbar navbar-dark bg-dark navbar-expand">
<div class="container-fluid">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="https://github.com/Findus23/RPGnotes/tree/{{ commit_id() }}"
target="_blank" rel="noopener" title="{{ commit_id() }}">
Source
</a>
</li>
<li class="nav-item">
{% if user.is_authenticated %}
<a class="nav-link" href="{{ url("logout") }}">{% trans %}Log out{% endtrans %}</a>
{% else %}
<a class="nav-link" href="{{ url("login") }}">{% trans %}Log in{% endtrans %}</a>
{% endif %}
</ul>
</div>
</nav>
</footer>
<script src="{{ static("libs/bootstrap.bundle.min.js") }}"></script>
<script src="{{ static("libs/luminous.min.js") }}"></script>
<script nonce="{{ request.csp_nonce }}">
document.addEventListener('DOMContentLoaded', function () {
const galleries = document.querySelectorAll("a.image-viewer");
new LuminousGallery(galleries)
});
</script>
{% if sentry_event_id %}
<script src="{{ static("libs/bundle.min.js") }}"></script>
<script nonce="{{ request.csp_nonce }}">
Sentry.init({dsn: "{{ sentry_dsn }}"});
Sentry.showReportDialog({eventId: "{{ sentry_event_id }}", lang: "{{ language_code() }}"});
</script>
{% endif %}
{% block extra_js %}{% endblock %}
</body>
</html>