Retour
modules/menu/general.php
<nav class="navbar is-TD-smoothwhite" style="z-index: 10;" role="navigation" aria-label="main navigation">
<div class="navbar-brand flex-center-full gap-5" style="width: 100%;">
<a class="navbar-item" href="https://topazdev.fr">
<img src="https://dl.topazdev.fr/stock/images/web/topazdev.png" alt="TopazDev">
</a>
<a class="navbar-item" href="https://spinelle.eu">
<img src="https://dl.topazdev.fr/stock/images/web/spinelle_galaxie.png" alt="Spinelle Galaxie">
</a>
</div>
</nav>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
}
});
</script>```