Files
lapp/templates/base.html
T

96 lines
2.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title or "L@pp" }}</title>
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
<meta name="description" content="A list for groceries">
<meta name="author" content="Ignace">
<meta name="theme-color" content="transparent">
<link rel="manifest" href="{{ url_for('static', filename='manifest.json') }}">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="transparent">
<link rel="apple-touch-icon" href="{{ url_for('static', filename='lapp192.png') }}">
<link href="/static/bootstrap.min.css" rel="stylesheet">
<script src="/static/jquery.min.js"></script>
<script src="/static/bootstrap.min.js"></script>
<style>
body {
padding-top: 64px;
}
.topbar {
height: 56px;
}
</style>
<script>
function toggleButtons() {
if ($('#toprightbuttons').hasClass("d-none")){
$('#toprightbuttons').removeClass("d-none")
} else {
$('#toprightbuttons').addClass("d-none")
}
}
</script>
</head>
<body class="bg-light">
<!-- Top Bar -->
<nav class="navbar fixed-top navbar-light bg-white border-bottom topbar">
<div class="container-fluid">
<span class="navbar-brand fw-semibold">
<a class="btn btn-light" href="{{ logo_url or '/' }}" role="button">L@PP</a>
{% if button_top_url1 and button_top_txt1 %}
<a href="{{ button_top_url1 }}"><img style="width: 2em; height: 2em" src="/static/{{ button_top_txt1 }}.svg"></a>
{% endif %}
{% if button_top_url2 and button_top_txt2 %}
<a href="{{ button_top_url2 }}"><img style="width: 2em; height: 2em" src="/static/{{ button_top_txt2 }}.svg"></a>
{% endif %}
</span>
<div class="d-flex align-items-center gap-2">
{% if current_user.is_authenticated %}
<div class="text-muted small d-none d-sm-inline">
<a class="btn" onclick="toggleButtons()">{{current_user.name }}</a>
</div>
<div id="toprightbuttons" class="d-none">
<a href="{{ url_for('auth.logout') }}">
<img style="width: 2em; height: 2em" src="/static/logout.svg">
</a>
<a href="{{ url_for('auth.change_pwd') }}">
<img style="width: 2em; height: 2em" src="/static/password.svg">
</a>
</div>
{% else %}
<a href="{{ url_for('auth.login') }}"
>
<img style="width: 2em; height: 2em" src="/static/login.svg"></a>
</a>
<a href="{{ url_for('auth.register') }}"
>
<img style="width: 2em; height: 2em" src="/static/register.svg"></a>
</a>
{% endif %}
</div>
</div>
</nav>
<!-- Main Content -->
<div class="container py-4">
<div class="mx-auto" style="max-width: 420px;">
{% block content %}{% endblock %}
</div>
</div>
</body>
</html>