idk
This commit is contained in:
1 parent
e68d357177
commit
3e3382df57
65 files changed
+1836
-42
No files matched your search
@@ -10,8 +10,10 @@ $page_meta = [
|
||||
'privacidade' => ['Política de Privacidade | FitMe 3070',
|
||||
'Política de privacidade do FitMe 3070 — como recolhemos, usamos e protegemos os teus dados pessoais.'],
|
||||
];
|
||||
[$page_title, $page_desc] = $page_meta[$page] ?? $page_meta[''];
|
||||
$canonical = base_url($page !== '' ? 'home/' . $page : '');
|
||||
// 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>
|
||||
@@ -54,14 +56,16 @@ $canonical = base_url($page !== '' ? 'home/' . $page : '');
|
||||
|
||||
<!-- Open Graph / link previews -->
|
||||
<meta property="og:url" content="<?= $canonical ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<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="<?= base_url('site/assets/img/og-image.jpg') ?>">
|
||||
<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 -->
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="map" id="map">
|
||||
<?= isset($info['google_maps']) ? $info['google_maps'] : ''; ?>
|
||||
<?= clean_map_embed($info['google_maps'] ?? '') ?>
|
||||
</div>
|
||||
@@ -53,6 +53,11 @@ else
|
||||
<!-- Smooth scroll + scroll-spy for one-page layout -->
|
||||
<script>
|
||||
(function() {
|
||||
// This partial is printed by _open.php BEFORE the page sections (#equipa, …)
|
||||
// exist in the DOM, so binding must wait for DOMContentLoaded — otherwise
|
||||
// querySelector('#equipa') returns null, `sections` stays empty, and neither
|
||||
// the smooth-scroll nor the scroll-spy (active nav link) ever bind.
|
||||
function init() {
|
||||
/* ── Eased smooth-scroll helper ──────────────────────────────────────── */
|
||||
function smoothScrollTo(targetEl, duration) {
|
||||
var start = window.scrollY;
|
||||
@@ -149,7 +154,15 @@ else
|
||||
// CrossFit page the list is empty and the PHP-set active pill must stay.
|
||||
if (sections.length > 0) {
|
||||
window.addEventListener('scroll', updateActive, { passive: true });
|
||||
window.addEventListener('resize', updateActive, { passive: true });
|
||||
updateActive();
|
||||
}
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
@@ -45,3 +45,10 @@ if ($ld_hours) $ld['openingHoursSpecification'] = $ld_hours;
|
||||
<script type="application/ld+json">
|
||||
<?= json_encode($ld, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) ?>
|
||||
</script>
|
||||
<?php /* A dynamic page (e.g. an event landing page) can attach its own JSON-LD
|
||||
— such as an Event schema — via this global, set before _open.php runs. */ ?>
|
||||
<?php if (!empty($GLOBALS['_jsonld_extra'])): ?>
|
||||
<script type="application/ld+json">
|
||||
<?= json_encode($GLOBALS['_jsonld_extra'], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) ?>
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
Reference in new issue
Block a user