diff --git a/CLAUDE.md b/CLAUDE.md index 56fc43b..c1568d6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -81,6 +81,10 @@ backoffice has an "a editar" gym switcher (`admin_gym_id()` / `admin_gym()` in `config/functions_gyms.php`). `/` and `/home` 301 to the default gym (`is_default`); the other published gyms appear as highlighted buttons (`.gym-switch-btn`) at the right end of the public navbar (`site/includes/navbar.php`). `site/gym_chooser.php` is no longer used. Each gym has a brand colour (`gyms.brand_color`, `#RRGGBB`, migration `migration_20261013_gym_brand_color.sql`; gym 1 = green `#C2D500`, gym 2 = red): set in Gestão → Ginásios, emitted as `:root` overrides by `gym_brand_css()` in `site/includes/include.php`. New components must use `--fitme-accent*` / `--fitme-on-accent`, never a hard-coded colour; the CrossFit nav pill follows the brand colour too. The public navbar's bottom edge is an always-on, slow (14s) sweep in the brand colour (`.header-section::before/::after`, `nav-sweep`, static with reduced motion). On the home page and the CrossFit page (`$nav_center_logo` set in `site/index.php` / `site/crossfit.php`, shared by `_open.php`; the CrossFit video header no longer prints its own logo, only a `visually-hidden` h1) the header starts taller (desktop >= 992px) with a second, big copy of the logo centred (fixed 52px height, so tall logos like the CrossFit one clear the links) (`.navbar-brand-hero`, `aria-hidden`); once `scrollY >= 40` (script in `navbar.php` toggles `.is-top`) the bar shrinks, the big logo fades out and the 150px left logo fades in (opacity crossfade, no movement). The hero gets `padding-top: 120px` on desktop so its event card clears the tall bar. On desktop the brand is absolute at the left and the links are centred on the full bar width; nav padding and logo width live in CSS, not inline. The other-gym buttons (`.gym-switch`) sit in the **match head**, a glimpse into the other site: painted in the first other gym's brand (`navbar.php` puts `gym_brand_vars()` of `$other_gyms[0]` on `.gym-switch`), a 5px strip in its accent on the slash, the face a shade darker (`--fitme-accent-dark` to 82% of it mixed with black) with a shadow inside the cut so the strip reads, and its logo in that gym's on-accent ink (`brightness(0)`, plus `invert(1)` with `.gym-switch--light-ink` when the on-accent is white). Paint is shared; geometry per breakpoint: desktop = absolute block at the right end of the bar (full height, width follows its buttons), left side cut on the brand slash (22px); below 992px = a full-width band across the bottom of the open menu, top edge slashed (18px). 992-1199px: links shrink (`.8125rem`, `--bs-navbar-nav-link-padding-x: .35rem`) so the 3070 menu clears the logo and head. Menu links are `.875rem` bold. Below 992px the open menu fills the screen under the bar (absolute, `100dvh - var(--nav-h)`, `--nav-h` = the header's real height, set by the `navbar.php` script, links/buttons centred, opacity fade; not `position:fixed` because the header's backdrop-filter is its containing block). The bar is liquid glass in Chromium: `backdrop-filter: url(#nav-glass) blur(6px) saturate(180%)` (`#nav-glass` in `include.php`: blurred low-frequency `feTurbulence` -> `feDisplacementMap`, bends the page behind it), gated by `@supports (-webkit-app-region: drag)` (Chromium-only property); Safari/Firefox keep the plain blur. **Brand slash template:** the cut corners of the "in" box are one rule in `style.css` ("Brand slash (template)"): `class="fx-slash"` (both ends) or `fx-slash-start` (left only), size via `--slash` (default 4px); pseudo-elements are added to that rule's selector list. Used by the nav and section-title underlines and the CrossFit pill (`--slash: 8px`, no radius); never paste the polygon again. The hero text has no glow, only a tight `0 1px 2px` shadow (h1, `.hero-brand`, `.hero-tagline`) and the hero frosted-band blur (`.hero-section .container::before`) is at opacity .8. The hero subtitle (`.hero-text h1 span`, gym `hero_subtitle`) is a block strapline at `.42em` of the h1, weight 600, tracked out. The hero event card's border is solid `--ev-accent`, the same colour as its button (button text stays `--fitme-on-accent`). Logos (`.navbar-brand img`, `.gym-switch-logo`) get the same `#pt-noise` grain filter as h1/h2, and `.hero-event-go`, `.cta-btn`, `.btn-primary` joined the `--noise` button list. Section-title underlines (`.section-title.deco h2:after`) use the same slashed 4px bar as the nav underline. The hero event button text uses `--fitme-on-accent` (white on red). The nav underline (`.nav-link:after`) is a 4px bar 3px under the text with slashed ends (`clip-path`, like the "in" box of the FitMe in logo). The hero event card (`.hero-event`) is square (no radius on card, badge or button), taller (88px min) and has a defocus gradient: `::after` is a `backdrop-filter: blur()` layer masked left->right, sharp on the left and most blurred on the right; the card itself must not get filter/backdrop-filter/opacity/mask or the blur stops reaching the hero photo. Each gym can have a `logo` (same migration, plus `migration_20261026_gym_logo.sql`: the column was added to the 2026-10-13 file after it had already run on dev, so dev had no `logo` column until 2026-10-26 — never edit a migration that has run, add a new one); the header image and the logo are uploaded in Gestão → Ginásios (`gyms_save_image()` → `uploads/gyms/`, validated by content, SVG through `svg_is_safe()`), not typed as paths; `db_gyms_create/update` skip `brand_color`/`logo` while the migration isn't applied (`_gyms_cols()`); the navbar button for another gym is drawn in that gym's brand colour (`gym_brand_vars()` inline); with a logo (`gym_logo()`: the gym's own, or for the default gym the bundled `logo_black.svg`) the button shows the logo in full colour straight on the frosted navbar, with no face and no darkening on hover (`.gym-switch-btn--logo`: thin brand outline, hover = spinning ring only, no glow, a thin dark `drop-shadow` outline on the image for contrast (a white halo washed out the lime FitMe 3070 logo); name as alt), without one it shows the name. The navbar brand on each gym's page uses that gym's logo too. Uploads (header + logo) also accept JPEG XL (`.jxl`, detected by signature in `upload_image_ext()` when the caller allows `'jxl'`; the gyms form and gallery photos (`db_gallery_image_upload()`) do; `AddType image/jxl` in `.htaccess`; GD can't resize it, so it is stored as uploaded; Chrome/Firefox may not display JXL, Safari does). The public gallery lists its folder by extension (`site/includes/gallery.php`, `site/index.php`: jpg/jpeg/png/gif/webp/jxl; before 2026-10-26 it only listed `*.jpg`, so PNG/WebP uploads never showed). Gallery photos are not in the scroll "hover" (`.is-centered`, main.js) any more; only a real hover lights them. Mensalidades (`.pricing-section::before`) has a slow (26s) drifting brand-colour glow over the metal texture (`pricing-drift`, static with reduced motion). An unpublished gym 404s publicly but previews for staff. +- **SEO per gym (2026-10-26):** `site/includes/include.php` builds title/description per page from the gym (`$gym_name`, `$loc_in` = «na Zona …»/«em Mira»); gym 1 keeps hand-written texts, other gyms get generated ones (never the 3070 texts). The gym's own `seo_title` / `seo_description` (Gestão → Ginásios) override the homepage each on its own. Keywords, author, og:site_name, favicon (gym logo if SVG) and the JSON-LD logo (`seo.php`) follow the gym. FitMe in's SEO texts were set in the dev DB only; production needs them entered in Gestão → Ginásios. +- `site/crossfit.php` decides the 404 for gyms without `has_crossfit` before `_open.php`, so it is a real 404 status. +- **Events per gym:** Eventos form «Mostrar em» writes `events.gym_id` (NULL = all gyms; `site_active_events()` filters on it). `site/evento.php` renders the event in its gym's brand/name/info. The hero event button text uses `--ev-on` (white/black computed from the event colour), not the page gym's on-accent. +- Navbar: the desktop bottom sweep line stops before the other-gym head via `--switch-w` (set by `setNavH` in `navbar.php`). The hero blur (`.hero-section .container::before`) has a second diagonal mask, so it is weaker at the top left. The «Marca uma aula experimental» link was removed; `#trialModal` stays (only reopened by `?agendar=erro`). ## Imagens / JPEG XL (2026-10-26) Fleet transition to JPEG XL (root `Y:\GitTea\CLAUDE.md`, "Images"); fitme3070 is the reference site. Uploads already accept `.jxl` (gyms header/logo, gallery photos). diff --git a/config/functions_events.php b/config/functions_events.php index a766c6a..77185d8 100644 --- a/config/functions_events.php +++ b/config/functions_events.php @@ -15,6 +15,7 @@ function events_defaults(): array { 'location' => '', 'event_starts_at' => null, 'event_ends_at' => null, 'publish_from' => '', 'publish_until' => '', 'is_active' => 1, 'cta_label' => '', 'cta_url' => '', 'show_lead_form' => 1, + 'gym_id' => null, // NULL = shown on every gym's homepage ]; } @@ -117,8 +118,8 @@ function db_events_create(PDO $pdo, array $data): int { INSERT INTO events (slug, title, subtitle, summary, description, hero_image, cor, location, event_starts_at, event_ends_at, publish_from, publish_until, - is_active, cta_label, cta_url, show_lead_form) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + is_active, cta_label, cta_url, show_lead_form, gym_id) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) "); $stmt->execute([ $d['slug'], $d['title'], $d['subtitle'], $d['summary'], $d['description'], @@ -127,6 +128,7 @@ function db_events_create(PDO $pdo, array $data): int { str_replace('T', ' ', (string) $d['publish_from']), str_replace('T', ' ', (string) $d['publish_until']), (int) $d['is_active'], $d['cta_label'], $d['cta_url'], (int) $d['show_lead_form'], + $d['gym_id'] ? (int) $d['gym_id'] : null, ]); $__id = (int) $pdo->lastInsertId(); audit_change($pdo, 'event', 'events', 'e_id', (int) $__id, 'create', null, 'title'); @@ -141,7 +143,7 @@ function db_events_update(PDO $pdo, int $id, array $data): bool { slug = ?, title = ?, subtitle = ?, summary = ?, description = ?, hero_image = ?, cor = ?, location = ?, event_starts_at = ?, event_ends_at = ?, publish_from = ?, publish_until = ?, - is_active = ?, cta_label = ?, cta_url = ?, show_lead_form = ? + is_active = ?, cta_label = ?, cta_url = ?, show_lead_form = ?, gym_id = ? WHERE e_id = ? "); $stmt->execute([ @@ -151,6 +153,7 @@ function db_events_update(PDO $pdo, int $id, array $data): bool { str_replace('T', ' ', (string) $d['publish_from']), str_replace('T', ' ', (string) $d['publish_until']), (int) $d['is_active'], $d['cta_label'], $d['cta_url'], (int) $d['show_lead_form'], + $d['gym_id'] ? (int) $d['gym_id'] : null, $id, ]); $__r = $stmt->rowCount() > 0; diff --git a/site/assets/css/style.css b/site/assets/css/style.css index 2f976b9..81ba291 100644 --- a/site/assets/css/style.css +++ b/site/assets/css/style.css @@ -600,7 +600,7 @@ section[id] { content: ''; position: absolute; left: 0; - right: 0; + right: var(--switch-w, 0px); /* ends where the other-gym head starts (navbar.php JS) */ bottom: -1px; height: 2px; pointer-events: none; @@ -894,7 +894,15 @@ section[id] { -webkit-mask-image: linear-gradient(to bottom, transparent 18%, rgba(0, 0, 0, .55) 36%, #000 50%, rgba(0, 0, 0, .55) 64%, transparent 82%); mask-image: linear-gradient(to bottom, transparent 18%, rgba(0, 0, 0, .55) 36%, #000 50%, rgba(0, 0, 0, .55) 64%, transparent 82%); } +/* The blur fades in diagonally: lightest at the top left, full at the bottom + right (second mask layer, intersected with the band above). */ .hero-section .container::before { + -webkit-mask-image: linear-gradient(to bottom, transparent 18%, rgba(0, 0, 0, .55) 36%, #000 50%, rgba(0, 0, 0, .55) 64%, transparent 82%), + linear-gradient(135deg, rgba(0, 0, 0, .15) 15%, #000 75%); + mask-image: linear-gradient(to bottom, transparent 18%, rgba(0, 0, 0, .55) 36%, #000 50%, rgba(0, 0, 0, .55) 64%, transparent 82%), + linear-gradient(135deg, rgba(0, 0, 0, .15) 15%, #000 75%); + -webkit-mask-composite: source-in; + mask-composite: intersect; -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1); opacity: .8; @@ -962,31 +970,12 @@ section[id] { .hero-cta-row { display: flex; - flex-direction: column; /* the button, then the trial link as plain text under it */ + flex-direction: column; align-items: center; gap: 14px; margin-top: 2.5rem; } -/* "Marca uma aula experimental": text only, under the main button. */ -.hero-text-link { - background: none; - border: 0; - padding: 4px 8px; - color: #fff; - font: inherit; - font-weight: 300; - letter-spacing: .02em; - text-shadow: 0 1px 6px rgba(0, 0, 0, .6); - cursor: pointer; - transition: color .3s ease; -} -.hero-text-link:hover, -.hero-text-link:focus-visible { - color: var(--fitme-accent); - text-decoration: none; -} - .hero-cta-row .site-btn { margin-top: 0; } @@ -3541,7 +3530,7 @@ h3.contact-title { font-size: .92rem; font-weight: 700; white-space: nowrap; - color: var(--fitme-on-accent); /* white on the red gym, dark on lime */ + color: var(--ev-on, var(--fitme-on-accent)); /* set from the event colour (index.php) */ background: var(--ev-accent); } .hero-event-go i { transition: transform var(--fitme-transition); } diff --git a/site/crossfit.php b/site/crossfit.php index a14b9e7..0edd2a7 100644 --- a/site/crossfit.php +++ b/site/crossfit.php @@ -12,9 +12,13 @@ if (($_GET['gym'] ?? '') === '') { exit; } +// Only gyms with a CrossFit box have this page: a real 404 status, so decide before any output. +require_once __DIR__ . '/../config/db.php'; +require_once __DIR__ . '/../config/functions.php'; +$cf_gym = site_gym($pdo); +if ($cf_gym && empty($cf_gym['has_crossfit'])) { require __DIR__ . '/404.php'; exit; } + require __DIR__ . '/_open.php'; -// Only gyms with a CrossFit box have this page. -if (empty($gym['has_crossfit'])) { ob_get_level() && ob_end_clean(); require __DIR__ . '/404.php'; exit; } $data = [ 'title' => 'CrossFit', diff --git a/site/evento.php b/site/evento.php index 692cbcd..39a4d54 100644 --- a/site/evento.php +++ b/site/evento.php @@ -105,8 +105,12 @@ $seo_desc = $event['summary'] !== '' : trim(mb_substr(strip_tags((string) ($event['subtitle'] ?: $event['description'])), 0, 200)); $current_uri_2 = 'evento'; +// An event tied to one gym (Eventos → «Mostrar em») renders in that gym's brand. +$ev_gym = !empty($event['gym_id']) ? db_gyms_get($pdo, (int) $event['gym_id']) : null; +if ($ev_gym && empty($_GET['gym'])) $_GET['gym'] = $ev_gym['slug']; +$ev_gym = $ev_gym ?? site_gym($pdo) ?? gym_fallback(); $GLOBALS['_page_meta_override'] = [ - ($event['title'] !== '' ? $event['title'] : 'Evento') . ' | FitMe 3070', + ($event['title'] !== '' ? $event['title'] : 'Evento') . ' | ' . $ev_gym['name'], $seo_desc, ]; $GLOBALS['_canonical_override'] = $event_url; @@ -114,7 +118,7 @@ $GLOBALS['_og_type_override'] = 'article'; if ($hero_url !== '') $GLOBALS['_og_image_override'] = $hero_url; // Event structured data (schema.org/Event) for rich link previews / search. -$info = site_info($pdo); +$info = site_info($pdo, (int) $ev_gym['id']); $ld_event = [ '@context' => 'https://schema.org', '@type' => 'Event', @@ -130,11 +134,11 @@ if (!empty($event['event_ends_at'])) $ld_event['endDate'] = str_replace(' ', $ld_event['location'] = $event['location'] !== '' ? ['@type' => 'Place', 'name' => $event['location']] : ['@type' => 'Place', - 'name' => ($info['name'] ?? '') !== '' ? $info['name'] : 'FitMe 3070', + 'name' => ($info['name'] ?? '') !== '' ? $info['name'] : $ev_gym['name'], 'address' => $info['adress'] ?? '']; $ld_event['organizer'] = [ '@type' => 'Organization', - 'name' => ($info['name'] ?? '') !== '' ? $info['name'] : 'FitMe 3070', + 'name' => ($info['name'] ?? '') !== '' ? $info['name'] : $ev_gym['name'], 'url' => base_url(), ]; $GLOBALS['_jsonld_extra'] = $ld_event; diff --git a/site/includes/include.php b/site/includes/include.php index d15373f..882533c 100644 --- a/site/includes/include.php +++ b/site/includes/include.php @@ -2,27 +2,37 @@ // 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. +// Titles ~50-60 characters, descriptions ~140-160 (what Google shows). $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.']; +$gym_name = ($gym_meta['name'] ?? '') !== '' ? $gym_meta['name'] : 'FitMe 3070'; +$is_main = (int) ($gym_meta['id'] ?? 1) === 1; +$loc = ($gym_meta['locality'] ?? '') !== '' ? $gym_meta['locality'] : 'Mira'; +$loc_in = (preg_match('/^(zona|rua|avenida|praia|vila)/iu', $loc) ? 'na ' : 'em ') . $loc; // «na Zona Industrial de Mira» +$page_meta = [ + '' => $is_main + ? ['FitMe 3070 — Ginásio e CrossFit em Mira', + 'Ginásio em Mira (Lagoa) com musculação, CrossFit, aulas de grupo, personal trainers, nutrição e fisioterapia. Vê horários e mensalidades e inscreve-te!'] + // Other gyms without their own texts get them from name and locality, never the 3070 ones. + : [$gym_name . ' — Ginásio ' . $loc_in, + $gym_name . ', ginásio ' . $loc_in . ': musculação, cardio e treino funcional com acompanhamento. Vê horários e mensalidades e inscreve-te já!'], + 'crossfit' => $is_main + ? ['CrossFit 3070 — Box de CrossFit em Mira | FitMe 3070', + 'Box de CrossFit em Mira (Lagoa) com treinadores certificados e aulas para todos os níveis, do primeiro treino à competição. Vê o horário e treina connosco!'] + : ['CrossFit — Box ' . $loc_in . ' | ' . $gym_name, + 'Box de CrossFit do ' . $gym_name . ' ' . $loc_in . ': aulas para todos os níveis com treinadores certificados. Vê o horário e treina connosco!'], + 'privacidade' => ['Política de Privacidade | ' . $gym_name, + 'Política de privacidade do ' . $gym_name . ': que dados pessoais recolhemos, para quê, durante quanto tempo e como exerces os teus direitos (RGPD).'], + 'termos' => ['Termos e Condições | ' . $gym_name, + 'Termos e condições de utilização do site do ' . $gym_name . ': pedidos de inscrição, preços, horários, eventos e limites de responsabilidade.'], +]; +// The gym's own SEO title/description (Gestão → Ginásios) win on its homepage, each on its own. +if ($page === '') { + if (($gym_meta['seo_title'] ?? '') !== '') $page_meta[''][0] = $gym_meta['seo_title']; + if (($gym_meta['seo_description'] ?? '') !== '') $page_meta[''][1] = $gym_meta['seo_description']; } +// Favicon: the gym's own logo when it is an SVG. +$gym_logo_rel = gym_logo($gym_meta); +$favicon_rel = str_ends_with(strtolower($gym_logo_rel), '.svg') ? $gym_logo_rel : 'site/assets/img/logos/logo_black.svg'; // 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['']; @@ -37,8 +47,8 @@ $canonical = $GLOBALS['_canonical_override'] ?? match ($page) { - - + + <?= htmlspecialchars($page_title) ?> @@ -68,13 +78,13 @@ $canonical = $GLOBALS['_canonical_override'] ?? match ($page) { - + - + diff --git a/site/includes/navbar.php b/site/includes/navbar.php index 8aef800..37bb7d0 100644 --- a/site/includes/navbar.php +++ b/site/includes/navbar.php @@ -109,8 +109,15 @@ $center_logo = !empty($nav_center_logo); /* ── Mobile menu fills the screen below the bar (style.css --nav-h) ──── */ var hdr = document.querySelector('.header-section'); if (hdr) { - var setNavH = function() { hdr.style.setProperty('--nav-h', hdr.offsetHeight + 'px'); }; + // Desktop: the bottom sweep line stops at the other-gym head (style.css --switch-w). + var sw = hdr.querySelector('.gym-switch'); + var setNavH = function() { + hdr.style.setProperty('--nav-h', hdr.offsetHeight + 'px'); + var w = (sw && window.innerWidth >= 992) ? hdr.getBoundingClientRect().right - sw.getBoundingClientRect().left + 5 : 0; + hdr.style.setProperty('--switch-w', Math.max(0, w) + 'px'); + }; window.addEventListener('resize', setNavH, { passive: true }); + window.addEventListener('load', setNavH); setNavH(); } diff --git a/site/includes/seo.php b/site/includes/seo.php index 016af71..ef07e65 100644 --- a/site/includes/seo.php +++ b/site/includes/seo.php @@ -8,7 +8,7 @@ $ld = [ 'name' => $ld_gym['name'] !== '' ? $ld_gym['name'] : (($info['name'] ?? '') !== '' ? $info['name'] : 'FitMe 3070'), 'url' => gym_url($ld_gym), 'image' => base_url(img_compat_rel(($ld_gym['hero_image'] ?? '') !== '' ? $ld_gym['hero_image'] : 'site/assets/img/home.jpg')), - 'logo' => base_url('site/assets/img/logos/logo_black.svg'), + 'logo' => base_url(img_compat_rel(gym_logo($ld_gym) ?: 'site/assets/img/logos/logo_black.svg')), ]; if (!empty($info['phone'])) $ld['telephone'] = site_tel($info['phone']); if (!empty($info['email'])) $ld['email'] = $info['email']; diff --git a/site/index.php b/site/index.php index 714123d..014503c 100644 --- a/site/index.php +++ b/site/index.php @@ -61,10 +61,12 @@ $hero_img = $gym['hero_image'] !== '' ? $gym['hero_image'] : 'site/assets/img
$ac]), 'on-accent:#FFFFFF') ? '#FFFFFF' : '#0B0B0D'; $ev_img = $ev['hero_image'] !== '' ? base_url('uploads/events/' . rawurlencode($ev['hero_image'])) : ''; ?> + style="--ev-accent:;--ev-on:"> Evento @@ -78,7 +80,6 @@ $hero_img = $gym['hero_image'] !== '' ? $gym['hero_image'] : 'site/assets/img


Inscreve-te Já! -
diff --git a/views/admin/events/_form.php b/views/admin/events/_form.php index 167e9e6..4ffe242 100644 --- a/views/admin/events/_form.php +++ b/views/admin/events/_form.php @@ -21,6 +21,17 @@ $dt = static function ($v): string { +
+ + +
Ginásio em cujo topo da página inicial o destaque aparece.
+
+
diff --git a/views/admin/events/create.php b/views/admin/events/create.php index f5875e1..6d04612 100644 --- a/views/admin/events/create.php +++ b/views/admin/events/create.php @@ -24,6 +24,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'cta_label' => trim($_POST['cta_label'] ?? ''), 'cta_url' => trim($_POST['cta_url'] ?? ''), 'show_lead_form' => isset($_POST['show_lead_form']) ? 1 : 0, + 'gym_id' => (int) ($_POST['gym_id'] ?? 0) ?: null, 'hero_image' => '', ]; diff --git a/views/admin/events/edit.php b/views/admin/events/edit.php index c23c902..b32141f 100644 --- a/views/admin/events/edit.php +++ b/views/admin/events/edit.php @@ -48,6 +48,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['save_event'])) { 'cta_label' => trim($_POST['cta_label'] ?? ''), 'cta_url' => trim($_POST['cta_url'] ?? ''), 'show_lead_form' => isset($_POST['show_lead_form']) ? 1 : 0, + 'gym_id' => (int) ($_POST['gym_id'] ?? 0) ?: null, 'hero_image' => $item['hero_image'], ];