Skip to content

Commit

Permalink
Close mobile navigation after click if onepage navigation is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
seibtph committed Sep 24, 2024
1 parent f5cfada commit 897ce28
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Types of changes
Security in case of vulnerabilities.
)

## [2.3.3](https://github.com/contao-themes-net/nature-theme-bundle/tree/2.3.3) – 2024-09-24

- [Fixed] Close mobile navigation after click if onepage navigation is enabled

## [2.3.2](https://github.com/contao-themes-net/nature-theme-bundle/tree/2.3.2) – 2024-04-22

- [Fixed] Fix form captcha (delete custom `form_captcha template`)
Expand Down
12 changes: 12 additions & 0 deletions contao/templates/jquery/j_onepage_navigation_nature.html5
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,17 @@
navigationSection();
});

const navToggler = document.querySelector('.mod_onepage_navigation .navbar-burger');
const navMobile = document.querySelector('.onepage_navigation__list');

navMobile.querySelectorAll('a[data-onepage-link]').forEach ((link) => {
link.addEventListener('click', (event) => {
navToggler.classList.remove('is-active');

setTimeout(function() {
navMobile.classList.remove('is-active');
}, 200);
});
});
});
</script>
2 changes: 1 addition & 1 deletion src/Module/NatureThemeSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class NatureThemeSetup extends BackendModule
{
public const VERSION = '2.3.2';
public const VERSION = '2.3.3';

protected $strTemplate = 'be_naturetheme_setup';

Expand Down

0 comments on commit 897ce28

Please sign in to comment.