Some checks failed
Build and Push Docker Images (Trusted) / build-and-push (., docker/caddy/Dockerfile, caddy) (push) Has been cancelled
Build and Push Docker Images (Trusted) / build-and-push (., docker/l4-port-manager/Dockerfile, l4-port-manager) (push) Has been cancelled
Build and Push Docker Images (Trusted) / build-and-push (., docker/web/Dockerfile, web) (push) Has been cancelled
Tests / test (push) Has been cancelled
25 lines
564 B
JavaScript
Executable File
25 lines
564 B
JavaScript
Executable File
/* global document */
|
|
|
|
const yearEl = document.getElementById('year');
|
|
if (yearEl) {
|
|
yearEl.textContent = new Date().getFullYear();
|
|
}
|
|
|
|
const navLinks = document.querySelectorAll('a[href^="#"]');
|
|
navLinks.forEach((link) => {
|
|
link.addEventListener('click', (event) => {
|
|
const targetId = link.getAttribute('href');
|
|
if (!targetId || targetId === '#') {
|
|
return;
|
|
}
|
|
|
|
const target = document.querySelector(targetId);
|
|
if (!target) {
|
|
return;
|
|
}
|
|
|
|
event.preventDefault();
|
|
target.scrollIntoView({ behavior: 'smooth' });
|
|
});
|
|
});
|