Contraste (auditoria 4.8, WCAG AA): - Novo token --fitme-accent-ink #667000 (≈5.1:1 sobre #F7F8FA), aplicado aos 7 usos de texto que estavam em --fitme-accent-dark (#A6B600 ≈2.1:1 em fundo claro). O --fitme-accent-dark mantém-se para fundos de botões em hover/active (onde tem texto escuro por cima — escurecê-lo quebraria esses estados). - .section-eyebrow passa a usar o ink green nas secções claras (oferta, galeria, modalidades, horário, workhours); as secções escuras mantêm o verde vivo. Fontes (CSS "Google Fonts ainda carregado do CDN"): - Roboto (variável, latin, 43 KB woff2) em site/assets/fonts/roboto/. - @font-face 100-900 em style.css; removidos os <link> para fonts.googleapis.com em include.php e gym_chooser.php. Ficam apenas os pedidos à API do Places (legítimos, server-side). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
91 lines
4.9 KiB
PHP
91 lines
4.9 KiB
PHP
<?php
|
||
// Per-page metadata, keyed by $current_uri_2. The canonical URL comes from
|
||
// base_url(), which matches the https + non-www redirect in .htaccess.
|
||
$page = $current_uri_2 ?? '';
|
||
$page_meta = [
|
||
'' => ['FitMe 3070 — Ginásio & CrossFit em Mira',
|
||
'Ginásio em Mira (Lagoa) com musculação, CrossFit, aulas de grupo, personal trainers, nutrição e fisioterapia. Inscreve-te já no FitMe 3070!'],
|
||
'crossfit' => ['CrossFit 3070 — Box de CrossFit em Mira | FitMe 3070',
|
||
'Box de CrossFit em Mira (Lagoa). Aulas para todos os níveis com treinadores certificados. Marca a tua aula experimental no CrossFit 3070!'],
|
||
'privacidade' => ['Política de Privacidade | FitMe 3070',
|
||
'Política de privacidade do FitMe 3070 — como recolhemos, usamos e protegemos os teus dados pessoais.'],
|
||
'termos' => ['Termos e Condições | FitMe 3070',
|
||
'Termos e condições de utilização do website do FitMe 3070.'],
|
||
];
|
||
// The gym's homepage uses the gym's own SEO title/description when set
|
||
// (Gestão → Ginásios); a new gym without them gets a generic one from its name
|
||
// and locality rather than the 3070 texts above.
|
||
$gym_meta = current_gym();
|
||
if ($page === '' && ($gym_meta['seo_title'] ?? '') !== '') {
|
||
$page_meta[''] = [$gym_meta['seo_title'], ($gym_meta['seo_description'] ?? '') !== '' ? $gym_meta['seo_description'] : $page_meta[''][1]];
|
||
} elseif ($page === '' && (int) $gym_meta['id'] !== 1) {
|
||
$loc = ($gym_meta['locality'] ?? '') !== '' ? ' em ' . $gym_meta['locality'] : '';
|
||
$page_meta[''] = [$gym_meta['name'] . ' — Ginásio' . $loc,
|
||
($gym_meta['seo_description'] ?? '') !== '' ? $gym_meta['seo_description'] : 'Ginásio ' . $gym_meta['name'] . $loc . ': treino, aulas de grupo e acompanhamento.'];
|
||
}
|
||
// A dynamic page (e.g. an event landing page) can set its own title/description
|
||
// and canonical via these globals before requiring _open.php.
|
||
[$page_title, $page_desc] = $GLOBALS['_page_meta_override'] ?? $page_meta[$page] ?? $page_meta[''];
|
||
$canonical = $GLOBALS['_canonical_override'] ?? match ($page) {
|
||
'' => gym_url($gym_meta),
|
||
'crossfit' => gym_url($gym_meta, 'crossfit'),
|
||
default => base_url('home/' . $page),
|
||
};
|
||
?><!doctype html>
|
||
<html lang="pt">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
<meta name="description" content="<?= htmlspecialchars($page_desc) ?>">
|
||
<meta name="keywords" content="fitness, ginásio, exercício, personal trainer, crossfit, box, aveiro, mira">
|
||
<meta name="author" content="FitMe 3070">
|
||
<meta name="theme-color" content="#C2D500">
|
||
<title><?= htmlspecialchars($page_title) ?></title>
|
||
<link rel="canonical" href="<?= htmlspecialchars($canonical) ?>">
|
||
<?php if (seo_noindex()): /* staging copies (e.g. fitme.andmore.pt) must not compete with the real domain */ ?>
|
||
<meta name="robots" content="noindex, nofollow">
|
||
<?php endif; ?>
|
||
|
||
<!-- Preconnect to external origins -->
|
||
<link rel="dns-prefetch" href="https://forms.zohopublic.eu">
|
||
<?php if (($current_uri_2 ?? '') === ''): ?>
|
||
<!-- Homepage hero is the LCP image — start fetching it before the CSS/JS -->
|
||
<link rel="preload" as="image" fetchpriority="high" href="<?= htmlspecialchars(base_url(($gym_meta['hero_image'] ?? '') !== '' ? $gym_meta['hero_image'] : 'site/assets/img/home.jpg')) ?>">
|
||
<?php endif; ?>
|
||
|
||
<!-- Fonts (Roboto self-hosted — see @font-face in style.css) -->
|
||
|
||
<!-- Vendor: Bootstrap 5.3.3 -->
|
||
<?= link_tag('assets/vendor/bootstrap5/css/bootstrap.min.css') ?>
|
||
|
||
<!-- Vendor: Font Awesome 5 -->
|
||
<?= link_tag('site/assets/fonts/fontawesome/css/all.css') ?>
|
||
|
||
|
||
<!-- App styles (Bootstrap overrides) -->
|
||
<?= link_tag('site/assets/css/style.css') ?>
|
||
|
||
<!-- Favicon -->
|
||
<link rel="icon" type="image/svg+xml" href="<?= base_url('site/assets/img/logos/logo_black.svg') ?>">
|
||
<link rel="apple-touch-icon" sizes="180x180" href="<?= base_url('site/assets/img/logos/apple-touch-icon.png') ?>">
|
||
|
||
<!-- Open Graph / link previews -->
|
||
<meta property="og:url" content="<?= htmlspecialchars($canonical) ?>">
|
||
<meta property="og:type" content="<?= htmlspecialchars($GLOBALS['_og_type_override'] ?? 'website') ?>">
|
||
<meta property="og:site_name" content="FitMe 3070">
|
||
<meta property="og:locale" content="pt_PT">
|
||
<meta property="og:title" content="<?= htmlspecialchars($page_title) ?>">
|
||
<meta property="og:description" content="<?= htmlspecialchars($page_desc) ?>">
|
||
<meta property="og:image" content="<?= htmlspecialchars($GLOBALS['_og_image_override'] ?? base_url('site/assets/img/og-image.jpg')) ?>">
|
||
<?php if (empty($GLOBALS['_og_image_override'])): /* default banner is a known 1200×630; a per-page image isn't, so skip the dimension hints */ ?>
|
||
<meta property="og:image:width" content="1200">
|
||
<meta property="og:image:height" content="630">
|
||
<?php endif; ?>
|
||
<meta name="twitter:card" content="summary_large_image">
|
||
|
||
<!-- Structured data -->
|
||
<?= view('seo') ?>
|
||
</head>
|
||
<body>
|
||
<a href="#conteudo" class="skip-link">Saltar para o conteúdo</a>
|