Enhance UI and functionality for admin dashboard and user management
- Update `_base_context` to include `active_nav` for dynamic navigation highlighting. - Revamp `base.html` to improve header layout and navigation links for better user experience. - Redesign `dashboard.html` to include statistics for new and edited articles, enhancing visibility of content changes. - Improve `users.html` layout for user management, adding detailed user roles and status indicators. - Update CSS styles for a cohesive design across the application, introducing new color variables and layout adjustments.
This commit is contained in:
@@ -3,22 +3,43 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ title if title else "TK Wiki Newsletter Admin" }}</title>
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<title>{% block title %}{{ title if title else "Wiki Newsletter Admin" }}{% endblock %} · Thomas-Krenn.AG</title>
|
||||
<link rel="stylesheet" href="/static/css/main.css?v=3">
|
||||
</head>
|
||||
<body>
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
<header class="topbar">
|
||||
<h1>TK Wiki Newsletter Admin</h1>
|
||||
<div class="topbar-brand">
|
||||
<div class="topbar-logo" aria-hidden="true">TK</div>
|
||||
<div>
|
||||
<h1>Wiki Newsletter Admin</h1>
|
||||
<p class="topbar-sub">Thomas-Krenn.AG · Intern</p>
|
||||
</div>
|
||||
</div>
|
||||
{% if user %}
|
||||
<form method="post" action="/logout">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit">Logout</button>
|
||||
</form>
|
||||
<div class="topbar-actions">
|
||||
<nav class="topbar-nav" aria-label="Hauptnavigation">
|
||||
<a href="/dashboard" class="{% if active_nav == 'dashboard' %}active{% endif %}">Dashboard</a>
|
||||
{% if user.role == "admin" %}
|
||||
<a href="/admin/users" class="{% if active_nav == 'users' %}active{% endif %}">Benutzer</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<div class="user-chip">
|
||||
<span>{{ user.full_name }}</span>
|
||||
<span class="badge badge-{{ user.role }}">{{ user.role }}</span>
|
||||
</div>
|
||||
<form method="post" action="/logout">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit" class="btn-logout">Abmelden</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</header>
|
||||
<main class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="site-footer">
|
||||
Thomas-Krenn.AG · Interner Wiki-Newsletter · Nur für den internen Gebrauch
|
||||
</footer>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user