feat: borda verde a rodar nos planos, textura metálica, contactos numa só fonte
- Mensalidades: ao passar o rato, a borda do cartão ganha um brilho verde num conic-gradient que roda (@property --pc-a animável), centrado no cursor; o cartão inclina-se e desliza para o rato como os da equipa. - «O que dizem de nós» e rodapé: textura discreta de metal preto mate (grão de pintura eletrostática, brilho difuso, riscas quase invisíveis), em SVG/CSS. - Contactos: o site lê só fitme3070_info (Gestão → Contactos). Os campos contact_*/social_* de Sistema → Definições não eram usados e foram editados por engano — saem do formulário, com um aviso a apontar para Contactos. site_info() deixa o WhatsApp só com dígitos (wa.me não aceita + nem espaços). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
21ff1b55ff
commit
0587be7d14
4 files changed
+166
-78
No files matched your search
@@ -640,6 +640,47 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
window.addEventListener('resize', function () { closeAll(null); }, { passive: true });
|
||||
});
|
||||
|
||||
/* ── Mensalidades: cards follow the mouse ───────────────────────────────────
|
||||
While hovered, a price card tilts and drifts a few px toward the pointer
|
||||
(like the team cards) and the spinning conic edge is centred on it
|
||||
(--pc-x/--pc-y feed the gradient's `at` position). Pointer devices only;
|
||||
off with reduced motion. */
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var cards = document.querySelectorAll('.price-card');
|
||||
if (!cards.length) return;
|
||||
var fine = window.matchMedia('(hover: hover) and (pointer: fine)');
|
||||
var reduced = window.matchMedia('(prefers-reduced-motion: reduce)');
|
||||
var VARS = ['--pc-rx', '--pc-ry', '--pc-mx', '--pc-my', '--pc-x', '--pc-y'];
|
||||
|
||||
cards.forEach(function (card) {
|
||||
var t;
|
||||
card.addEventListener('mouseenter', function () {
|
||||
if (!fine.matches || reduced.matches) return;
|
||||
clearTimeout(t);
|
||||
t = setTimeout(function () { card.classList.add('pc-tracking'); }, 350);
|
||||
});
|
||||
card.addEventListener('mousemove', function (e) {
|
||||
if (!fine.matches || reduced.matches) return;
|
||||
var r = card.getBoundingClientRect();
|
||||
var x = e.clientX - r.left, y = e.clientY - r.top;
|
||||
var dx = Math.max(-1, Math.min(1, (x - r.width / 2) / (r.width / 2)));
|
||||
var dy = Math.max(-1, Math.min(1, (y - r.height / 2) / (r.height / 2)));
|
||||
card.style.setProperty('--pc-ry', (dx * 6).toFixed(2) + 'deg');
|
||||
card.style.setProperty('--pc-rx', (-dy * 6).toFixed(2) + 'deg');
|
||||
card.style.setProperty('--pc-mx', (dx * 6).toFixed(1) + 'px');
|
||||
card.style.setProperty('--pc-my', (dy * 6).toFixed(1) + 'px');
|
||||
// The pseudo-elements sit a few px outside the card; close enough.
|
||||
card.style.setProperty('--pc-x', x.toFixed(0) + 'px');
|
||||
card.style.setProperty('--pc-y', y.toFixed(0) + 'px');
|
||||
});
|
||||
card.addEventListener('mouseleave', function () {
|
||||
clearTimeout(t);
|
||||
card.classList.remove('pc-tracking'); // spring back
|
||||
VARS.forEach(function (v) { card.style.removeProperty(v); });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/* ── Mensalidades: pre-select the clicked card in the sign-up modal ───────── */
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var select = document.querySelector('#joinModal select[name="membership_id"]');
|
||||
|
||||
Reference in new issue
Block a user