File tree Expand file tree Collapse file tree 2 files changed +27
-14
lines changed Expand file tree Collapse file tree 2 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 1515 {% if site.data.navigation %}
1616 {% for item in site.data.navigation %}
1717 {% if item.dropdown %}
18+ <!-- First-level dropdown -->
1819 < div class ="navbar-item has-dropdown {% if site.fixed_navbar == 'bottom' %} has-dropdown-up {% endif %} ">
1920 < a href ="{{ item.link | relative_url }} " class ="navbar-link {% if page.url contains item.link %}is-active{% endif %} "> {{ item.name }}</ a >
2021 < div class ="navbar-dropdown ">
2122 {% for subitem in item.dropdown %}
2223 {% if subitem.dropdown %}
24+ <!-- Second-level dropdown -->
2325 < div class ="navbar-item has-dropdown is-hoverable ">
2426 < a href ="{{ subitem.link | relative_url }} " class ="navbar-link "> {{ subitem.name }}</ a >
2527 < div class ="navbar-dropdown ">
3537 </ div >
3638 </ div >
3739 {% else %}
40+ <!-- Non-dropdown first-level link -->
3841 < a href ="{{ item.link | relative_url }} " class ="navbar-item {% if item.link == page.url %}is-active{% endif %} "> {{ item.name }}</ a >
3942 {% endif %}
4043 {% endfor %}
4144 {% endif %}
4245 </ div >
43-
46+
4447
4548 < div class ="navbar-end ">
4649 < 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;
1818@import " ../node_modules/bulma-block-list/src/block-list.scss" ;
1919
2020
21-
2221.navbar-dropdown {
2322 position : relative ;
2423
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+ }
2737
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+ }
3145
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 ;
3948 }
4049}
4150
4251
52+
You can’t perform that action at this time.
0 commit comments