fix: make copyright year dynamic in footer

This commit is contained in:
2026-01-16 15:25:04 +01:00
parent 989d8af519
commit b5b7188bf9
2 changed files with 8 additions and 3 deletions

View File

@@ -2448,6 +2448,11 @@ function init() {
// Initialize i18n before anything else // Initialize i18n before anything else
initI18n(); initI18n();
// Set dynamic year in footer
document.querySelectorAll(".current-year").forEach((el) => {
el.textContent = new Date().getFullYear();
});
loadUserSettings(); loadUserSettings();
// Restore cached lesson content immediately to avoid "Loading..." flash // Restore cached lesson content immediately to avoid "Loading..." flash

View File

@@ -255,7 +255,7 @@
</section> </section>
</div> </div>
<div class="footer-bottom"> <div class="footer-bottom">
<p>&copy; 2025 <a href="https://librete.ch">LibreTECH</a>. <span data-i18n="footerLicense">Open source under MIT License.</span></p> <p>&copy; <span class="current-year"></span> <a href="https://librete.ch">LibreTECH</a>. <span data-i18n="footerLicense">Open source under MIT License.</span></p>
<p class="footer-legal"> <p class="footer-legal">
<button type="button" class="btn-text privacy-link" data-i18n="footerPrivacy">Privacy Policy</button> <button type="button" class="btn-text privacy-link" data-i18n="footerPrivacy">Privacy Policy</button>
<span class="footer-separator">·</span> <span class="footer-separator">·</span>
@@ -312,7 +312,7 @@
</section> </section>
</div> </div>
<div class="footer-bottom"> <div class="footer-bottom">
<p>&copy; 2025 <a href="https://librete.ch">LibreTECH</a>. <span data-i18n="footerLicense">Open source under MIT License.</span></p> <p>&copy; <span class="current-year"></span> <a href="https://librete.ch">LibreTECH</a>. <span data-i18n="footerLicense">Open source under MIT License.</span></p>
<p class="footer-legal"> <p class="footer-legal">
<button type="button" class="btn-text privacy-link" data-i18n="footerPrivacy">Privacy Policy</button> <button type="button" class="btn-text privacy-link" data-i18n="footerPrivacy">Privacy Policy</button>
<span class="footer-separator">·</span> <span class="footer-separator">·</span>
@@ -365,7 +365,7 @@
</section> </section>
</div> </div>
<div class="footer-bottom"> <div class="footer-bottom">
<p>&copy; 2025 <a href="https://librete.ch">LibreTECH</a>. <span data-i18n="footerLicense">Open source under MIT License.</span></p> <p>&copy; <span class="current-year"></span> <a href="https://librete.ch">LibreTECH</a>. <span data-i18n="footerLicense">Open source under MIT License.</span></p>
<p class="footer-legal"> <p class="footer-legal">
<button type="button" class="btn-text privacy-link" data-i18n="footerPrivacy">Privacy Policy</button> <button type="button" class="btn-text privacy-link" data-i18n="footerPrivacy">Privacy Policy</button>
<span class="footer-separator">·</span> <span class="footer-separator">·</span>