This commit is contained in:
andre committed 2026-06-12 21:20:23 +01:00
1 parent e68d357177
commit 3e3382df57
65 files changed
+1836 -42

No files matched your search

+24 -3
View File
@@ -10,6 +10,7 @@ $team = site_team($pdo);
$modalidades = site_modalidades($pdo);
$horario = site_horario($pdo);
$whours = site_work_hours($pdo);
$events = site_active_events($pdo); // time-limited events, banner below the hero
// ── Hero section ────────────────────────────────────────────────────────────────
?>
@@ -27,6 +28,26 @@ $whours = site_work_hours($pdo);
<section id="home" class="hero-section set-bg fade-in" style="background-image:url('<?= base_url('site/assets/img/home.jpg') ?>')">
<div class="container">
<div class="hero-text">
<?php /* Eventos a decorrer — destacados no topo do header. Cada um liga
à sua landing page em /evento/<slug>. */ ?>
<?php if ($events): ?>
<div class="hero-events">
<?php foreach ($events as $ev):
$ac = $ev['cor'] !== '' ? $ev['cor'] : '#C2D500';
$ev_img = $ev['hero_image'] !== '' ? base_url('uploads/events/' . rawurlencode($ev['hero_image'])) : '';
?>
<a class="hero-event<?= $ev_img ? ' has-img' : '' ?>" href="<?= base_url('evento/' . rawurlencode($ev['slug'])) ?>"
style="--ev-accent:<?= htmlspecialchars($ac, ENT_QUOTES) ?><?= $ev_img ? ';--ev-img:url(\'' . htmlspecialchars($ev_img, ENT_QUOTES) . '\')' : '' ?>">
<span class="hero-event-badge"><span class="event-live-dot"></span><i class="fas fa-bolt"></i> Evento</span>
<span class="hero-event-text">
<strong class="hero-event-title"><?= htmlspecialchars($ev['title']) ?></strong>
<?php if ($ev['summary'] !== ''): ?><span class="hero-event-sub"><?= htmlspecialchars($ev['summary']) ?></span><?php endif; ?>
</span>
<span class="hero-event-go">Saber mais <i class="fas fa-arrow-right"></i></span>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<span class="hero-brand">FitMe 3070</span>
<h1>Ginásio, Box, Aulas<br><span>&amp; Acompanhamento</span></h1>
<div class="hero-cta-row">
@@ -139,8 +160,8 @@ if ($modalidades):
</div>
<h4><?= htmlspecialchars((string) $d['nome']) ?></h4>
<?php if ($desc !== ''): ?>
<?php /* descricao is admin-authored rich text — render its HTML, don't escape it */ ?>
<div class="mod-tooltip" role="tooltip"><span><?= $desc ?></span></div>
<?php /* descricao is admin-authored rich text — sanitised allowlist HTML */ ?>
<div class="mod-tooltip" role="tooltip"><span><?= clean_richtext($desc) ?></span></div>
<?php endif; ?>
</div>
<?php endforeach; ?>
@@ -443,7 +464,7 @@ $session = session();
if (strpos($maps_embed, 'loading=') === false) {
$maps_embed = str_replace('<iframe ', '<iframe loading="lazy" ', $maps_embed);
}
echo $maps_embed;
echo clean_map_embed($maps_embed);
?>
</div>
</div>