add read more option to song's about section

This commit is contained in:
rramiachraf
2022-10-08 22:46:48 +01:00
parent 9325639b13
commit f5288a0e1d
4 changed files with 30 additions and 5 deletions

View File

@ -1,7 +1,18 @@
const fullAbout = document.querySelector("#about #full_about")
const summary = document.querySelector("#about #summary")
function showAbout() {
summary.classList.toggle("hidden")
fullAbout.classList.toggle("hidden")
}
[fullAbout, summary].forEach(item => item.onclick = showAbout)
document.querySelectorAll("#lyrics a").forEach(item => {
item.addEventListener("click", getAnnotation)
})
function getAnnotation(e) {
e.preventDefault()
console.log(e.target.parentElement.getAttribute("href"))
}

View File

@ -99,7 +99,8 @@ a {
#container {
display: grid;
grid-template-columns: 1fr 3fr 1fr;
padding: 2rem;
padding: 5rem 10rem;
gap: 5rem;
}
#credits {
@ -141,4 +142,10 @@ a {
font-size: 1.4rem;
color: #171717;
line-height: 1.8rem;
cursor: pointer;
}
.hidden {
display: none;
}