broken but cool htmx! also improved templating
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
5c59348362
commit
c1ff03c4e5
18 changed files with 297 additions and 97 deletions
|
@ -1,15 +1,5 @@
|
|||
document.querySelectorAll("h2.question").forEach(element => {
|
||||
element.onclick = (e) => {
|
||||
const url = `${window.location.protocol}//${window.location.host}${window.location.pathname}#${e.target.id}`;
|
||||
window.location = url;
|
||||
};
|
||||
});
|
||||
import "./main.js";
|
||||
|
||||
document.querySelectorAll("div.music").forEach(element => {
|
||||
console.log(element);
|
||||
element.addEventListener("click", (e) => {
|
||||
const url = `${window.location.protocol}//${window.location.host}/music/${element.id}`;
|
||||
window.location = url;
|
||||
});
|
||||
document.querySelectorAll("h1.music-title").forEach(element => {
|
||||
element.href = "";
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue