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