diff --git a/assets/css/app.css b/assets/css/app.css index 97961ab..f709b98 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -181,6 +181,25 @@ padding-left: 14px; } +/* ============================================ + Menu Groups - Disable hover and active on expanded-menu-group header + ============================================ */ + +/* Disable all interactive effects on expanded-menu-group header (no href, not clickable) */ +.sidebar .menu > li.menu-group > .expanded-menu-group > div:not(a) { + pointer-events: none; + cursor: default; +} + +.sidebar .menu > li.menu-group > .expanded-menu-group > div:not(a):hover, +.sidebar .menu > li.menu-group > .expanded-menu-group > div:not(a):active, +.sidebar .menu > li.menu-group > .expanded-menu-group > div:not(a):focus { + background-color: transparent !important; + box-shadow: none !important; + cursor: default !important; + color: inherit; +} + /* ============================================ Elements Only Visible in Expanded State ============================================ */ @@ -217,7 +236,8 @@ - Menu has p-2 (8px), so links need 14px additional padding-left */ .sidebar .menu > li > a, -.sidebar .menu > li > button { +.sidebar .menu > li > button, +.sidebar .menu > div.collapsed-menu-group > a { @apply transition-all duration-300; padding-left: 14px; } @@ -226,7 +246,8 @@ - Remove gap so label (which is opacity-0 w-0) doesn't create space - Keep padding-left at 14px so icons stay centered under logo */ [data-sidebar-expanded="false"] .sidebar .menu > li > a, -[data-sidebar-expanded="false"] .sidebar .menu > li > button { +[data-sidebar-expanded="false"] .sidebar .menu > li > button, +[data-sidebar-expanded="false"] .sidebar .menu > div.collapsed-menu-group > a { @apply gap-0; padding-left: 14px; padding-right: 14px; /* Center icon horizontally in 64px sidebar */ diff --git a/lib/mv_web/components/layouts/sidebar.ex b/lib/mv_web/components/layouts/sidebar.ex index 6e50b3c..40c8bb6 100644 --- a/lib/mv_web/components/layouts/sidebar.ex +++ b/lib/mv_web/components/layouts/sidebar.ex @@ -81,7 +81,7 @@ defmodule MvWeb.Layouts.Sidebar do icon="hero-currency-euro" label={gettext("Fee Types")} /> - + <.menu_group icon="hero-cog-6-tooth" label={gettext("Administration")}> <.menu_subitem href={~p"/users"} icon="hero-user-circle" label={gettext("Users")} /> @@ -123,43 +123,38 @@ defmodule MvWeb.Layouts.Sidebar do defp menu_group(assigns) do ~H""" -