Files
Adminator 1e51ef7def Nachtrag: alle bisher untracked Ordner + hängende Änderungen mit-committen
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/
- 12 code-workspace-Files
- STATUS-*.md
- viele M/D/R-Änderungen an bereits getrackten Files
- .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-08 02:27:02 +02:00

79 lines
2.9 KiB
PHP

<?php
/**
* Kontext-Sub-Nav für Erkundungs-Seiten (Lehrplan / Glossar / Simulationen)
* -------------------------------------------------------------------------
* Zweite Nav-Ebene unter der Standard-Hauptnav (N.5.1 im Entwurf).
*
* Erwartet im eltern-Scope:
* $bp BASE_PATH
* $activeSub 'lehrplan'|'glossar'|'simulationen'
* $showCountryPicker bool (Default: false) — nur Lehrplan braucht den Picker
* $easyActive optional bool — für Easy-Sprache-Pill
*/
if (!isset($bp)) $bp = defined('BASE_PATH') ? BASE_PATH : '';
$activeSub = $activeSub ?? null;
$showCountryPicker = $showCountryPicker ?? false;
$easyActive = $easyActive ?? false;
if (!function_exists('sub_nav_class')) {
function sub_nav_class($key, $current) {
return $key === $current ? ' sub-active' : '';
}
}
?>
<nav class="sub-nav" aria-label="Erkunden">
<span class="sub-label">Erkunden</span>
<a href="<?= $bp ?>/lehrplan" class="sub-tab<?= sub_nav_class('lehrplan', $activeSub) ?>">📋 Lehrplan</a>
<a href="<?= $bp ?>/glossar" class="sub-tab<?= sub_nav_class('glossar', $activeSub) ?>">📚 Glossar</a>
<a href="<?= $bp ?>/simulationen" class="sub-tab<?= sub_nav_class('simulationen', $activeSub) ?>">🎮 Simulationen</a>
<span class="sub-spacer"></span>
<?php if ($easyActive): ?>
<span class="sub-pill sub-pill-easy">🟢 Leichte Sprache</span>
<?php endif; ?>
<?php if ($showCountryPicker): ?>
<span class="sub-country-label">Land:</span>
<?php include __DIR__ . '/country_picker.php'; ?>
<?php endif; ?>
</nav>
<?php if (empty($GLOBALS['__sub_nav_css'])): $GLOBALS['__sub_nav_css'] = true; ?>
<style>
.sub-nav {
background: #f5f3ea; border-bottom: 1px solid rgba(0,0,0,.08);
padding: .5rem 1.5rem; display: flex; align-items: center; gap: .8rem;
font-family: 'Inter', system-ui, sans-serif; font-size: .82rem;
position: sticky; top: 50px; z-index: 90;
}
.sub-nav .sub-label {
font-size: .62rem; color: #8a8a8a; font-weight: 700;
text-transform: uppercase; letter-spacing: .06em;
margin-right: .4rem;
}
.sub-nav .sub-tab {
color: #5a5a5a; font-weight: 600;
padding: .35rem .8rem; border-radius: 6px;
text-decoration: none; transition: background .15s, color .15s;
}
.sub-nav .sub-tab:hover { background: rgba(0,0,0,.04); color: #1f4e5a; }
.sub-nav .sub-tab.sub-active {
color: #1f4e5a; font-weight: 800;
background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.sub-nav .sub-spacer { flex: 1; }
.sub-nav .sub-pill {
padding: .25rem .6rem; border-radius: 6px;
font-size: .72rem; font-weight: 700;
}
.sub-nav .sub-pill-easy { background: #dceadd; color: #5a8a5e; }
.sub-nav .sub-country-label { font-size: .72rem; color: #8a8a8a; }
@media (max-width: 700px) {
.sub-nav {
flex-wrap: wrap; padding: .4rem .8rem; gap: .4rem;
font-size: .76rem; position: static;
}
.sub-nav .sub-tab { padding: .3rem .55rem; }
.sub-nav .sub-spacer { display: none; }
}
</style>
<?php endif; ?>