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