Collapsing sidebar only on mobile

This commit is contained in:
Ronan Berder
2025-05-07 19:03:45 +08:00
parent 7dd05d4473
commit 725de3c3a1
+6 -2
View File
@@ -52,7 +52,7 @@
"hx-select": "#content",
"hx-target": "#content",
"hx-swap": "outerHTML",
"@click": "open = false"
"@click": "if (window.innerWidth < 768) { open = false }"
} %}
{% set icon_home %}{% lucide "house" %}{% endset %}
@@ -66,7 +66,11 @@
{ label: "Introduction", url: "/introduction", icon: icon_info, attrs: link_attrs },
{ label: "Installation", url: "/installation", icon: icon_square_terminal, attrs: link_attrs },
{ label: "Kitchen sink", url: "/kitchen-sink", icon: icon_layout_dashboard, attrs: link_attrs },
{ label: "GitHub", url: "https://github.com/hunvreus/basecoat", icon: icon_github, attrs: { "target": "_blank", "@click": "open = false" } }
{ label: "GitHub", url: "https://github.com/hunvreus/basecoat", icon: icon_github, attrs: {
"target": "_blank",
"@click": "if (window.innerWidth < 768) { open = false }"
}
}
]},
{ type: 'group', label: 'Components', items: [
{ label: "Accordion", url: "/components/accordion", attrs: link_attrs },