Homepage update
Deploy to Production on Develop Push / deploy (push) Successful in 1m43s

This commit is contained in:
Mark Poljanšek committed 2025-09-08 22:52:15 +02:00
1 parent 32e3a274a2
commit 90055985fd
14 files changed
+137 -140

No files matched your search

+4 -20
View File
@@ -108,16 +108,13 @@ document.addEventListener('DOMContentLoaded', function() {
// --- Funkcionalnost za preklopnik jezika (Desktop Dropdown + Mobile Modal) ---
function setupLanguageSwitcher() {
try {
// 1. POPRAVLJENA Logika za dinamično generiranje URL-jev
const path = window.location.pathname;
const pathParts = path.split('/').filter(Boolean);
const validLangs = ['en', 'si', 'mk'];
let pathWithoutLang = '/';
if (pathParts.length > 0 && validLangs.includes(pathParts[0])) {
// Sestavi pot iz delov, ki sledijo jezikovni kodi
pathWithoutLang = '/' + pathParts.slice(1).join('/');
// Če se je originalna pot končala s '/', jo dodaj nazaj (za mape)
if (path.endsWith('/') && pathWithoutLang !== '/') {
pathWithoutLang += '/';
}
@@ -127,14 +124,10 @@ document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('a[data-lang]').forEach(link => {
const targetLang = link.getAttribute('data-lang');
// Združi novo jezikovno kodo in preostanek poti
const newUrl = `/${targetLang}${pathWithoutLang}`;
// Zamenjaj morebitne dvojne poševnice z eno samo, razen na začetku
link.setAttribute('href', newUrl.replace(/\/{2,}/g, '/'));
});
// 2. POPRAVLJENA Logika za NAMIZNI dropdown
// Uporablja bolj specifičen selektor, ki se ujema z novo HTML strukturo
const desktopSelectors = document.querySelectorAll('.header-right-wrapper .language-selector');
desktopSelectors.forEach(selector => {
const currentLang = selector.querySelector('.current-lang');
@@ -154,7 +147,6 @@ document.addEventListener('DOMContentLoaded', function() {
desktopSelectors.forEach(s => s.classList.remove('active'));
});
// 3. Logika za MOBILNO modalno okno (ostaja enaka, vendar bo zdaj delovala pravilno)
const mobileLangButton = document.getElementById('mobile-lang-trigger');
const languageModal = document.getElementById('language-modal-overlay');
const closeModalButton = document.getElementById('language-modal-close');
@@ -210,18 +202,10 @@ document.addEventListener('DOMContentLoaded', function() {
if (activityNavItems.length > 0 && activityDetailsText) {
const activitiesData = {
'Študentsko predstavništvo': { text: 'Vsebina za študentsko predstavništvo...'},
'Izobraževanje in kultura': { text: 'Vsebina za izobraževanje in kulturo...'},
'Zabava in druženje': { text: 'Vsebina za zabavo in druženje...'},
'Študentska podpora': { text: 'Vsebina za študentsko podoro...'},
'Student representation': { text: 'Content for student representation...'},
'Education and culture': { text: 'Content for education and culture...'},
'Entertainment and socializing': { text: 'Content for entertainment and socializing...'},
'Student support': { text: 'Content for student support...'},
'Студентско претставување': { text: 'Содржина за студентско претставување...'},
'Образование и култура': { text: 'Содржина за образование и култура...'},
'Забава и дружење': { text: 'Содржина за забава и дружење...'},
'Студентска поддршка': { text: 'Содржина за студентска поддршка...'}
'Student Support': { text: "We know moving to a new country can feel overwhelming, so we’re here to make it easier. From helping you with university applications to finding your way around student life in Slovenia, you can always count on us. We offer free consultations, answer your questions on Instagram and Facebook (yes, even late at night), and host events where you can meet others and hear real experiences first-hand. With mentorship, info sessions, and a friendly community by your side, you’ll never have to go through the journey alone."},
'Fun & Social Life': { text: "Student life is so much more than lectures and exams — it’s about the moments in between. At MSOS, we create those moments: from parties, concerts, and casual hangouts, to cinema nights, excursions, and team-building trips. We also host talks and events where you can share ideas, meet new people, and feel part of something bigger. Whether you’re connecting with Macedonian students or making friends with Slovenians and internationals, our activities are all about building a community where you can relax, have fun, and create memories that last long after university."},
'Education & Culture': { text: "Studying abroad isn’t only about lectures and exams — it’s also about growing as a person. That’s why we mix learning with culture. We run study groups and small workshops where you can share knowledge and pick up new skills. At the same time, we keep our traditions alive with cultural evenings, music, food, and gatherings that remind us of home. It’s a balance: support for your studies, and a space to stay connected to who we are."},
'Student Representation': { text: "Studying abroad comes with challenges, and sometimes students need a voice that’s heard. At MSOS, we take that role seriously. We organize meetings with government representatives, ministries, embassies, universities, and other key institutions to make sure the interests of Macedonian students in Slovenia are on the table. From campus issues to academic policies and integration, we work to solve problems, push for positive changes, and create a better experience for all of us."}
};
activityNavItems.forEach(item => {