feat: contactos editáveis, equipa com título/aptidões, mensalidades e reviews Google
- Contactos: nova página no backoffice (fitme3070_info) e 964 201 137 como telefone principal; o telefone secundário só aparece quando existe. - Equipa: título, aptidões/funções e formações; o cartão mostra foto, nome e título e abre um cartão horizontal de detalhe (hover no desktop, toque no telemóvel) sem mexer na grelha. - Mensalidades: cartões editáveis com um destaque, modal de inscrição que guarda o pedido (RGPD + estado + campos reservados para o CRM) e avisa o ginásio por e-mail; lista de pedidos com estados, notas e CSV. - Reviews Google via Places API (New), filtradas por classificação mínima e em cache configurável; página de configuração com pesquisa do Place ID. - Assets com ?v=<mtime>: site/assets é servido com cache imutável de 1 ano. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a494d59a5
commit
f95c9ebc52
27 files changed
+2063
-16
No files matched your search
+10
-2
@@ -9,11 +9,19 @@ if (!defined('SITE_INCLUDES')) {
|
||||
}
|
||||
|
||||
// <script src> / <link rel=stylesheet> tag builders (CI4 html helper).
|
||||
// site/assets is served with a one-year immutable Cache-Control, so local files
|
||||
// carry their mtime as ?v= — an edited style.css/main.js gets a new URL instead
|
||||
// of staying stuck in returning visitors' caches.
|
||||
function _asset_versioned(string $path): string {
|
||||
$file = dirname(__DIR__) . '/' . ltrim($path, '/');
|
||||
if (strpos($path, '?') !== false || preg_match('~^https?://~', $path) || !is_file($file)) return base_url($path);
|
||||
return base_url($path) . '?v=' . filemtime($file);
|
||||
}
|
||||
function script_tag(string $src): string {
|
||||
return '<script src="' . htmlspecialchars(base_url($src), ENT_QUOTES) . '"></script>' . "\n";
|
||||
return '<script src="' . htmlspecialchars(_asset_versioned($src), ENT_QUOTES) . '"></script>' . "\n";
|
||||
}
|
||||
function link_tag(string $href, string $rel = 'stylesheet'): string {
|
||||
return '<link rel="' . $rel . '" href="' . htmlspecialchars(base_url($href), ENT_QUOTES) . '">' . "\n";
|
||||
return '<link rel="' . $rel . '" href="' . htmlspecialchars(_asset_versioned($href), ENT_QUOTES) . '">' . "\n";
|
||||
}
|
||||
function site_url(string $path = ''): string { return base_url($path); }
|
||||
|
||||
|
||||
Reference in new issue
Block a user