~
მსოფლიო ისტორია | gorgasliani.com
მთავარი
const imgBase = "https://gorgasliani.com/wp-content/themes/gorgasliani/assets/images/";
const pages = [
{
title: "პირველი მსოფლიო ომი",
description: "გაიგეთ, როგორ იქცა ერთი გასროლა სარაევოში გლობალურ კატასტროფად, რომელმაც ოთხი დიდი იმპერია დაამხო და მსოფლიო რუკა სამუდამოდ შეცვალა.",
images: ["ww1-1.png", "ww1-2.png", "ww13.png", "ww1-1.png"],
background: "ww1.png",
link: "https://gorgasliani.com/msoflio-istoria/first-world-war/"
},
{
title: "რომის იმპერია",
description: "აღმოაჩინეთ მარადიული ქალაქის საიდუმლოებები: დაუმარცხებელი ლეგიონებიდან და გრანდიოზული კოლიზეუმიდან დიდებულ იმპერატორებამდე, რომლებმაც დასავლური სამყარო ჩამოაყალიბეს.",
images: ["rome-1.png", "rome-2.png", "rome3.png", "rome-1.png"],
background: "rome.png",
link: "https://gorgasliani.com/msoflio-istoria/romis-imperia/"
},
{
title: "გეოგრაფიული აღმოჩენები",
description: "ეპოქა, როდესაც ჰორიზონტი გაფართოვდა. გაჰყევით კოლუმბის, მაგელანისა და ვასკო და გამას კვალს ახალი კონტინენტებისა და ოქროს ძიებაში.",
images: [
"https://gorgasliani.com/wp-content/uploads/2026/04/Whisk_28b2778cb5e2bada8854137513307be4dr.jpeg",
"https://gorgasliani.com/wp-content/uploads/2026/04/Whisk_68753997b37a77ea61a4b790b81dfa12dr.jpeg",
"https://gorgasliani.com/wp-content/uploads/2026/04/Whisk_794de8a199c3ecd84de45d8fd6bad11cdr.jpeg",
"https://gorgasliani.com/wp-content/uploads/2026/04/Whisk_69a8160f7fa19da85a044eb738015734dr.jpeg"
],
background: "https://gorgasliani.com/wp-content/uploads/2026/04/Whisk_28b2778cb5e2bada8854137513307be4dr.jpeg",
link: "https://gorgasliani.com/didi-geografiuli-agmochenebi/"
},
{
title: "ინდუსტრიული რევოლუცია",
description: "ორთქლის ძრავიდან ელექტროენერგიამდე. ნახეთ, როგორ გარდაქმნა ტექნოლოგიურმა ნახტომმა აგრარული საზოგადოება თანამედროვე ინდუსტრიულ სამყაროდ.",
images: ["revolution-1.png", "revolution-2.png", "revolution3.png", "revolution-1.png"],
background: "revolution.png",
link: "https://gorgasliani.com/msoflio-istoria/industriuli-revolucia/"
},
{
title: "შუა საუკუნეების ევროპა",
description: "ფეოდალური სამყაროდან კათედრალების აღმართვამდე — შუა საუკუნეების ევროპა ომების, რწმენის, ჭირისა და რენესანსის წინარე გარდატეხის ეპოქაა. გაიგეთ, როგორ ჩამოყალიბდა თანამედროვე დასავლეთი.",
images: [
"https://gorgasliani.com/wp-content/uploads/2026/05/ტამპლიერები.jpg",
"https://gorgasliani.com/wp-content/uploads/2026/05/ტამპლიერები-2.jpg",
"https://gorgasliani.com/wp-content/uploads/2026/05/ტამპლიერები-3.jpg",
"https://gorgasliani.com/wp-content/uploads/2026/05/ტამპლიერები-4.jpg"
],
background: "https://gorgasliani.com/wp-content/uploads/2026/05/ტამპლიერები.jpg",
link: "https://gorgasliani.com/%e1%83%a8%e1%83%a3%e1%83%90-%e1%83%a1%e1%83%90%e1%83%a3%e1%83%99%e1%83%a3%e1%83%9c%e1%83%94%e1%83%94%e1%83%91%e1%83%98%e1%83%a1-%e1%83%94%e1%83%95%e1%83%a0%e1%83%9d%e1%83%9e%e1%83%90//"
}
];
let currentIndex = 0;
let progress = 0;
const slideTime = 8000;
function getImgUrl(path) {
return path.startsWith('http') ? path : imgBase + path;
}
function updateSlide() {
const stage = document.getElementById('mainStage');
const textSection = document.getElementById('textSection');
const imageGrid = document.getElementById('imageGrid');
const routeBtn = document.getElementById('routeBtn');
const data = pages[currentIndex];
textSection.classList.remove('active');
imageGrid.classList.remove('active');
setTimeout(() => {
stage.style.backgroundImage = `url('${getImgUrl(data.background)}')`;
document.getElementById('mainTitle').innerText = data.title;
document.getElementById('mainDesc').innerText = data.description;
if (data.link !== "#") {
routeBtn.innerText = "გაეცანი სრულად";
routeBtn.onclick = () => location.href = data.link;
routeBtn.style.cursor = "pointer";
routeBtn.style.opacity = "1";
} else {
routeBtn.innerText = "მალე დაემატება";
routeBtn.onclick = null;
routeBtn.style.cursor = "default";
routeBtn.style.opacity = "0.7";
}
for (let i = 1; i <= 4; i++) {
document.getElementById(`img${i}`).src = getImgUrl(data.images[i - 1]);
}
textSection.classList.add('active');
imageGrid.classList.add('active');
progress = 0;
}, 400);
}
function nextSlide() {
currentIndex = (currentIndex + 1) % pages.length;
updateSlide();
}
function prevSlide() {
currentIndex = (currentIndex - 1 + pages.length) % pages.length;
updateSlide();
}
window.onload = updateSlide;