2025-12-23 17:29:27 +01:00
|
|
|
import { headerToggle, headerScrollVisibility } from './header.js';
|
|
|
|
|
|
|
|
|
|
// TEMP, with includeHTML() --------------------------------------
|
2025-12-16 18:00:01 +01:00
|
|
|
|
2025-12-19 12:33:59 +01:00
|
|
|
window.onload = async function () {
|
2025-12-23 17:29:27 +01:00
|
|
|
await runIncludeHTML();
|
|
|
|
|
initAfterLoad();
|
2025-12-16 18:00:01 +01:00
|
|
|
};
|
|
|
|
|
|
2025-12-19 12:33:59 +01:00
|
|
|
function runIncludeHTML() {
|
|
|
|
|
if (typeof includeHTML === "function") {
|
|
|
|
|
const result = includeHTML();
|
|
|
|
|
|
|
|
|
|
if (result instanceof Promise) {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2025-12-23 17:29:27 +01:00
|
|
|
/// INIT --------------------------------------------------------
|
2025-12-19 12:33:59 +01:00
|
|
|
|
|
|
|
|
// Note: une fois que IncludeHTML() est supprimé, on peut supprimer tout le temp au dessus
|
|
|
|
|
// remplacer `function initAfterLoad()` par ↓
|
|
|
|
|
// window.onload = async function () {
|
|
|
|
|
|
|
|
|
|
function initAfterLoad() {
|
|
|
|
|
headerToggle();
|
2025-12-23 17:29:27 +01:00
|
|
|
headerScrollVisibility();
|
2025-12-19 12:33:59 +01:00
|
|
|
}
|