File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,15 @@ export function initNav() {
47
47
if ( ! pagesNav ) {
48
48
return
49
49
}
50
+
51
+ const pagesDropdown = $ ( '#pages-dropdown' )
52
+ if ( pagesDropdown ) {
53
+ const activeAnchor = $ ( 'a.pages-dropdown_active' , pagesDropdown )
54
+ activeAnchor ?. addEventListener ( 'mousedown' , ( e ) => {
55
+ e . preventDefault ( )
56
+ } )
57
+ }
58
+
50
59
const allNavItems = $$ ( 'a' , pagesNav )
51
60
allNavItems . forEach ( ( link ) => {
52
61
link . addEventListener ( 'click' , ( ) => {
Original file line number Diff line number Diff line change 7
7
@if (Model .IsPrimaryNavEnabled && current is { Group .Index : not null })
8
8
{
9
9
<div class =" sticky top-0 py-6 bg-white z-10 border-b-1 border-grey-20 pr-4" >
10
- <div class =" block group border-1 border-grey-20 rounded-sm font-sans relative" >
10
+ <div id = " pages-dropdown " class =" block group border-1 border-grey-20 rounded-sm font-sans relative" >
11
11
<button class =" w-full text-left grid grid-cols-[1fr_auto] cursor-pointer font-semibold gap-1 hover:text-black pl-4 pr-2 py-2 group-open:border-b-1 border-grey-20" >
12
- <span >
12
+ <div >
13
13
<a
14
- class =" hover:underline text-blue-elastic hover:text-blue-elastic-100"
14
+ class =" pages-dropdown_active hover:underline text-blue-elastic hover:text-blue-elastic-100"
15
15
href =" @current.Group.Index?.Url"
16
16
@Htmx.GetNavHxAttributes(true) >
17
17
@current.Group.Index ? .NavigationTitle
18
18
</a >
19
- </span >
19
+ </div >
20
20
<div class =" flex items-center justify-center size-6 hover:bg-grey-20 rounded-sm" >
21
21
<svg
22
22
xmlns =" http://www.w3.org/2000/svg"
You can’t perform that action at this time.
0 commit comments