Fecha os itens 3.2.2, 3.3.1, 4.6, 5.2, 5.6, 5.7 e 7.4 do relatório de auditoria de 2026-09-24: escapa saídas de site_img_url()/canonical, valida identificadores de coluna em db_info_save(), troca 100vh por 100dvh, remove a última cor solta, encurta a transição para ~150ms, acrescenta decoding=async/fetchpriority=high nas imagens da home, e documenta as versões vendorizadas em ASSETS.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
53 lines
3.0 KiB
PHP
53 lines
3.0 KiB
PHP
<?php
|
|
// Root page when more than one gym is published (site/index.php includes this
|
|
// instead of redirecting): pick a gym. Self-contained — no gym is "current"
|
|
// here, so it doesn't go through _open.php. Expects $pdo and $published.
|
|
$gyms = $published ?? db_gyms_published($pdo);
|
|
$brand = 'FitMe';
|
|
?><!doctype html>
|
|
<html lang="pt">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title><?= htmlspecialchars($brand) ?> — Escolhe o teu ginásio</title>
|
|
<meta name="description" content="<?= htmlspecialchars($brand) ?>: <?= htmlspecialchars(implode(', ', array_map(fn($g) => $g['name'] . ($g['locality'] !== '' ? ' (' . $g['locality'] . ')' : ''), $gyms))) ?>.">
|
|
<link rel="canonical" href="<?= htmlspecialchars(base_url()) ?>">
|
|
<?php if (seo_noindex()): ?><meta name="robots" content="noindex, nofollow"><?php endif; ?>
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700,900&display=swap" rel="stylesheet">
|
|
<link rel="icon" type="image/svg+xml" href="<?= base_url('site/assets/img/logos/logo_black.svg') ?>">
|
|
<style>
|
|
:root { --accent:#C2D500; --dark:#0B0B0D; --dark2:#16181A; --ash:#B8B9BE; }
|
|
* { box-sizing: border-box; }
|
|
body { margin:0; min-height:100svh; font-family:Roboto,system-ui,sans-serif; color:#fff;
|
|
background:#141517 url('<?= base_url('site/assets/img/home.jpg') ?>') center/cover fixed; }
|
|
.wrap { min-height:100svh; background:rgba(11,11,13,.82); display:flex; flex-direction:column;
|
|
align-items:center; justify-content:center; padding:48px 16px; gap:36px; }
|
|
h1 { margin:0; font-size:clamp(1.8rem,4vw,2.6rem); font-weight:900; text-transform:uppercase; text-align:center; }
|
|
h1 span { color:var(--accent); }
|
|
.gyms { display:flex; flex-wrap:wrap; gap:18px; justify-content:center; width:100%; max-width:900px; }
|
|
a.gym { flex:1 1 260px; max-width:320px; display:block; padding:28px 24px; border-radius:8px; text-decoration:none;
|
|
color:#fff; background:var(--dark2); border:2px solid rgba(255,255,255,.08);
|
|
transition:border-color .25s, transform .25s; }
|
|
a.gym:hover, a.gym:focus-visible { border-color:var(--accent); transform:translateY(-4px); outline:none; }
|
|
.gym strong { display:block; font-size:1.4rem; font-weight:900; text-transform:uppercase; }
|
|
.gym span { color:var(--ash); }
|
|
.gym em { display:inline-block; margin-top:14px; font-style:normal; font-weight:700; color:var(--accent); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main class="wrap">
|
|
<img src="<?= base_url('site/assets/img/logos/logo_black.svg') ?>" alt="<?= htmlspecialchars($brand) ?>" style="width:170px;filter:invert(1)" decoding="async">
|
|
<h1>Escolhe o teu <span>ginásio</span></h1>
|
|
<div class="gyms">
|
|
<?php foreach ($gyms as $g): ?>
|
|
<a class="gym" href="<?= htmlspecialchars(gym_url($g)) ?>">
|
|
<strong><?= htmlspecialchars($g['name']) ?></strong>
|
|
<?php if ($g['locality'] !== ''): ?><span><?= htmlspecialchars($g['locality']) ?></span><?php endif; ?>
|
|
<br><em>Entrar →</em>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|