WIP: Implement frontend

This commit is contained in:
Björn Fromme committed 2023-09-18 13:10:20 +02:00
1 parent bfc5e5e242
commit ce97017ac4
70 files changed
+8751 -337

No files matched your search

@@ -0,0 +1,16 @@
import { Controller } from '@hotwired/stimulus'
export default class extends Controller {
static outlets = [ 'mobilenav' ]
static classes = [ 'closed' ]
trigger({ params: { mode } }) {
this.mobilenavOutlet.toggle(mode)
}
toggle(mode) {
// Add animation classes only now to avoid fouc
this.element.classList.add('transition-transform', 'duration-300')
this.element.classList.toggle(this.closedClass, 'close' === mode)
}
}