feat: add the admin layout shell

This commit is contained in:
fromme committed 2026-09-13 14:31:40 +02:00
1 parent da8af9ff08
commit ad5c93049c
21 files changed
+441 -15

No files matched your search

@@ -0,0 +1,22 @@
import { Controller } from '@hotwired/stimulus';
/*
* Off-canvas mobile navigation drawer. Ported from myep.
*
* Two instances cooperate through a Stimulus outlet: the opener button in the header and the
* drawer itself. Purely client-side -- htmx is not involved.
*/
export default class extends Controller {
static outlets = ['mobilenav'];
static classes = ['closed'];
trigger({ params: { mode } }) {
this.mobilenavOutlet.toggle(mode);
}
toggle(mode) {
// Added only now, so the drawer does not animate into place on first paint.
this.element.classList.add('transition-transform', 'duration-300');
this.element.classList.toggle(this.closedClass, 'close' === mode);
}
}