/* global React, ReactDOM */ const { useState, useEffect, useRef, Fragment } = React; // ============================== // ROUTER // ============================== const ROUTES = [ { id: 'home', label: 'Start', path: '#/' }, { id: 'about', label: 'Über uns', path: '#/ueber-uns', submenu: [ { id: 'about', label: 'Die 4its GmbH', desc: 'Wer wir sind', path: '#/ueber-uns' }, { id: 'history', label: 'Unsere Geschichte', desc: 'Seit 2003', path: '#/geschichte' }, ] }, { id: 'dienstleistung', label: 'Dienstleistung', path: '#/dienstleistung' }, { id: 'produkte', label: 'Produkte', path: '#/produkte' }, { id: 'beratung', label: 'Beratung', path: '#/beratung' }, { id: 'rechenzentrum', label: 'Rechenzentrum', path: '#/rechenzentrum' }, { id: 'loesungen', label: 'Lösungen', path: '#/loesungen', submenu: [ { id: 'ungana-cloud', label: 'UNGANA Cloud', desc: 'Cloud Computing', path: '#/loesungen/ungana-cloud' }, { id: 'ungana-exchange', label: 'UNGANA Exchange', desc: 'Mail & Kollaboration', path: '#/loesungen/ungana-exchange' }, ] }, { id: 'blog', label: 'Blog', path: '#/blog' }, { id: 'jobs', label: 'Jobs', path: '#/jobs' }, { id: 'contact', label: 'Kontakt', path: '#/kontakt', submenu: [ { id: 'contact-form', label: 'Kontakt', desc: 'Nachricht senden', path: '#/kontakt' }, { id: 'contact-route', label: 'Anfahrt', desc: 'Burchardstraße 22', path: '#/anfahrt' }, { id: 'contact-tv', label: 'Fernwartung', desc: 'Teamviewer', path: '#/fernwartung' }, ] }, ]; function useHashRoute() { const [hash, setHash] = useState(window.location.hash || '#/'); useEffect(() => { const onHash = () => { setHash(window.location.hash || '#/'); window.scrollTo({ top: 0, behavior: 'instant' }); }; window.addEventListener('hashchange', onHash); return () => window.removeEventListener('hashchange', onHash); }, []); return hash; } function navigate(path) { window.location.hash = path.replace(/^#/, ''); } // ============================== // ICONS // ============================== const Icon = ({ d, size = 18 }) => ( ); const ArrowRight = ({ size = 14 }) => ( ); const Sun = () => (); const Moon = () => (); const ICONS = { service: "M12 2l2 4 4 .6-3 2.8.7 4.1L12 11.6 8.3 13.5 9 9.4 6 6.6l4-.6L12 2z", beratung: "M8 10h8M8 14h5M21 12a9 9 0 0 1-14 7.6L3 21l1.4-4A9 9 0 1 1 21 12z", outsourcing: "M4 7h16M4 12h16M4 17h10", security: "M12 2l8 4v6c0 5-3.5 9-8 10-4.5-1-8-5-8-10V6l8-4z", cloud: "M7 18a5 5 0 1 1 .7-9.9 6 6 0 0 1 11.6 2A4 4 0 0 1 18 18H7z", hosting: "M3 5h18v5H3V5zM3 14h18v5H3v-5zM7 7.5h.01M7 16.5h.01", }; // ============================== // LOGO MARK (SVG rendition of 4its cube) // ============================== const LogoMark = ({ size = 28 }) => ( {/* 3x3 grid of split tiles */} {[ [0,0,'#E89B3C','#F0F2F5'],[1,0,'#D1D6DE','#E7EAEF'],[2,0,'#E7EAEF','#D1D6DE'], [0,1,'#7FB9DC','#3FA4C9'],[1,1,'#3FA4C9','#5A6B89'],[2,1,'#14284B','#E7EAEF'], [0,2,'#D1D6DE','#8FCB7F'],[1,2,'#6FB85A','#E7EAEF'],[2,2,'#E7EAEF','#D1D6DE'], ].map(([x,y,c1,c2], i) => ( ))} ); // ============================== // NAV // ============================== function Nav({ route, theme, setTheme, mobileOpen, setMobileOpen }) { const activeId = routeIdFromHash(route); return ( <>
{ROUTES.map((r, i) => ( setMobileOpen(false)}> 0{i+1}{r.label} ))}
setMobileOpen(false)}>Kontakt aufnehmen +49 40 561947 0
); } function routeIdFromHash(hash) { const p = hash.replace('#', ''); if (p === '/' || p === '') return 'home'; if (p.startsWith('/ueber-uns') || p.startsWith('/geschichte')) return 'about'; if (p.startsWith('/kontakt') || p.startsWith('/anfahrt') || p.startsWith('/fernwartung')) return 'contact'; if (p.startsWith('/dienstleistung')) return 'dienstleistung'; if (p.startsWith('/produkte')) return 'produkte'; if (p.startsWith('/beratung')) return 'beratung'; if (p.startsWith('/rechenzentrum')) return 'rechenzentrum'; if (p.startsWith('/loesungen')) return 'loesungen'; if (p.startsWith('/blog')) return 'blog'; if (p.startsWith('/jobs')) return 'jobs'; return 'home'; } // ============================== // FOOTER // ============================== function Footer() { return ( ); } // ============================== // HERO TILE GRID (logo-inspired) // ============================== function HeroMark() { // mirrors the 4ITS block mark — 3x3 with diagonal-split tiles const layout = [ ['a','g','g'], ['b','d','c'], ['g','f','g'], ]; return ( ); } // shared export Object.assign(window, { useState, useEffect, useRef, Fragment, ROUTES, useHashRoute, navigate, Icon, ArrowRight, Sun, Moon, ICONS, LogoMark, Nav, routeIdFromHash, Footer, HeroMark });