File tree 2 files changed +27
-14
lines changed
2 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 15
15
{% if site.data.navigation %}
16
16
{% for item in site.data.navigation %}
17
17
{% if item.dropdown %}
18
+ <!-- First-level dropdown -->
18
19
< div class ="navbar-item has-dropdown {% if site.fixed_navbar == 'bottom' %} has-dropdown-up {% endif %} ">
19
20
< a href ="{{ item.link | relative_url }} " class ="navbar-link {% if page.url contains item.link %}is-active{% endif %} "> {{ item.name }}</ a >
20
21
< div class ="navbar-dropdown ">
21
22
{% for subitem in item.dropdown %}
22
23
{% if subitem.dropdown %}
24
+ <!-- Second-level dropdown -->
23
25
< div class ="navbar-item has-dropdown is-hoverable ">
24
26
< a href ="{{ subitem.link | relative_url }} " class ="navbar-link "> {{ subitem.name }}</ a >
25
27
< div class ="navbar-dropdown ">
35
37
</ div >
36
38
</ div >
37
39
{% else %}
40
+ <!-- Non-dropdown first-level link -->
38
41
< a href ="{{ item.link | relative_url }} " class ="navbar-item {% if item.link == page.url %}is-active{% endif %} "> {{ item.name }}</ a >
39
42
{% endif %}
40
43
{% endfor %}
41
44
{% endif %}
42
45
</ div >
43
-
46
+
44
47
45
48
< div class ="navbar-end ">
46
49
< a href =""> < img src ="../../../../flag.png " /> </ a >
Original file line number Diff line number Diff line change @@ -18,25 +18,35 @@ $hero-darken: $dark !default;
18
18
@import " ../node_modules/bulma-block-list/src/block-list.scss" ;
19
19
20
20
21
-
22
21
.navbar-dropdown {
23
22
position : relative ;
24
23
25
- .has-dropdown {
26
- position : relative ;
24
+ /* First-Level Dropdowns */
25
+ .has-dropdown > .navbar-dropdown {
26
+ display : none ;
27
+ position : absolute ;
28
+ left : 0 ;
29
+ top : 100% ;
30
+ z-index : 10 ;
31
+ }
32
+
33
+ .has-dropdown :hover > .navbar-dropdown ,
34
+ .has-dropdown :focus-within > .navbar-dropdown {
35
+ display : block ;
36
+ }
27
37
28
- & :hover .navbar-dropdown {
29
- display : block ;
30
- }
38
+ /* Second-Level Dropdowns */
39
+ .has-dropdown.is-hoverable > .navbar-dropdown {
40
+ display : none ;
41
+ position : absolute ;
42
+ left : 100% ; /* Aligns to the right of the parent dropdown */
43
+ top : 0 ;
44
+ }
31
45
32
- .navbar-dropdown {
33
- display : none ;
34
- position : absolute ;
35
- left : 100% ; /* Aligns to the right of the parent dropdown */
36
- top : 0 ;
37
- z-index : 10 ; /* Ensures the submenu appears above other content */
38
- }
46
+ .has-dropdown.is-hoverable :hover > .navbar-dropdown {
47
+ display : block ;
39
48
}
40
49
}
41
50
42
51
52
+
You can’t perform that action at this time.
0 commit comments