refactor: improve styling a bit

This commit is contained in:
rramiachraf 2024-06-09 21:29:17 +01:00
parent 840d23e931
commit e6e9d5b16d
8 changed files with 118 additions and 32 deletions

View file

@ -1,12 +1,12 @@
const fullAbout = document.querySelector("#about #full_about")
const summary = document.querySelector("#about #summary")
const description = document.querySelector("#description > #full")
const summary = document.querySelector("#description > #summary")
function showAbout() {
function showDescription() {
summary.classList.toggle("hidden")
fullAbout.classList.toggle("hidden")
description.classList.toggle("hidden")
}
fullAbout && [fullAbout, summary].forEach(item => item.onclick = showAbout)
description && [description, summary].forEach(item => item.onclick = showDescription)
window.addEventListener("load", () => {
const geniusURL = "https://genius.com" + document.location.pathname + document.location.search