}
.navbar-burger span {
- background-color: currentColor;
+ background-color: var(--color-navbar-text);
display: block;
height: 1px;
left: 50%;
margin-top: 4px;
}
-.navbar-burger:hover {
- background-color: var(--color-navbar-bg-focus);
-}
-
.navbar-burger.is-active span:nth-child(1) {
margin-left: -5px;
transform: rotate(45deg);
--- /dev/null
+document.addEventListener('DOMContentLoaded', function () {
+ var navbarToggles = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0)
+ if (navbarToggles.length === 0) return
+ navbarToggles.forEach(function (el) {
+ el.addEventListener('click', function (e) {
+ e.stopPropagation()
+ el.classList.toggle('is-active')
+ document.getElementById(el.dataset.target).classList.toggle('is-active')
+ document.documentElement.classList.toggle('is-clipped--navbar')
+ })
+ })
+})