Lade Menüdaten...
/** * UI injection module. * Renders the full Kantine Wrapper HTML skeleton into the current page, * including fonts, icon stylesheet, favicon, and all modal/panel containers. * Must be called before bindEvents() and any state-rendering logic. */ import { langMode } from './state.js'; /** * Injects the full application HTML into the current tab. * Idempotent in conjunction with the __KANTINE_LOADED guard in index.js. */ export function injectUI() { document.title = 'Kantine Weekly Menu'; if (document.querySelectorAll) { document.querySelectorAll('link[rel*="icon"]').forEach(el => el.remove()); } const favicon = document.createElement('link'); favicon.rel = 'icon'; favicon.type = 'image/png'; favicon.href = '{{FAVICON_DATA_URI}}'; document.head.appendChild(favicon); if (!document.querySelector('link[href*="fonts.googleapis.com/css2?family=Inter"]')) { const fontLink = document.createElement('link'); fontLink.rel = 'stylesheet'; fontLink.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'; document.head.appendChild(fontLink); } if (!document.querySelector('link[href*="Material+Icons+Round"]')) { const iconLink = document.createElement('link'); iconLink.rel = 'stylesheet'; iconLink.href = 'https://fonts.googleapis.com/icon?family=Material+Icons+Round'; document.head.appendChild(iconLink); } const htmlContent = `
Lade Menüdaten...