salvi/templates/base.jinja2

62 lines
3.1 KiB
Text
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{{ app_name }}{% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2021-08-17 06:30:49 +02:00
{% block meta %}{% endblock %}
<link rel="stylesheet" href="/static/style.css">
<!-- material icons -->
{% if material_icons_url %}
<link rel="stylesheet" href="{{ material_icons_url }}">
{% else %}
2021-08-03 11:41:18 +02:00
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
{% endif %}
2022-11-12 22:33:50 +01:00
{% if math_version and katex_url %}
<link rel="stylesheet" href="{{ katex_url }}" />
<style type="text/css">
.katex img {
object-fit: fill;
padding: unset;
display: block;
position: absolute;
width: 100%;
height: inherit;
}
</style>
{% endif %}
2021-03-14 22:50:49 +01:00
{% block json_info %}{% endblock %}
</head>
2021-02-23 23:54:29 +01:00
<body{% if request.cookies.get('dark') == '1' %} class="dark"{% endif %}>
<div id="__top"></div>
<div class="content">
{% for msg in get_flashed_messages() %}
<div class="flash">{{ msg }}</div>
{% endfor %}
{% block content %}{% endblock %}
</div>
<ul class="top-menu">
2021-02-23 23:54:29 +01:00
<li class="dark-theme-toggle-anchor"><a href="{{ url_for('theme_switch', next=request.path) }}" onclick="toggleDarkTheme(true);return false" class="dark-theme-toggle-on" title="Dark theme"><span class="material-icons">brightness_3</span></a><a href="{{ url_for('theme_switch', next=request.path) }}" onclick="toggleDarkTheme(false);return false" class="dark-theme-toggle-off" title="Light theme"><span class="material-icons">brightness_5</span></a><script>function toggleDarkTheme(a){document.cookie="dark="+(+a)+";max-age=31556952;path=/;SameSite=Strict";document.body.classList.toggle("dark",a)}</script></li>
<li><a href="/" title="{{ T('homepage') }}"><span class="material-icons">home</span></a></li>
2021-08-17 06:30:49 +02:00
<li><a href="/search/" title="{{ T('search') }}" rel="nofollow"><span class="material-icons">search</span></a></li>
<li><a href="/p/random/" title="{{ T('random-page') }}" rel="nofollow"><span class="material-icons">shuffle</span></a></li>
<li><a href="/create/" title="{{ T('new-note') }}" rel="nofollow"><span class="material-icons">create</span></a></li>
2022-11-12 11:15:06 +01:00
<li><a href="/accounts/login/" title="{{ T('login') }}" rel="nofollow"><span class="material-icons">login</span></a></li>
</ul>
<div class="footer">
<div class="footer-copyright">&copy; 20202023 Sakuragasaki46.</div>
<div class="footer-loggedinas">
{% if current_user.is_authenticated %}
{{ T('logged-in-as') }}: <strong>{{ current_user.username }}</strong>
{% else %}
{{ T('not-logged-in') }}. <a href="/accounts/login">{{ T("login") }}</a>
{% endif %}
</div>
<div class="footer-actions" id="page-actions">{% block actions %}{% endblock %}</div>
<div class="footer-versions">{{app_name}} version {{app_version}}</div>
</div>
<div class="backontop"><a href="#__top" title="Back on top"><span class="material-icons">arrow_upward</span></a></div>
{% block scripts %}{% endblock %}
</body>
</html>