Update 1.js

This commit is contained in:
FURK4NGG
2025-02-18 12:36:05 +03:00
committed by GitHub
parent 846095d581
commit 804bcae590
+11 -11
View File
@@ -50,20 +50,20 @@ images[currentIndex].classList.add('visible');
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const textContainer = document.getElementById('animatedTextContainer'); const textContainer = document.getElementById('animatedTextContainer');
async function getCurrentYear() { async function getCurrentYear() {
try { try {
const response = await fetch("http://worldtimeapi.org/api/timezone/Etc/UTC"); const response = await fetch("http://worldtimeapi.org/api/timezone/Etc/UTC");
if (!response.ok) throw new Error("Veri alınamadı"); if (!response.ok) throw new Error("Veri alınamadı");
const data = await response.json(); const data = await response.json();
return new Date(data.utc_datetime).getFullYear(); return new Date(data.utc_datetime).getFullYear();
} catch (error) { } catch (error) {
console.error("Yıl bilgisi çekilemedi:", error); console.error("Yıl bilgisi çekilemedi:", error);
return null; // Hata durumunda null döndür return null; // Hata durumunda null döndür
} }
} }
getCurrentYear().then(year => { getCurrentYear().then(year => {
const text1 = year ? `an ${year - 2005} years old` : ""; const text1 = year ? `an ${year - 2006} years old` : "";
const text = `I am ${text1} university student studying Computer Engineering. Since 2020, I have mostly improved myself in back-end departments, particularly in Robotic Coding, Mobile Application Development, 2D/3D Game Development, Website Creation, Cyber Security, and AI Prompt Engineering. I have also participated in Teknofest Competitions and TUBITAK projects. Right now, I am working on projects related to AI and IoT. I am passionate about creating innovative solutions that can positively impact peoples lives and contribute to society, and I am always open to exploring new ideas that serve humanity.`; const text = `I am ${text1} university student studying Computer Engineering. Since 2020, I have mostly improved myself in back-end departments, particularly in Robotic Coding, Mobile Application Development, 2D/3D Game Development, Website Creation, Cyber Security, and AI Prompt Engineering. I have also participated in Teknofest Competitions and TUBITAK projects. Right now, I am working on projects related to AI and IoT. I am passionate about creating innovative solutions that can positively impact peoples lives and contribute to society, and I am always open to exploring new ideas that serve humanity.`;
console.log(text); console.log(text);
}); });