Skip to content

Commit

Permalink
gif
Browse files Browse the repository at this point in the history
  • Loading branch information
kabrownie committed Dec 25, 2024
1 parent 861211d commit 21fc086
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 30 deletions.
30 changes: 25 additions & 5 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,40 @@ fieldset {


/* Preloader */

#preloader {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: #312f2f;
background-color: rgb(0, 0, 0); /* Dark overlay background */
z-index: 999;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
transition: all .5s ease;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
transition: all 0.5s ease;
}

#loaderGif {
width: 80%; /* Adjust the size of the GIF */
height: auto;
}

#loadingText {
color: #fff;
font-size: 1.5em;
font-family: Arial, sans-serif;
margin-top: 20px; /* Space below the GIF */
text-align: center;
}


/* */


body.loaded #preloader{
opacity: 0;
visibility: hidden;
Expand Down
11 changes: 8 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@
<body>
<header>
<!-- Preloader Start -->
<div id="preloader">
<div class="loader"></div>
</div>


<div id="preloader">
<img id="loaderGif" src="../renders/sinisaaamoja-ezgif.gif" alt="Loading...">
<div id="loadingText">Loading, please wait...</div>
</div>


<!-- Preloader End -->

<!-- Home & Menu Section Start -->
Expand Down
22 changes: 0 additions & 22 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -1,22 +0,0 @@


// Function to show image in overlay
function showImageInOverlay(url) {
const overlay = document.getElementById('imageOverlay');
const overlayImage = document.getElementById('overlayImage');
overlayImage.src = url; // Set the clicked image in the overlay
overlay.style.display = 'flex'; // Show the overlay
}

// Close the overlay when 'x' button is clicked
const closeOverlay = document.getElementById("closeOverlay");
closeOverlay.addEventListener("click", function() {
document.getElementById("imageOverlay").style.display = "none";
});

// Optionally, close the overlay if the user clicks outside the image
const overlay = document.getElementById("imageOverlay");
overlay.addEventListener("click", function() {
document.getElementById("imageOverlay").style.display="none";

});
22 changes: 22 additions & 0 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@
event.preventDefault(); // Disable right-click for images
}
});
// Function to show image in overlay
function showImageInOverlay(url) {
const overlay = document.getElementById('imageOverlay');
const overlayImage = document.getElementById('overlayImage');
overlayImage.src = url; // Set the clicked image in the overlay
overlay.style.display = 'flex'; // Show the overlay
}

// Close the overlay when 'x' button is clicked
const closeOverlay = document.getElementById("closeOverlay");
closeOverlay.addEventListener("click", function() {
document.getElementById("imageOverlay").style.display = "none";
});

// Optionally, close the overlay if the user clicks outside the image
const overlay = document.getElementById("imageOverlay");
overlay.addEventListener("click", function() {
document.getElementById("imageOverlay").style.display="none";

});


// modalend
Expand Down Expand Up @@ -142,6 +162,8 @@ $(document).ready(function(){
});






/* Portfolio Filtering */
Expand Down
Binary file added renders/sinisaaamoja-ezgif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 21fc086

Please sign in to comment.