76 lines
3.9 KiB
PHP
76 lines
3.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.'],
|
||
];
|
||
// 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'] ?? base_url($page !== '' ? '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="<?= $canonical ?>">
|
||
|
||
<!-- Preconnect to external origins -->
|
||
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
|
||
<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" href="<?= base_url('site/assets/img/home.jpg') ?>">
|
||
<?php endif; ?>
|
||
|
||
<!-- Fonts -->
|
||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700,900&display=swap" rel="stylesheet">
|
||
|
||
<!-- Vendor: Bootstrap 4.3.1 -->
|
||
<?= link_tag('assets/vendor/bootstrap/css/bootstrap.min.css') ?>
|
||
|
||
<!-- Vendor: Font Awesome 5 -->
|
||
<?= link_tag('site/assets/fonts/fontawesome/css/all.css') ?>
|
||
|
||
<!-- Vendor: Splide (gallery slider) — load BEFORE app styles so style.css wins -->
|
||
<link rel="stylesheet" href="<?= base_url('site/assets/js/splide/dist/css/splide.min.css') ?>">
|
||
<link rel="stylesheet" href="<?= base_url('site/assets/js/splide/dist/css/themes/splide-sea-green.min.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="<?= $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="#home" class="skip-link">Saltar para o conteúdo</a>
|