Navigation

Dropdown-Navigation mit Mobile-Support für die Campus-Anwendung.

CSS-Datei/public/css/nav.css
JavaScript/public/js/app.js
Layout/src/View/layout.php
Mobile Breakpoint768px

Struktur

Die Navigation ist in drei Hauptbereiche gegliedert:

BereichZielgruppeInhalte
AnwendungenEndanwenderKI-Chat, Content Studio, Semantic Explorer, Nextcloud
EntwicklungEntwicklerTasks, Protokoll, Contracts, System Explorer
RessourcenAlleDokumentation

CSS-Architektur

Die Navigation verwendet CSS-Variablen gemäß CSS Contract v1.0:

:root {
    --nav-bg: #2c3e50;
    --nav-text: #fff;
    --nav-hover-bg: rgba(255, 255, 255, 0.1);
    --nav-dropdown-bg: #fff;
    --nav-dropdown-text: #333;
    --nav-dropdown-hover-bg: #f8f9fa;
    --nav-dropdown-border: #eee;
    --nav-focus-color: #3498db;
}

Accessibility

Implementierte WCAG 2.1 AA Features:

FeatureUmsetzungWCAG
Focus-States2px solid outline auf allen interaktiven Elementen2.4.7
KontrastWeiß auf #2c3e50 = 11.7:11.4.3
ARIAaria-label, aria-expanded auf Toggle4.1.2
KeyboardTab-Navigation, Enter/Space für Dropdowns2.1.1

Mobile Navigation

Bei Viewport ≤ 768px:

JavaScript

// Mobile Toggle
navToggle.addEventListener("click", function () {
    const isOpen = navItems.classList.toggle("open");
    navToggle.setAttribute("aria-expanded", isOpen);
});

// Dropdown Toggle (Mobile)
if (window.innerWidth <= 768) {
    dropdown.classList.toggle("active");
}

Dateien

DateiZweck
/public/css/nav.cssAlle Navigation-Styles (dediziert)
/public/js/app.jsMobile Toggle + Dropdown-Logik
/src/View/layout.phpHTML-Struktur der Navigation

HTML-Struktur

<nav class="main-nav">
    <a href="/" class="nav-brand">Campus</a>
    
    <button class="nav-toggle" aria-label="Navigation">
        <span class="nav-toggle-icon"></span>
    </button>
    
    <div class="nav-items">
        <div class="nav-dropdown">
            <button class="nav-dropdown-btn">Anwendungen</button>
            <div class="nav-dropdown-content">
                <a href="/chat">KI-Chat</a>
                ...
            </div>
        </div>
    </div>
</nav>

Änderungshistorie

DatumÄnderung
2025-12-20Initial: Dropdown-Navigation mit Mobile-Support erstellt
2025-12-20nav.css als dedizierte Datei ausgelagert
2025-12-20/explorer Route entfernt (redundant)
]]>