parent
981b66f221
commit
5f6909dfb9
@ -140,8 +140,9 @@ window.addEventListener("popstate", function() {router(location.pathname);});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
document.body.addEventListener("click", e => {
|
||||
if (e.target.classList.contains('nav-link')) {
|
||||
document.querySelector('[data-link].active')?.classList.remove('active');
|
||||
if (e.target.matches("[data-link]")) {
|
||||
e.preventDefault();
|
||||
document.querySelector('[data-link].nav-link.active')?.classList.remove('active');
|
||||
if (e.target.classList.contains('nav-link'))
|
||||
e.target.classList.add('active');
|
||||
navigateTo(e.target.href.slice(location.origin.length));
|
||||
|
@ -7,6 +7,7 @@
|
||||
<title>Bozo Pong</title>
|
||||
<link rel="stylesheet" href="{% static 'css/bootstrap/bootstrap.min.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/index.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/index.css' %}">
|
||||
</head>
|
||||
<body data-bs-theme="dark">
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary rounded m-2">
|
||||
|
Loading…
Reference in New Issue
Block a user