mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-07-03 06:26:19 +00:00
Replaced symlink with local version of Plugins
This commit is contained in:
parent
9fd86cb3fc
commit
dba8379a0c
8 changed files with 265 additions and 8 deletions
50
Flyout/flyout.js
Normal file
50
Flyout/flyout.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
$(document).ready(function() {
|
||||
var flyoutRoot = document.getElementById("#flyoutRoot");
|
||||
var flyoutDim = document.getElementById("#flyoutDim");
|
||||
|
||||
var flyoutHeader = document.getElementById("#flyoutHeader");
|
||||
var flyoutDescription = document.getElementById("#flyoutDescription");
|
||||
var flyoutActionbox = document.getElementById("#flyoutActionbox");
|
||||
});
|
||||
|
||||
function flyoutShow(header, description, actionbox) {
|
||||
// Checking if actionbox is set
|
||||
if (typeof actionbox === 'undefined') {
|
||||
flyoutActionbox.style.display = "none";
|
||||
} else if (actionbox == "") {
|
||||
flyoutActionbox.style.display = "none";
|
||||
} else {
|
||||
flyoutActionbox.style.display = "block";
|
||||
}
|
||||
|
||||
// Set information in flyout
|
||||
flyoutHeader.textContent = header;
|
||||
flyoutDescription.textContent = description;
|
||||
flyoutActionbox.innerHTML = actionbox;
|
||||
|
||||
// Show the flyout
|
||||
flyoutRoot.style.display = "flex";
|
||||
// Show the dim
|
||||
flyoutDim.style.display = "block";
|
||||
setTimeout(function(){
|
||||
// Show the flyout
|
||||
flyoutRoot.style.transform = "translateX(-50%) scale(1)";
|
||||
flyoutRoot.style.bottom = "1rem";
|
||||
// Show the dim
|
||||
flyoutDim.style.opacity = "1";
|
||||
}, 1);
|
||||
};
|
||||
|
||||
function flyoutClose() {
|
||||
// Hide the flyout
|
||||
flyoutRoot.style.transform = "translateX(-50%) scale(0.5)";
|
||||
flyoutRoot.style.bottom = "-20rem";
|
||||
// Hide the dim
|
||||
flyoutDim.style.opacity = "0";
|
||||
setTimeout(function(){
|
||||
// Hide the flyout
|
||||
flyoutRoot.style.display = "none";
|
||||
// Hide the dim
|
||||
flyoutDim.style.display = "none";
|
||||
}, 500);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue