Only show the booking calendars after the lead form is sent
/contact/book/ now needs ?submitted=1 (set in the GHL form redirect) to load the calendars; other visitors get a prompt that links to the form. The page is noindex and out of the sitemap, the contact page card points to the form, and visitors are sent back to the language they filled the form in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
(function () {
|
||||
if (document.documentElement.getAttribute('data-gate') !== 'open') return;
|
||||
document.querySelectorAll('iframe[data-src]').forEach(function (f) { f.src = f.getAttribute('data-src'); });
|
||||
var tabs = document.querySelectorAll('[data-call]');
|
||||
var select = function (id, scroll) {
|
||||
tabs.forEach(function (t) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
(function () {
|
||||
window.__site = true;
|
||||
var root = document.documentElement;
|
||||
// The booking page uses this to keep visitors in the language they filled the form in.
|
||||
if (!/\/contact\/book\//.test(location.pathname)) { try { sessionStorage.setItem('dm-lang', root.lang || 'en'); } catch (e) {} }
|
||||
// Translations for the current page's language, written into the page by the build.
|
||||
var T = function (s) { return (window.__i18n && window.__i18n[s]) || s; };
|
||||
var reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
@@ -1055,6 +1055,7 @@ h1, h2, h3, h4 { font-weight: 600; }
|
||||
.cal-panel { max-width: 980px; margin: 0 auto; border-radius: 24px; }
|
||||
@media (max-width: 760px) { .calls { grid-template-columns: 1fr; } .call { padding: 24px; } }
|
||||
#schedule .wrap { position: relative; }
|
||||
[data-gate="locked"] .gate-open, [data-gate="open"] .gate-locked, html:not([data-gate]) .gate-locked { display: none !important; }
|
||||
.cal-panel[data-off] { position: absolute; left: -10000px; top: 0; width: min(980px, 100%); visibility: hidden; pointer-events: none; }
|
||||
.ghl-wrap-form { min-height: 460px; }
|
||||
.ghl-wrap-cal { min-height: 720px; }
|
||||
|
||||
Reference in New Issue
Block a user