diff --git a/docs/src/_includes/partials/sidebar.njk b/docs/src/_includes/partials/sidebar.njk index eb866e1..9cf763b 100644 --- a/docs/src/_includes/partials/sidebar.njk +++ b/docs/src/_includes/partials/sidebar.njk @@ -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 },