6 Commits
Author SHA1 Message Date
andre c461396654 Merge pull request 'style(contactos): info and hours beside the form' (#6) from beta into main 2026-10-27 14:02:58 +00:00
andre 2089f92750 style(contactos): info and hours in two columns beside the form
Drops the duplicate «Envia-nos uma mensagem» heading (the app form has its
own) and gives the narrower form the right half.
2026-10-27 13:55:13 +00:00
andre dcef3cda45 Merge pull request 'feat(contactos): embed the FitMe app contact form' (#5) from beta into main 2026-10-27 13:53:08 +00:00
andre f018fa582d feat(contactos): embed the FitMe app contact form
Replaces the Zoho form in the contacts section with the app.fitme3070.pt
site-contacto iframe (passes page URL and UTM params, auto-height).
2026-10-27 13:47:35 +00:00
andre 18d037ac16 Merge pull request 'fix(gallery): lightbox click and mouse drag' (#4) from beta into main 2026-10-26 20:41:18 +00:00
andre f297e128fd fix(gallery): open lightbox on click and keep mouse drag alive
Pointer capture on pointerdown redirected the click to the strip, so photos
never opened; capture now starts only after a 5px drag. Native link drag is
blocked so it no longer cancels the mouse drag.
2026-10-26 20:40:17 +00:00
3 changed files with 41 additions and 40 deletions

No files matched your search

+7 -3
View File
@@ -1653,9 +1653,13 @@ section[id] {
margin-bottom: 2.5rem;
}
/* The form heading is an h3 under the section's h2 — keep the h2 look. */
h3.contact-title {
font-size: 2.25rem;
/* The FitMe app form (iframe, max 480px): centred when it stacks under the info. */
#fitme-form-site-contacto {
display: block;
margin-inline: auto;
}
@media (max-width: 991px) {
#contact-form { margin-top: 1rem; }
}
.contact-info-warp {
+9 -2
View File
@@ -829,15 +829,22 @@ document.addEventListener('DOMContentLoaded', function () {
if (e.pointerType === 'touch' || e.button !== 0) return;
dragging = true; moved = 0;
startX = e.clientX; startLeft = wrap.scrollLeft;
wrap.classList.add('is-dragging');
wrap.setPointerCapture(e.pointerId);
});
wrap.addEventListener('pointermove', function (e) {
if (!dragging) return;
var dx = e.clientX - startX;
moved = Math.max(moved, Math.abs(dx));
if (moved <= 5) return;
// Capture only once it is a real drag: capturing on pointerdown sends the
// click to .gal-wrap instead of the photo, so the lightbox never opened.
if (!wrap.classList.contains('is-dragging')) {
wrap.classList.add('is-dragging');
try { wrap.setPointerCapture(e.pointerId); } catch (err) {}
}
wrap.scrollLeft = startLeft - dx;
});
// The tiles are links, which the browser drags natively (cancelling our drag).
wrap.addEventListener('dragstart', function (e) { e.preventDefault(); });
function endDrag(e) {
if (!dragging) return;
dragging = false;
+25 -35
View File
@@ -24,8 +24,10 @@ $session = session();
</div>
<?php endif; ?>
<div class="row">
<div class="col-lg-4">
<div class="col-lg-6">
<h2 id="contactos-title" class="contact-title text-center text-md-left">Informações</h2>
<div class="row">
<div class="col-sm-6">
<div class="contact-info-warp text-center text-md-left">
<h3>Localização</h3>
<div class="contact-info">
@@ -58,10 +60,12 @@ $session = session();
</a>
</div>
</div>
</div>
<?php if ($whours): ?>
<div class="contact-info-warp text-center">
<div class="col-sm-6">
<div class="contact-info-warp text-center text-md-left">
<h3>Horário de Funcionamento</h3>
<div class="contact-info wh-text text-center">
<div class="contact-info wh-text text-center text-md-left">
<?php foreach ($work_hours_days as $key => $value):
$ranges = [];
foreach ($whours as $h) {
@@ -78,41 +82,27 @@ $session = session();
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div class="col-lg-8">
</div>
<div class="col-lg-6">
<div id="contact-form">
<h3 class="contact-title text-center text-md-left">Envia-nos uma mensagem</h3>
<?php if (isset($_GET['enviado'])): ?>
<div class="alert alert-success" role="alert">
Mensagem enviada com sucesso! Entraremos em contacto brevemente.
</div>
<?php endif; ?>
<form class="contact-form" method="post" action="https://forms.zohopublic.eu/fitme30701/form/FormulriodeContacto/formperma/NiwsTjwWGX2sgpZIXqE5otyAn8D5nuRQjpYDuGkS2wM/htmlRecords/submit">
<input type="hidden" name="zf_redirect_url" value="<?= base_url('?enviado=1#contact-form') ?>">
<div class="row">
<div class="col-md-6">
<input type="text" required name="SingleLine" placeholder="Nome" aria-label="Nome">
</div>
<div class="col-md-6">
<input type="text" required name="PhoneNumber_countrycode" placeholder="Telemóvel" aria-label="Telemóvel">
</div>
</div>
<input type="text" name="SingleLine1" placeholder="Razão" required value="<?= htmlspecialchars($assunto) ?>" aria-label="Razão do contacto">
<textarea name="MultiLine" placeholder="Mensagem" required aria-label="Mensagem"></textarea>
<?php if ($session->getFlashdata('email') !== null): ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<?= $session->getFlashdata('email') ?>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<?php endif; ?>
<label class="consent-check">
<?php /* no name attribute: gates submission client-side, not stored in Zoho */ ?>
<input type="checkbox" required>
<span>Li e aceito a <a href="<?= base_url('home/privacidade') ?>" target="_blank" rel="noopener">Política de Privacidade</a>.</span>
</label>
<button class="site-btn" id="btn_email" type="submit">Enviar Mensagem</button>
</form>
<?php /* Formulário da app FitMe (app.fitme3070.pt), em iframe; a altura acompanha o conteúdo via postMessage. */ ?>
<div id="fitme-form-site-contacto-wrap"></div>
<script>
(function () {
var p = new URLSearchParams(location.search), q = new URLSearchParams({ embed: "1", page: location.href });
["utm_source","utm_medium","utm_campaign","utm_content","utm_term"].forEach(function (k) { if (p.get(k)) q.set(k, p.get(k)); });
var f = document.createElement("iframe");
f.src = "https://app.fitme3070.pt/f/site-contacto?" + q.toString(); f.id = "fitme-form-site-contacto"; f.title = "Envia-nos uma Mensagem";
f.style.cssText = "width:100%;max-width:480px;border:0;"; f.height = "640"; f.loading = "lazy";
document.getElementById("fitme-form-site-contacto-wrap").appendChild(f);
window.addEventListener("message", function (e) {
if (e.origin === "https://app.fitme3070.pt" && e.data && e.data.type === "fitme-form-height" && e.data.slug === "site-contacto") f.style.height = e.data.height + "px";
});
})();
</script>
</div>
</div>
</div>