You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
window.addEventListener("load", () => {
|
|
|
|
for (let figure of document.getElementsByTagName("figure")) {
|
|
|
|
if (figure.classList.contains("post-cover") || figure.classList.contains("portfolio-cover"))
|
|
|
|
continue
|
|
|
|
|
|
|
|
figure.addEventListener("click", () => {
|
|
|
|
figure.classList.toggle("floated-focus")
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
document.addEventListener('keydown', (e) => {
|
|
|
|
if (e.keyCode !== 27)
|
|
|
|
return
|
|
|
|
|
|
|
|
for (let figure of document.getElementsByClassName("floated-focus")) {
|
|
|
|
figure.classList.remove("floated-focus")
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|