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

67 lines
2.6 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>
{% if debug %}
<link rel="stylesheet" href="{{ url("css") }}">
{% else %}
{% for dep in get_dependencies("main.ts") %}
<link rel="modulepreload" href="{{ dep }}"></link>
{% endfor %}
<link rel="stylesheet" href="{{ static("css/main.css") }}">
{% endif %}
<script src="{{ static("colortheme/colortheme.js") }}"></script>
<link rel="icon" href="data:,">
</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>
{% if debug %}
<script type="module" src="http://localhost:5173/@vite/client"></script>
<script type="module" src="http://localhost:5173/static/main.ts"></script>
{% else %}
<script type="module" async src="{{ js_asset_url("main.ts") }}"></script>
{% endif %}
{% if sentry_event_id %}
<div id="sentry" data-dsn="{{ sentry_dsn }}" data-event-id="{{ sentry_event_id }}"
data-lang="{{ language_code() }}"></div>
{# <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>