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
images[currentIndex].classList.add('visible');
/*SCROLL REVEALING*/
document.addEventListener('DOMContentLoaded', () => {
const textContainer = document.getElementById('animatedTextContainer');
@@ -87,6 +88,7 @@ document.addEventListener("DOMContentLoaded", function() {
}
});
/*SAVE DATA AND RUN OFFLINE*/
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
@@ -100,6 +102,7 @@ if ('serviceWorker' in navigator) {
});
}
/*TO-TOP BUTTON REVEALING*/
const toTop = document.querySelector(".to-top");
const trandingSlideContent = document.querySelector(".tranding-slide-content");
@@ -129,6 +132,7 @@ window.addEventListener('load', function() {
if (sidebarCheckbox.checked) {sidebarCheckbox.checked = false;}
});
/*LOADING SCREEN*/
gsap.fromTo(
".loading_page",
@@ -171,6 +175,7 @@ const options = {
autoMatchOsTheme: true // default: true
}
/*GALLERY IMAGES*/
var TrandingSlider = new Swiper('.tranding-slider', {
effect: 'coverflow',
@@ -220,6 +225,7 @@ document.addEventListener("DOMContentLoaded", function() {
});
});
/*ANIMATED TEXT*/
const dynamicText = document.querySelector(".h1 span");
const words = ["Geliştiriciyim", "Sporcuyum", "Müzisyenim"];
@@ -311,7 +317,7 @@ function animateCircles() {
animateCircles();
/*Disable copy-paste*/
/*DISABLE COPY-PASTE*/
const disabledKeys = ["c", "C", "x", "J", "u", "I"]; // keys that will be disabled
const showAlert = e => {
e.preventDefault(); // preventing its default behaviour