default.html
HTML document, ASCII text
1<!DOCTYPE html> 2<html lang="en-GB"> 3<head> 4<title>{% block title %}{% endblock %}</title> 5<meta charset="utf-8"> 6<meta name="viewport" content="width=device-width, initial-scale=1"> 7<link rel="stylesheet" href="/static/style.css"> 8<script src="https://cdn.jsdelivr.net/npm/iconify-icon@2.1.0/dist/iconify-icon.min.js"></script> 9</head> 10<body> 11<dialog id="hamburger" class="sheet-left"> 12<nav> 13<ul> 14<li><a href="/">Home</a></li> 15<li><a href="/object/">Object list</a></li> 16<li><a href="/query-pictures">Query</a></li> 17{% if session.username %} 18<li><a href="/upload">Upload</a></li> 19{% endif %} 20</ul> 21<ul> 22{% if session.username %} 23<li><a href="/profile/{{ session.username }}">Profile: {{ session.username }}</a></li> 24<li><a href="/logout">Log out</a></li> 25{% else %} 26<li><a href="/accounts">Accounts</a></li> 27{% endif %} 28</ul> 29</nav> 30</dialog> 31<header> 32<nav class="navbar" id="mobile-navbar"> 33<ul> 34<li id="hamburger-button"> 35<button class="button-flat button-neutral" onclick="document.getElementById('hamburger').showModal()"> 36<iconify-icon icon="ic:baseline-menu">Menu</iconify-icon> 37</button> 38</li> 39</ul> 40</nav> 41<nav class="navbar" id="desktop-navbar"> 42<ul> 43<li><a href="/">Home</a></li> 44<li><a href="/object/">Object list</a></li> 45<li><a href="/query-pictures">Query</a></li> 46{% if session.username %} 47<li><a href="/upload">Upload</a></li> 48{% endif %} 49</ul> 50<ul> 51{% if session.username %} 52<li><a href="/profile/{{ session.username }}">Profile: {{ session.username }}</a></li> 53<li><a href="/logout">Log out</a></li> 54{% else %} 55<li><a href="/accounts">Accounts</a></li> 56{% endif %} 57</ul> 58</nav> 59</header> 60<main> 61{% block content %}{% endblock %} 62</main> 63{% with messages = get_flashed_messages(with_categories=true) %} 64<ol class="toast-container"> 65{% for category, message in messages %} 66<li 67style=" 68{% if category %} 69background-color: 70{% if category == 'error' %}var(--color-error) 71{% elif category == 'alert' %}var(--color-alert) 72{% elif category == 'info' %}var(--color-info) 73{% elif category == 'success' %}var(--color-success) 74{% endif %}; 75color: 76{% if category == 'error' %}var(--color-error-text) 77{% elif category == 'alert' %}var(--color-alert-text) 78{% elif category == 'info' %}var(--color-info-text) 79{% elif category == 'success' %}var(--color-success-text) 80{% endif %}; 81{% endif %}" 82> 83{% if category | split | first == "task" %} 84{{ message }} 85{% else %} 86{{ message }} 87{% endif %} 88<x-buttonbox> 89<button class="button-flat" onclick="removeToast()" style="color: inherit !important;">Close</button> 90</x-buttonbox> 91</li> 92{% endfor %} 93</ol> 94{% endwith %} 95<script src="/static/efficient-ui/dialogs.js"></script> 96<script src="/static/efficient-ui/toasts.js"></script> 97</body> 98</html>