-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11c52bd
commit e9d1f02
Showing
74 changed files
with
7,685 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
// Function to toggle language and store preference | ||
function toggleLanguage() { | ||
var btn = document.getElementById('language-btn'); | ||
var isEnglish = btn.classList.contains('active'); | ||
|
||
// Determine the current language and switch accordingly | ||
if (isEnglish) { | ||
// Temporarily disable switching to Greek | ||
// Switch to Greek | ||
//localStorage.setItem('language', 'GR'); | ||
//switchLanguageToGreek(); | ||
alert('Greek coming soon!'); | ||
} else { | ||
// Switch to English | ||
localStorage.setItem('language', 'EN'); | ||
switchLanguageToEnglish(); | ||
} | ||
} | ||
|
||
// Function to switch language to English | ||
function switchLanguageToEnglish() { | ||
var currentPath = window.location.pathname; | ||
var newPath; | ||
if (currentPath.endsWith('/') || currentPath.endsWith('/index_gr.html')) { | ||
newPath = currentPath.replace('/index_gr.html', '/index.html'); | ||
if (newPath.endsWith('/')) { | ||
newPath += 'index.html'; | ||
} | ||
} else if (currentPath.includes('_gr.html')) { | ||
newPath = currentPath.replace('_gr.html', '.html'); | ||
} else { | ||
newPath = currentPath; | ||
} | ||
window.location.href = newPath; | ||
} | ||
|
||
// Function to switch language to Greek | ||
//var currentPath = window.location.pathname; | ||
//var newPath; | ||
|
||
//if (currentPath.endsWith('/') || currentPath.endsWith('/index.html')) { | ||
// newPath = currentPath.replace('/index.html', '/index_gr.html'); | ||
// if (newPath.endsWith('/')) { | ||
// newPath += 'index_gr.html'; | ||
// } | ||
//} else if (currentPath.includes('.html') && !currentPath.includes('_gr.html')) { | ||
// newPath = currentPath.replace('.html', '_gr.html'); | ||
//} else { | ||
// newPath = currentPath + '_gr.html'; | ||
//} | ||
|
||
//window.location.href = newPath; | ||
|
||
function switchLanguageToGreek() { | ||
alert('Greek coming soon!'); | ||
} | ||
|
||
// Function to initialize language toggle based on saved preference | ||
function initializeLanguageToggle() { | ||
var savedLanguage = localStorage.getItem('language'); | ||
var btn = document.getElementById('language-btn'); | ||
var langEn = document.getElementById('lang-en'); | ||
var langGr = document.getElementById('lang-gr'); | ||
|
||
// Set initial language based on saved preference or default to English | ||
var isEnglish = savedLanguage === 'EN' || !savedLanguage; // Default to English if no preference is saved | ||
|
||
// Update UI based on initial language | ||
btn.classList.toggle('active', isEnglish); | ||
langEn.classList.toggle('active-lang', isEnglish); | ||
langGr.classList.toggle('active-lang', !isEnglish); | ||
|
||
// Update content of text elements based on the saved language | ||
var elements = document.querySelectorAll('[data-gr]'); | ||
elements.forEach(function(el) { | ||
var enText = el.getAttribute('data-en') || el.textContent.trim(); | ||
var grText = el.getAttribute('data-gr').trim(); | ||
el.textContent = isEnglish ? enText : grText; // Update text content based on the saved language | ||
}); | ||
|
||
// Check if the current path matches the saved language | ||
var currentPath = window.location.pathname; | ||
if (isEnglish && (currentPath.endsWith('/index_gr.html') || currentPath.includes('_gr.html'))) { | ||
switchLanguageToEnglish(); | ||
} else if (!isEnglish && (currentPath.endsWith('/index.html') || currentPath.includes('.html') && !currentPath.includes('_gr.html'))) { | ||
switchLanguageToGreek(); | ||
} | ||
} | ||
|
||
// Event listener for the language toggle button | ||
var languageBtn = document.getElementById('language-btn'); | ||
if (languageBtn) { | ||
languageBtn.addEventListener('click', toggleLanguage); | ||
} | ||
|
||
// Initialize language toggle on page load | ||
initializeLanguageToggle(); | ||
}); |
Oops, something went wrong.