remove sage 10
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
<footer class="content-info">
|
||||
@php(dynamic_sidebar('sidebar-footer'))
|
||||
</footer>
|
||||
@@ -1,21 +0,0 @@
|
||||
export default function Footer() {
|
||||
const body = document.querySelector("body");
|
||||
const footer = document.querySelector(".js-footer");
|
||||
|
||||
if(!footer) return;
|
||||
|
||||
const links = footer.querySelectorAll("a");
|
||||
const currentURL = location.protocol + '//' + location.host + location.pathname;
|
||||
|
||||
|
||||
links.forEach(link => {
|
||||
const hash = link.hash;
|
||||
const href = link.href;
|
||||
|
||||
link.addEventListener("click", () => {
|
||||
if(href.includes(currentURL)) {
|
||||
body.classList.remove("menu-open");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<header class="banner">
|
||||
<a class="brand" href="{{ home_url('/') }}">
|
||||
{!! $siteName !!}
|
||||
</a>
|
||||
|
||||
@if (has_nav_menu('primary_navigation'))
|
||||
<nav class="nav-primary" aria-label="{{ wp_get_nav_menu_name('primary_navigation') }}">
|
||||
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav', 'echo' => false]) !!}
|
||||
</nav>
|
||||
@endif
|
||||
</header>
|
||||
@@ -1,57 +0,0 @@
|
||||
export default function Header() {
|
||||
const body = document.querySelector("body");
|
||||
const wrapper = document.querySelector(".wrapper");
|
||||
const menuToggle = document.querySelector(".js-menu-toggle");
|
||||
const menuClose = document.querySelector(".js-menu-close");
|
||||
|
||||
if(!menuToggle) return;
|
||||
|
||||
menuToggle.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
body.classList.toggle("menu-open");
|
||||
|
||||
if(menuToggle.ariaExpanded == 'true') {
|
||||
menuToggle.ariaExpanded = 'false';
|
||||
} else {
|
||||
menuToggle.ariaExpanded = 'true';
|
||||
}
|
||||
|
||||
console.log(menuToggle.ariaExpanded);
|
||||
|
||||
});
|
||||
|
||||
menuClose.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
body.classList.remove("menu-open");
|
||||
menuToggle.ariaExpanded = 'false';
|
||||
|
||||
console.log(menuToggle.ariaExpanded);
|
||||
});
|
||||
|
||||
document.addEventListener("keyup", function (event) {
|
||||
if (event.key === "Escape") {
|
||||
body.classList.remove("menu-open");
|
||||
menuToggle.ariaExpanded = 'false';
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("scroll", () => {
|
||||
const scrolled = document.scrollingElement.scrollTop;
|
||||
const position = body.offsetTop;
|
||||
const header = document.querySelector(".site-header");
|
||||
|
||||
if (scrolled > position + header.offsetHeight) {
|
||||
body.classList.add("scrolled");
|
||||
} else {
|
||||
body.classList.remove("scrolled");
|
||||
}
|
||||
});
|
||||
|
||||
wrapper.addEventListener("click", (e) => {
|
||||
const target = e.target;
|
||||
|
||||
if(!menuToggle.contains(target) && body.classList.contains("menu-open")) {
|
||||
body.classList.remove("menu-open");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
@php(dynamic_sidebar('sidebar-primary'))
|
||||
Reference in New Issue
Block a user