2018-07-07 15:11:27 +02:00
|
|
|
<!DOCTYPE html>
|
2023-02-20 10:02:12 +01:00
|
|
|
<html lang="en">
|
2018-07-07 15:11:27 +02:00
|
|
|
<head>
|
2023-02-20 10:02:12 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2018-07-07 15:11:27 +02:00
|
|
|
{% block head %}
|
2018-07-23 00:19:41 +02:00
|
|
|
{# Show the setup name, as set in the config file, as tab title. Don't escape HTML entities. #}
|
|
|
|
<title>{{ setupname|safe }}</title>
|
2019-11-22 03:58:54 +01:00
|
|
|
<link rel="stylesheet" href="/static/css/matemat.css"/>
|
2023-02-20 10:02:12 +01:00
|
|
|
<link rel="stylesheet" href="/static/css/theme.css"/>
|
2018-07-07 15:11:27 +02:00
|
|
|
{% endblock %}
|
|
|
|
</head>
|
2018-07-23 00:19:41 +02:00
|
|
|
|
2018-07-07 15:11:27 +02:00
|
|
|
<body>
|
2018-07-23 00:19:41 +02:00
|
|
|
|
2023-05-15 22:14:38 +02:00
|
|
|
{% block overlay %}
|
2024-04-12 23:43:01 +02:00
|
|
|
{% if lastaction is defined and lastaction is not none %}
|
|
|
|
{% if lastaction == 'buy' %}
|
|
|
|
<aside id="overlay">
|
|
|
|
<h2>{{ lastproduct.name }}</h2>
|
|
|
|
<img src="/static/upload/thumbnails/products/{{ lastproduct.id }}.png?cacheBuster={{ now }}" alt="Picture of {{ lastproduct.name }}" draggable="false"/>
|
|
|
|
{% if lastprice is not none %}
|
|
|
|
<div class="price">{{ lastprice|chf }}</div>
|
|
|
|
{% endif %}
|
|
|
|
</aside>
|
|
|
|
{% elif lastaction == 'deposit' %}
|
|
|
|
<aside id="overlay">
|
|
|
|
<h2>Deposit</h2>
|
|
|
|
{% if lastprice is not none %}
|
|
|
|
<div class="price">{{ lastprice|chf }}</div>
|
|
|
|
{% endif %}
|
|
|
|
</aside>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2023-05-15 22:14:38 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2018-07-07 15:11:27 +02:00
|
|
|
<header>
|
|
|
|
{% block header %}
|
|
|
|
|
2024-11-23 04:35:05 +01:00
|
|
|
<nav class="navbarbutton">
|
2018-07-23 00:19:41 +02:00
|
|
|
{# Show a link to the settings, if a user logged in via password (authlevel 2). #}
|
|
|
|
{% if authlevel|default(0) > 1 %}
|
|
|
|
{% if authuser is defined %}
|
2023-12-22 19:57:51 +01:00
|
|
|
<a href="/">Home</a>
|
2018-07-23 00:19:41 +02:00
|
|
|
{# If a user is an admin, call the link "Administration". Otherwise, call it "Settings". #}
|
|
|
|
{% if authuser.is_admin %}
|
|
|
|
<a href="/admin">Administration</a>
|
2018-10-01 21:08:37 +02:00
|
|
|
<a href="/statistics">Sales Statistics</a>
|
2018-07-23 00:19:41 +02:00
|
|
|
{% else %}
|
|
|
|
<a href="/admin">Settings</a>
|
|
|
|
{% endif %}
|
2018-07-09 22:38:39 +02:00
|
|
|
{% endif %}
|
2018-07-07 15:11:27 +02:00
|
|
|
{% endif %}
|
2023-02-20 10:02:12 +01:00
|
|
|
</nav>
|
2018-07-07 15:11:27 +02:00
|
|
|
{% endblock %}
|
|
|
|
</header>
|
2018-07-23 00:19:41 +02:00
|
|
|
|
2018-07-07 15:11:27 +02:00
|
|
|
<main>
|
2018-07-23 00:19:41 +02:00
|
|
|
{% block main %}
|
|
|
|
{# Here be content. #}
|
|
|
|
{% endblock %}
|
2018-07-07 15:11:27 +02:00
|
|
|
</main>
|
2018-07-23 00:19:41 +02:00
|
|
|
|
2018-07-07 15:11:27 +02:00
|
|
|
<footer>
|
|
|
|
{% block footer %}
|
2018-07-23 00:19:41 +02:00
|
|
|
{# Show some information in the footer, e.g. the instance name, the version, and copyright info. #}
|
|
|
|
<ul>
|
|
|
|
<li> {{ setupname|safe }}
|
|
|
|
<li> Matemat {{ __version__ }}
|
|
|
|
<li> MIT License
|
2023-07-29 23:12:38 +02:00
|
|
|
<li> git.kabelsalat.ch/s3lph/matemat
|
2018-07-23 00:19:41 +02:00
|
|
|
</ul>
|
2018-07-07 15:11:27 +02:00
|
|
|
{% endblock %}
|
|
|
|
</footer>
|
2018-07-23 00:19:41 +02:00
|
|
|
|
2023-05-15 22:14:38 +02:00
|
|
|
<script src="/static/js/overlay.js"></script>
|
2018-07-07 15:11:27 +02:00
|
|
|
</body>
|
|
|
|
</html>
|