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