diff --git a/app/main.py b/app/main.py
index 89ba274..78fcf07 100644
--- a/app/main.py
+++ b/app/main.py
@@ -1620,11 +1620,21 @@ def admin_patches_page(request: Request):
"icon": icon,
"description": description,
"image_path": assets.get(code),
+ "category": category,
}
- for code, name, icon, _threshold, description, _category in BADGE_DEFINITIONS
+ for code, name, icon, _threshold, description, category in BADGE_DEFINITIONS
+ ]
+ patch_groups = [
+ {
+ "code": category,
+ "label": label,
+ "patches": [patch for patch in patches if patch["category"] == category],
+ }
+ for category, label in BADGE_CATEGORY_LABELS.items()
+ if any(patch["category"] == category for patch in patches)
]
template = templates.get_template("admin_patches.html")
- return template.render(user=user, patches=patches)
+ return template.render(user=user, patch_groups=patch_groups)
@app.get("/admin/statistics", response_class=HTMLResponse)
@@ -2479,15 +2489,6 @@ def render_profile(
for code, name, icon, threshold, description, category in BADGE_DEFINITIONS
]
badges.sort(key=lambda badge: badge["sort_key"])
- badge_groups = [
- {
- "code": category,
- "label": label,
- "badges": [badge for badge in badges if badge["earned"] and badge["category"] == category],
- }
- for category, label in BADGE_CATEGORY_LABELS.items()
- if any(badge["earned"] and badge["category"] == category for badge in badges)
- ]
template = templates.get_template("profile.html")
return HTMLResponse(
@@ -2496,7 +2497,6 @@ def render_profile(
profile=profile,
attended_count=attendance_stats["total"],
badges=badges,
- badge_groups=badge_groups,
is_own_profile=force_own or is_own_profile,
can_view_details=can_view_details,
friendship=friendship,
diff --git a/app/static/css/style.css b/app/static/css/style.css
index 76f0943..6039e8f 100644
--- a/app/static/css/style.css
+++ b/app/static/css/style.css
@@ -37,7 +37,7 @@ a {
text-decoration: none;
}
-header {
+body > header {
background: rgba(8, 8, 8, 0.96);
border-bottom: 1px solid var(--border);
position: sticky;
@@ -413,7 +413,7 @@ body::after {
mix-blend-mode: screen;
}
-header, main, .container { position: relative; z-index: 1; }
+.page-header, main, .container { position: relative; z-index: 1; }
h1, h2, h3, .logo, .page-title h1 {
font-family: "Nimbus Sans Narrow", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
@@ -503,6 +503,7 @@ h1, .page-title h1 {
.advanced-filter-fields label { display:grid; gap:5px; color:var(--muted); font-size:.85rem; }
.advanced-filter-fields select { width:100%; }
.clear-filters { grid-column:1 / -1; display:inline-flex; align-items:center; justify-content:center; padding:8px 12px; color:#fca5a5; border:1px solid var(--border); border-radius:9px; background:#171212; white-space:nowrap; justify-self:start; }
+.advanced-filters .clear-filters { margin:0 12px 12px; }
.clear-filters:hover { border-color:#ef4444; color:#fff; }
.ticket-button-container, .detail-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:22px; }
.calendar-export { display:flex; justify-content:center; margin-top:12px; }
diff --git a/app/templates/admin_patches.html b/app/templates/admin_patches.html
index a10a28a..8dc99b3 100644
--- a/app/templates/admin_patches.html
+++ b/app/templates/admin_patches.html
@@ -8,6 +8,10 @@