1e51ef7def
- 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>
74 lines
3.2 KiB
PHP
74 lines
3.2 KiB
PHP
<?php
|
|
/**
|
|
* Standard-Hauptnav für öffentliche Seiten
|
|
* ----------------------------------------
|
|
* Übereinstimmend mit App/index.html Nav (Variante B aus entwurf N.4.3).
|
|
*
|
|
* Erwartet im eltern-Scope:
|
|
* $bp BASE_PATH (Default-Fallback: definierte BASE_PATH oder '')
|
|
* $activeMain optional: 'sims'|'lehrperson'|'lehrplan'|'forschung'|'handbuch'|'kontakt'
|
|
*
|
|
* CSS wird nur einmal pro Request ausgegeben (Guard via $GLOBALS).
|
|
*/
|
|
if (!isset($bp)) $bp = defined('BASE_PATH') ? BASE_PATH : '';
|
|
$activeMain = $activeMain ?? null;
|
|
|
|
if (!function_exists('pub_nav_class')) {
|
|
function pub_nav_class($key, $current) {
|
|
return $key === $current ? ' class="pub-active"' : '';
|
|
}
|
|
}
|
|
?>
|
|
<nav class="pub-nav" aria-label="Hauptnavigation">
|
|
<a href="<?= $bp ?>/index.html" class="pub-brand" aria-label="GeoGraSim Startseite">
|
|
<img src="<?= $bp ?>/assets/img/geograsim_t.svg" alt="GeoGraSim">
|
|
</a>
|
|
<div class="pub-links">
|
|
<a href="<?= $bp ?>/index.html#sims"<?= pub_nav_class('sims', $activeMain) ?>>Simulationen</a>
|
|
<a href="<?= $bp ?>/index.html#fuer-lehrkraefte"<?= pub_nav_class('lehrperson', $activeMain) ?>>Lehrperson</a>
|
|
<a href="<?= $bp ?>/lehrplan"<?= pub_nav_class('lehrplan', $activeMain) ?>>Lehrplan</a>
|
|
<a href="<?= $bp ?>/forschung/"<?= pub_nav_class('forschung', $activeMain) ?>>Forschung</a>
|
|
<a href="<?= $bp ?>/handbuch.html"<?= pub_nav_class('handbuch', $activeMain) ?>>Handbuch</a>
|
|
<a href="<?= $bp ?>/kontakt.html"<?= pub_nav_class('kontakt', $activeMain) ?>>Kontakt</a>
|
|
<a href="<?= $bp ?>/login.html" class="pub-btn-anmelden">Anmelden</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<?php if (empty($GLOBALS['__pub_nav_css'])): $GLOBALS['__pub_nav_css'] = true; ?>
|
|
<style>
|
|
/* Standard-Hauptnav — Layout 1:1 wie auf App/index.html (Landingpage):
|
|
Logo links, Menü + Anmelden-Button rechts gebündelt via space-between. */
|
|
.pub-nav {
|
|
background: rgba(247,246,243,0.95); backdrop-filter: blur(20px);
|
|
border-bottom: 1px solid rgba(0,0,0,.04);
|
|
padding: .7rem 2rem; display: flex; justify-content: space-between; align-items: center;
|
|
font-family: 'Inter', system-ui, sans-serif; font-size: .86rem;
|
|
position: sticky; top: 0; z-index: 100;
|
|
}
|
|
.pub-nav .pub-brand { display: flex; align-items: center; text-decoration: none; }
|
|
.pub-nav .pub-brand img { height: 38px; display: block; }
|
|
.pub-nav .pub-links { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
|
|
.pub-nav .pub-links a {
|
|
color: #5a5a5a; font-weight: 500; text-decoration: none;
|
|
padding: .4rem .8rem; border-radius: 8px; font-size: .82rem;
|
|
transition: all .2s; border: none;
|
|
}
|
|
.pub-nav .pub-links a:hover { background: rgba(0,0,0,.04); color: #1f4e5a; }
|
|
.pub-nav .pub-links a.pub-active {
|
|
color: #1f4e5a; font-weight: 800; background: rgba(74,124,138,.12);
|
|
}
|
|
.pub-nav .pub-btn-anmelden {
|
|
padding: .45rem 1.1rem; background: #4a7c8a; color: #fff;
|
|
border-radius: 8px; font-weight: 700; font-size: .82rem;
|
|
text-decoration: none; transition: background .2s;
|
|
margin-left: .4rem;
|
|
}
|
|
.pub-nav .pub-btn-anmelden:hover { background: #1f4e5a; color: #fff; }
|
|
@media (max-width: 700px) {
|
|
.pub-nav { padding: .55rem 1rem; }
|
|
.pub-nav .pub-links { gap: 0; }
|
|
.pub-nav .pub-links a { padding: .35rem .55rem; font-size: .78rem; }
|
|
}
|
|
</style>
|
|
<?php endif; ?>
|