-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d4bf23
commit b1e2291
Showing
6 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//RECIT Editor JS from before Moodle Approval | ||
|
||
|
||
|
||
document.body.addEventListener('click',function(e){ | ||
if(e.target && e.target.classList.contains('videobtn')){ | ||
let url = e.target.getAttribute('data-videourl'); | ||
if (url){ | ||
let iframe = document.createElement('iframe'); | ||
iframe.src = url; | ||
new M.recit.reciteditor.Popup(iframe); | ||
} | ||
e.preventDefault(); | ||
}else if(e.target && e.target.classList.contains('r_img-popup')){ | ||
let url = e.target.src; | ||
if (url){ | ||
let img = document.createElement('img'); | ||
img.src = url; | ||
new M.recit.reciteditor.Popup(img); | ||
} | ||
e.preventDefault(); | ||
}else if(e.target && e.target.matches('.flipcard2 *')){ //Check if user clicked on a flipcard or its children | ||
let el = e.target; | ||
while (el = el.parentElement){ | ||
if (el.classList.contains('flipcard2')){ | ||
break; | ||
} | ||
} | ||
if (!el) return; | ||
if(el.classList.contains("hover2")){ | ||
el.classList.remove('hover2'); | ||
}else{ | ||
el.classList.add('hover2'); | ||
} | ||
e.preventDefault(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* classes of before moodle approval */ | ||
|
||
/* Start RÉCIT Éditor */ | ||
.row-fluid { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; } | ||
|
||
/* Popup */ | ||
.r_popup, .r_popup .modal-dialog { max-width: 100vw; max-height: 100vh; width: fit-content; width: -moz-fit-content; margin: auto;} | ||
.r_popup .modal-body { padding: 0; overflow: hidden; } | ||
.r_popup iframe { width: 90vw; height: 85vh; border: 0; } | ||
.r_popup img { max-height: 85vh; max-width: 90vw; } | ||
|
||
.img-popup { cursor: pointer; } | ||
|
||
/* Image cliquable */ | ||
.imgclick { text-align: center; position: relative; overflow: hidden; width: fit-content; width: -moz-fit-content; } | ||
.imgclick img { -webkit-transition: all 0.4s linear; transition: all 0.4s linear; } | ||
.imgclick a, .imgclick a:hover { display: block; color: #fff; } | ||
.imgclick .imgclickcontent { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } | ||
.imgclick:hover img { transform: scale(1.1); filter: brightness(50%); } | ||
.imgclick:hover .imgclickcontent { display: block; } | ||
|
||
/* Flipcard */ | ||
.flipcard2 { cursor: pointer; perspective: 1000px;} | ||
.flipcard2 .flipcard-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);} | ||
.flipcard2.hover2 .flipcard-inner { transform: rotateY(180deg);} | ||
.flipcard2 .back, .flipcard2 .front { width: 100%; height: 100%; -webkit-backface-visibility: hidden; /* Safari */ backface-visibility: hidden;} | ||
.flipcard2 .back { position: absolute; top: 0px; transform: rotateY(180deg);} | ||
/* End RÉCIT Éditor */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters