Fix takenCourses buttons (#772)

This commit is contained in:
Bernat Borràs Civil 2023-07-03 18:14:35 +02:00 committed by GitHub
parent 9a759090cd
commit a128873f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -22,12 +22,9 @@ function toggleCourseVisibility (elem) {
}
window.addEventListener('DOMContentLoaded', () => {
const els = [
document.getElementById('show-more-btn'),
document.getElementById('show-less-btn')
]
const els = Array.from(document.getElementsByClassName('btn'));
els.filter((el) => el != null).forEach((el) =>
els.filter((el) => el != null && (el.id == 'show-more-btn' || el.id == 'show-less-btn')).forEach((el) =>
el.addEventListener('click', ({ target }) =>
toggleCourseVisibility(target)))
})

View file

@ -122,6 +122,10 @@
.taken-courses ul {
margin-bottom: 0;
}
.hidden {
display: none;
}
/*============ Education Alter Template =============*/
.education-alt .degree-info {