Backup: Stand vor Design-Optimierung (2026-02-16)
Dieser Commit ist enthalten in:
36
js/main.js
36
js/main.js
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Main application entry point for IntelSight website
|
||||
* Main application entry point for AegisSight website
|
||||
* Initializes all modules and coordinates application startup
|
||||
*/
|
||||
|
||||
@@ -63,11 +63,11 @@ const App = {
|
||||
* Start the application after DOM is ready
|
||||
*/
|
||||
start() {
|
||||
console.log('IntelSight Website Initializing...');
|
||||
console.log('AegisSight Website Initializing...');
|
||||
|
||||
// Initialize modules in correct order
|
||||
try {
|
||||
// 1. Initialize translations first (needed by components)
|
||||
// 1. Initialize translations first (includes year replacement)
|
||||
initTranslations();
|
||||
console.log('✓ Translations initialized');
|
||||
|
||||
@@ -85,7 +85,7 @@ const App = {
|
||||
// 5. Setup performance monitoring
|
||||
this.setupPerformanceMonitoring();
|
||||
|
||||
console.log('IntelSight Website Ready!');
|
||||
console.log('AegisSight Website Ready!');
|
||||
|
||||
} catch (error) {
|
||||
console.error('Failed to initialize application:', error);
|
||||
@@ -131,6 +131,34 @@ const App = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Set current year in footer and update translations dynamically
|
||||
*/
|
||||
setCurrentYear() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
// Set current year in main footer span element
|
||||
const yearElement = document.getElementById('currentYear');
|
||||
if (yearElement) {
|
||||
yearElement.textContent = currentYear;
|
||||
}
|
||||
|
||||
// Set current year in legal pages footer spans
|
||||
const legalYearElements = document.querySelectorAll('.current-year');
|
||||
legalYearElements.forEach(element => {
|
||||
element.textContent = currentYear;
|
||||
});
|
||||
|
||||
// Update copyright translation with current year
|
||||
if (window.translations) {
|
||||
Object.keys(window.translations).forEach(lang => {
|
||||
if (window.translations[lang].copyright) {
|
||||
window.translations[lang].copyright = window.translations[lang].copyright.replace('{year}', currentYear);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get first paint time if available
|
||||
* @returns {number|null} First paint time in milliseconds
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren