soapbox/soapbox/templates/admin/base.html
Ole-Morten Duesund 8d40a39187 Favicon: såpestykke på en trekasse (SVG)
Lenkes relativt fra temaet (theme/favicon.svg) og fra admin-basen, så
nettleseren slipper å gjette på /favicon.ico.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcEy43fNYpwg6K6oTKakWR
2026-08-26 13:34:18 +02:00

45 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="nb">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Admin{% endblock %} {{ site.title }}</title>
<link rel="stylesheet" href="{{ url_for('admin.static', filename='admin.css') }}">
<link rel="icon" type="image/svg+xml" href="{{ url_for('admin.static', filename='favicon.svg') }}">
</head>
<body>
<a class="skip" href="#main">Hopp til innhold</a>
<header class="topbar">
<a class="brand" href="{{ url_for('admin.index') }}">{{ site.title }}</a>
{% if user %}
<nav aria-label="Admin-meny">
<a href="{{ url_for('admin.index') }}">Innlegg</a>
{% if user.is_owner %}
<a href="{{ url_for('admin.users') }}">Brukere</a>
<a href="{{ url_for('admin.settings') }}">Innstillinger</a>
{% endif %}
<a href="{{ url_for('admin.password') }}">Passord</a>
<a href="{{ url_for('public') }}">Se bloggen</a>
<form method="post" action="{{ url_for('admin.logout') }}" class="inline">
<input type="hidden" name="csrf" value="{{ csrf }}">
<button type="submit" class="link">Logg ut ({{ user.username }})</button>
</form>
</nav>
{% endif %}
</header>
<main id="main">
{% with messages = get_flashed_messages(with_categories=true) %}
{% for cat, msg in messages %}<p class="flash {{ cat }}" role="status">{{ msg }}</p>{% endfor %}
{% endwith %}
{% block content %}{% endblock %}
</main>
<script>
// Bekreftelsesdialoger via data-attributt i stedet for inline onsubmit, slik at
// tekst fra innhold (titler, brukernavn) aldri havner i en JS-kontekst.
document.addEventListener("submit", function (ev) {
var msg = ev.target.dataset && ev.target.dataset.confirm;
if (msg && !confirm(msg)) ev.preventDefault();
});
</script>
</body>
</html>