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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,16 +106,10 @@
|
|||
margin-top: .75em;
|
||||
width: 100%;
|
||||
height: 25em;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: 1fr .5fr .5fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
|
||||
grid-column-gap: .75em;
|
||||
grid-row-gap: .75em;
|
||||
|
||||
/* Negative to cancel the grid gap */
|
||||
/* margin-bottom: -.75em; */
|
||||
}
|
||||
|
||||
.media-overlay {
|
||||
|
|
@ -146,7 +140,45 @@
|
|||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.media-container:first-of-type {
|
||||
/**
|
||||
* MOSAIC CASES
|
||||
**/
|
||||
/* Mosaic level 1 */
|
||||
.mosaic-1 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.mosaic-1 .media-container {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
/* Mosaic level 2 */
|
||||
.mosaic-2 {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
|
||||
/* Mosaic level 3 */
|
||||
.mosaic-3 {
|
||||
grid-template-columns: 1fr .5fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
}
|
||||
.mosaic-3 .media-container:first-of-type {
|
||||
grid-row: 1 / span 2;
|
||||
}
|
||||
|
||||
/* Mosaic level 4 */
|
||||
.mosaic-4 {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
}
|
||||
|
||||
/* With five medias */
|
||||
.mosaic-5 {
|
||||
grid-template-columns: 1fr .5fr .5fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
}
|
||||
.mosaic-5 .media-container:first-of-type {
|
||||
grid-row: 1 / span 2;
|
||||
}
|
||||
|
||||
|
|
@ -168,6 +200,54 @@
|
|||
background-position: center;
|
||||
}
|
||||
|
||||
/**
|
||||
* Media modal
|
||||
*/
|
||||
.media-modal-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, .80);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0.1s linear,opacity 0.1s linear;
|
||||
}
|
||||
|
||||
.media-modal {
|
||||
position: relative;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.media-modal img {
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.media-close {
|
||||
position: absolute;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
right: -.75em;
|
||||
top: -.75em;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
opacity: 0.7;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.media-close:hover {
|
||||
transform: scale(1.2);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* *****************************************************************************
|
||||
|
||||
* SECTION
|
||||
|
|
@ -513,11 +593,46 @@ section {
|
|||
|
||||
.media-mosaic {
|
||||
height: 33em;
|
||||
}
|
||||
|
||||
/**
|
||||
* MOSAIC CASES
|
||||
*/
|
||||
/* Mosaic level 1 */
|
||||
.mosaic-1 .media-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Mosaic level 2 */
|
||||
.mosaic-2, .mosaic-3 {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* Mosaic level 3 */
|
||||
.mosaic-3 {
|
||||
grid-template-rows: 1fr 1fr 1fr;
|
||||
}
|
||||
.mosaic-3 .media-container:first-of-type {
|
||||
grid-row: 1 / span 1;
|
||||
}
|
||||
|
||||
/* Mosaic level 4 */
|
||||
.mosaic-4 {
|
||||
grid-template-rows: 1fr 1fr 1fr;
|
||||
}
|
||||
.mosaic-4 .media-container:first-of-type, .mosaic-4 .media-container:nth-of-type(2) {
|
||||
grid-column: 1 / span 2;
|
||||
}
|
||||
.mosaic-4 .media-container:first-of-type {
|
||||
grid-row: 1 / span 1;
|
||||
}
|
||||
|
||||
/* Mosaic level 5 */
|
||||
.mosaic-5 {
|
||||
grid-template-columns: .5fr .5fr;
|
||||
grid-template-rows: 1fr .5fr .5fr;
|
||||
}
|
||||
|
||||
.media-container:first-of-type {
|
||||
.mosaic-5 .media-container:first-of-type {
|
||||
grid-row: 1 / span 1;
|
||||
grid-column: 1 / span 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue