feat: click off sidebar on small windows closes it

This commit is contained in:
Robert Perce 2026-04-07 10:49:23 -05:00
parent 62b0efac04
commit 1206e211d5
2 changed files with 13 additions and 1 deletions

View file

@ -112,7 +112,7 @@ impl Layout {
a href="/logout" { "Logout" }
}
section #content {
nav #contacts-sidebar x-bind:class="sidebar ? 'show' : 'hide'" {
nav #contacts-sidebar x-bind:class="sidebar ? 'show' : 'hide'" "x-on:click.self"="sidebar = !sidebar" {
ul {
li { button hx-post="/contact/new" { "+ Add Contact" } }
@for link in &self.contact_links {