update
This commit is contained in:
parent
76fd9fb811
commit
fa6bc5f3f3
14 changed files with 224 additions and 47 deletions
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* Schedule collapsable section animation
|
||||
*/
|
||||
document.querySelectorAll('.schedule-category').forEach(node => {
|
||||
let opened = false
|
||||
let icon = node.querySelector('.schedule-category-collapse-icon')
|
||||
|
|
@ -17,3 +20,25 @@ document.querySelectorAll('.schedule-category').forEach(node => {
|
|||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Gallery modal to view media in large
|
||||
*/
|
||||
let mediaModal = document.querySelector('#media-modal')
|
||||
let mediaModalImage = document.querySelector('#media-modal-image')
|
||||
|
||||
let openModal = url => {
|
||||
mediaModal.style.visibility = 'visible'
|
||||
mediaModal.style.opacity = 1
|
||||
let attr = document.createAttribute('src')
|
||||
attr.value = url
|
||||
mediaModalImage.attributes.setNamedItem(attr)
|
||||
document.body.style.height = "100vh"
|
||||
document.body.style.overflow = "hidden"
|
||||
}
|
||||
|
||||
let closeModal = () => {
|
||||
mediaModal.style.visibility = 'hidden'
|
||||
mediaModal.style.opacity = 0
|
||||
document.body.style.overflow = "initial"
|
||||
document.body.style.height = "initial"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue