Skip to content

Commit

Permalink
Merge pull request #1377 from CuBoulder/issue/1336
Browse files Browse the repository at this point in the history
Only footer menu in the mobile menu fix.
  • Loading branch information
jcsparks authored and web-flow committed Oct 8, 2024
2 parents 007b004 + 5ce76e0 commit 31a0f95
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- ### Only footer menu in the mobile menu fix.
Resolves #1336.
Adds the ability to use footer menus while using no other menus and have them show up in the mobile menu.
---

- ### Related Articles: Fix base path
Resolves #1375
---
Expand Down
5 changes: 5 additions & 0 deletions css/ucb-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
.ucb-mobile-footer-menu,
.ucb-mobile-social-media-menu {
display: none;
width: 100%;
}

@media only screen and (max-width: 575px) {
Expand Down Expand Up @@ -135,6 +136,8 @@
.ucb-main-nav-container .ucb-primary-menu-region li.menu-item.active a.nav-link.is-active,
.ucb-main-nav-container.ucb-secondary-menu-position-above .ucb-secondary-menu-region li.menu-item a.nav-link,
.ucb-main-nav-container.ucb-secondary-menu-position-inline .ucb-secondary-menu-region li.menu-item a.nav-link,
.ucb-main-nav-container .ucb-mobile-footer-menu li.menu-item a.nav-link,
.ucb-main-nav-container .ucb-mobile-social-media-menu li.menu-item a.nav-link,
.ucb-main-menu li.menu-item a.nav-link:hover,
.ucb-main-menu li.menu-item a.nav-link.is-active,
.ucb-main-menu li.menu-item.active a.nav-link:first-of-type {
Expand All @@ -151,6 +154,8 @@
background-color: var(--ucb-gold);
}

.ucb-main-nav-container .ucb-mobile-footer-menu li.menu-item a.nav-link:hover,
.ucb-main-nav-container .ucb-mobile-social-media-menu li.menu-item a.nav-link:hover,
.ucb-main-nav-container.ucb-secondary-menu-position-above .ucb-secondary-menu-region li.menu-item:not(.active) a.nav-link,
.ucb-main-nav-container.ucb-secondary-menu-position-inline .ucb-secondary-menu-region li.menu-item:not(.active) a.nav-link {
background-color: transparent;
Expand Down
6 changes: 6 additions & 0 deletions templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@
<div class="ucb-main-nav-container ucb-secondary-menu-position-{{ ucb_secondary_menu_position == 'above' ? 'above' : 'inline container' }} ucb-button-{{ menu_button_color }}">
{{ page.primary_menu }}
{{ page.secondary_menu }}
<div class="ucb-mobile-footer-menu">
{{ drupal_menu('footer') }}
</div>
<div class="ucb-mobile-social-media-menu">
{{ drupal_menu('social-media-menu') }}
</div>
</div>
</section>
</div>
Expand Down
6 changes: 0 additions & 6 deletions templates/regions/region--secondary-menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,4 @@
{% if ucb_secondary_menu_default_links %}{% include "@boulder_base/includes/ucb-header-secondary-menu.html.twig" %}{% endif %}
{{ content }}
</div>
<div class="ucb-mobile-footer-menu">
{{ drupal_menu('footer') }}
</div>
<div class="ucb-mobile-social-media-menu">
{{ drupal_menu('social-media-menu') }}
</div>
</div>

0 comments on commit 31a0f95

Please sign in to comment.