/**
* Initializes the page by loading the necessary components.
*
* @returns {void}
*/
function init() {
loadComponents();
}
/**
* Loads all necessary components into the page.
*
* Currently, this function only loads the header and navbar components.
* @returns {void}
*/
function loadComponents() {
loadHeader();
loadNavbar();
}
/**
* Loads the header component into the element with the id "header".
* If no element with that id exists, this function does nothing.
* @returns {void}
*/
function loadHeader() {
const header = document.getElementById("header");
if (!header) return;
header.innerHTML = getHeaderTemplate();
}
/**
* Loads the navbar component into the element with the id "navbar".
* If no element with that id exists, this function does nothing.
*
* @returns {void}
*/
function loadNavbar() {
const navbar = document.getElementById("navbar");
if (!navbar) return;
navbar.innerHTML = getNavbarTemplate();
}