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="/static/efficient-ui/dialogs.js"></script> 9<script src="/static/efficient-ui/toasts.js"></script> 10<script src="https://cdn.jsdelivr.net/npm/iconify-icon@2.1.0/dist/iconify-icon.min.js"></script> 11</head> 12<body> 13<header> 14<nav class="navbar"> 15<ul> 16<li><a href="/">Home</a></li> 17{% if session.username %} 18<li><a href="/upload">Upload</a></li> 19<li><a href="/profile/{{ session.username }}">Profile: {{ session.username }}</a></li> 20<li><a href="/logout">Log out</a></li> 21{% else %} 22<li><a href="/accounts">Accounts</a></li> 23{% endif %} 24</ul> 25</nav> 26</header> 27<main> 28{% block content %}{% endblock %} 29</main> 30{% with messages = get_flashed_messages(with_categories=true) %} 31<ol class="toast-container"> 32{% for category, message in messages %} 33<li 34style=" 35{% if category %} 36background-color: 37{% if category == 'error' %}var(--color-error) 38{% elif category == 'alert' %}var(--color-alert) 39{% elif category == 'info' %}var(--color-info) 40{% elif category == 'success' %}var(--color-success) 41{% endif %}; 42color: 43{% if category == 'error' %}var(--color-error-text) 44{% elif category == 'alert' %}var(--color-alert-text) 45{% elif category == 'info' %}var(--color-info-text) 46{% elif category == 'success' %}var(--color-success-text) 47{% endif %}; 48{% endif %}" 49> 50{% if category | split | first == "task" %} 51{{ message }} 52{% else %} 53{{ message }} 54{% endif %} 55<x-buttonbox> 56<button class="button-flat" onclick="removeToast()" style="color: inherit !important;">Close</button> 57</x-buttonbox> 58</li> 59{% endfor %} 60</ol> 61{% endwith %} 62</body> 63</html>