diora-web/templates/base.html

60 lines
2.1 KiB
HTML
Raw Normal View History

2026-03-16 19:19:22 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#000000">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="diora">
<meta name="description" content="Internet radio player">
<link rel="manifest" href="/static/manifest.json">
<link rel="apple-touch-icon" href="/static/icon-192.png">
<link rel="stylesheet" href="/static/css/app.css">
<title>{% block title %}diora{% endblock %}</title>
{% if user.is_authenticated and user.profile.background_image %}
<style>
body {
background-image: url('{{ user.profile.background_image.url }}');
background-size: cover;
background-position: center;
background-attachment: fixed;
}
</style>
{% endif %}
</head>
<body{% if user.is_authenticated and user.profile.background_image %} data-bg="{{ user.profile.background_image.url }}"{% endif %}>
<nav class="navbar">
<a href="/" class="navbar-brand">diora</a>
<div class="navbar-links">
<button class="btn-icon contrast-toggle" id="contrast-toggle" onclick="toggleContrast()" title="Toggle contrast mode"></button>
{% if user.is_authenticated %}
<span class="navbar-user">{{ user.username }}</span>
<a href="{% url 'settings' %}">Settings</a>
<form method="post" action="{% url 'logout' %}" class="inline-form">
{% csrf_token %}
<button type="submit" class="btn-link">Logout</button>
</form>
{% else %}
<a href="{% url 'login' %}">Login</a>
<a href="{% url 'register' %}">Register</a>
{% endif %}
</div>
</nav>
<main class="main-content">
{% if messages %}
<div class="messages">
{% for message in messages %}
<div class="message message-{{ message.tags }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% block content %}{% endblock %}
</main>
{% block extra_js %}{% endblock %}
</body>
</html>