Update 1.js

This commit is contained in:
FURK4NGG
2024-11-03 16:06:29 +03:00
committed by GitHub
parent f78bf55e54
commit c512477fc4
+7 -1
View File
@@ -16,6 +16,7 @@ function switchPhoto() {
// Initially set the first image as visible // Initially set the first image as visible
images[currentIndex].classList.add('visible'); images[currentIndex].classList.add('visible');
/*SCROLL REVEALING*/ /*SCROLL REVEALING*/
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const textContainer = document.getElementById('animatedTextContainer'); const textContainer = document.getElementById('animatedTextContainer');
@@ -87,6 +88,7 @@ document.addEventListener("DOMContentLoaded", function() {
} }
}); });
/*SAVE DATA AND RUN OFFLINE*/ /*SAVE DATA AND RUN OFFLINE*/
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
window.addEventListener('load', () => { window.addEventListener('load', () => {
@@ -100,6 +102,7 @@ if ('serviceWorker' in navigator) {
}); });
} }
/*TO-TOP BUTTON REVEALING*/ /*TO-TOP BUTTON REVEALING*/
const toTop = document.querySelector(".to-top"); const toTop = document.querySelector(".to-top");
const trandingSlideContent = document.querySelector(".tranding-slide-content"); const trandingSlideContent = document.querySelector(".tranding-slide-content");
@@ -129,6 +132,7 @@ window.addEventListener('load', function() {
if (sidebarCheckbox.checked) {sidebarCheckbox.checked = false;} if (sidebarCheckbox.checked) {sidebarCheckbox.checked = false;}
}); });
/*LOADING SCREEN*/ /*LOADING SCREEN*/
gsap.fromTo( gsap.fromTo(
".loading_page", ".loading_page",
@@ -171,6 +175,7 @@ const options = {
autoMatchOsTheme: true // default: true autoMatchOsTheme: true // default: true
} }
/*GALLERY IMAGES*/ /*GALLERY IMAGES*/
var TrandingSlider = new Swiper('.tranding-slider', { var TrandingSlider = new Swiper('.tranding-slider', {
effect: 'coverflow', effect: 'coverflow',
@@ -220,6 +225,7 @@ document.addEventListener("DOMContentLoaded", function() {
}); });
}); });
/*ANIMATED TEXT*/ /*ANIMATED TEXT*/
const dynamicText = document.querySelector(".h1 span"); const dynamicText = document.querySelector(".h1 span");
const words = ["Geliştiriciyim", "Sporcuyum", "Müzisyenim"]; const words = ["Geliştiriciyim", "Sporcuyum", "Müzisyenim"];
@@ -311,7 +317,7 @@ function animateCircles() {
animateCircles(); animateCircles();
/*Disable copy-paste*/ /*DISABLE COPY-PASTE*/
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
const showAlert = e => { const showAlert = e => {
e.preventDefault(); // preventing its default behaviour e.preventDefault(); // preventing its default behaviour