12-05-2026 admin, Panel Displays

This commit is contained in:
Kevin Adametz 2026-05-12 18:28:38 +02:00
parent 0762e3beac
commit 6a65354f4c
43 changed files with 3273 additions and 410 deletions

View file

@ -295,6 +295,8 @@
<nav x-show="!selectedProject" x-cloak x-transition.opacity x-data="{
open: false,
active: '',
navTop: 12,
panelTop: 64,
sections: @js($sidebarSections),
update() {
const offset = window.innerHeight * 0.35
@ -307,6 +309,18 @@
}
this.active = current
},
updatePosition() {
const header = document.getElementById('header')
if (!header) {
this.navTop = 12
this.panelTop = 64
return
}
const rect = header.getBoundingClientRect()
this.navTop = Math.max(12, rect.top + 12)
this.panelTop = Math.max(64, rect.bottom + 8)
},
scrollToSection(id) {
const el = document.getElementById(id)
if (!el) {
@ -319,12 +333,15 @@
return this.sections.find(section => section.id === this.active)?.label || this.sections[0]?.label || ''
},
}" x-init="update();
updatePosition();
window.addEventListener('scroll', () => update(), { passive: true });
window.addEventListener('resize', () => update(), { passive: true });"
window.addEventListener('scroll', () => updatePosition(), { passive: true });
window.addEventListener('resize', () => { update(); updatePosition(); }, { passive: true });"
@keydown.escape.window="open = false" aria-label="{{ data_get($ui, 'sidebar.toggle_open') }}"
class="fixed right-14 top-3 z-[60] lg:hidden">
<div x-show="open" x-transition.origin.top.right
class="fixed inset-x-3 top-16 rounded-2xl border border-border bg-background p-3 shadow-2xl shadow-zinc-950/25">
class="fixed right-[3.25rem] z-[60] md:hidden" :style="`top: ${navTop}px`">
<div x-show="open" x-cloak x-transition.origin.top.right @click.outside="open = false"
class="fixed inset-x-3 rounded-2xl border border-border bg-background p-3 shadow-2xl shadow-zinc-950/25"
:style="`top: ${panelTop}px`">
<div class="mb-3 flex items-center justify-between gap-3 border-b border-border pb-3">
<p class="text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground">
{{ data_get($ui, 'sidebar.mobile_label', 'Abschnitt') }}