feat(site): root opens the main gym; other gyms as navbar buttons
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aa55d44406
commit
716eec9f6d
4 files changed
+45
-4
No files matched your search
@@ -47,6 +47,22 @@ $logo_dims = svg_img_dims_attr(dirname(__DIR__, 2) . '/' . $logo_rel);
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php
|
||||
// Other published gyms: the main gym opens first, the rest are
|
||||
// highlighted buttons at the right end of the bar.
|
||||
$other_gyms = [];
|
||||
if (!empty($GLOBALS['pdo'])) {
|
||||
foreach (db_gyms_published($GLOBALS['pdo']) as $g) {
|
||||
if ((int) $g['id'] !== (int) current_gym()['id']) $other_gyms[] = $g;
|
||||
}
|
||||
}
|
||||
if ($other_gyms): ?>
|
||||
<div class="gym-switch d-flex flex-wrap gap-2 ms-lg-auto py-2 py-lg-0 pe-lg-3">
|
||||
<?php foreach ($other_gyms as $g): ?>
|
||||
<a class="gym-switch-btn" href="<?= htmlspecialchars(gym_url($g)) ?>"><?= htmlspecialchars($g['name']) ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
Reference in new issue
Block a user