pricing slider + order form + oliver testimonial photo
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
+229
-6
@@ -975,6 +975,114 @@
|
|||||||
.pricing-card.featured { transform: none; }
|
.pricing-card.featured { transform: none; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ══════════════════════════════════════════════════════════
|
||||||
|
PRICING SLIDER & ORDER FORM
|
||||||
|
══════════════════════════════════════════════════════════ */
|
||||||
|
.pricing-slider {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: 960px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.pricing-slider-track {
|
||||||
|
display: flex;
|
||||||
|
transition: transform 0.5s cubic-bezier(.34,1.56,.64,1);
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
.pricing-slider-track.slide-left {
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
.pricing-panel,
|
||||||
|
.order-panel {
|
||||||
|
min-width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.order-panel {
|
||||||
|
background: var(--bg-card);
|
||||||
|
border: 1px solid var(--border-hi);
|
||||||
|
border-radius: var(--radius-card);
|
||||||
|
padding: 40px 36px;
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.order-panel h3 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.order-panel .order-plan {
|
||||||
|
color: var(--accent);
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.order-email-row {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.order-email-row label {
|
||||||
|
display: block;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.06em;
|
||||||
|
color: var(--text-muted);
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.order-email-row input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 16px;
|
||||||
|
background: var(--bg);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
color: var(--text);
|
||||||
|
font-size: 15px;
|
||||||
|
outline: none;
|
||||||
|
transition: border-color 0.2s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.order-email-row input:focus {
|
||||||
|
border-color: var(--accent);
|
||||||
|
}
|
||||||
|
.order-stripe-btn {
|
||||||
|
width: 100%;
|
||||||
|
padding: 14px 28px;
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
background: linear-gradient(135deg, var(--accent), #5a7de0);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: opacity 0.2s, transform 0.15s;
|
||||||
|
}
|
||||||
|
.order-stripe-btn:hover { opacity: 0.9; transform: scale(1.02); }
|
||||||
|
.order-stripe-btn:active { transform: scale(0.97); }
|
||||||
|
.order-stripe-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
|
||||||
|
.order-back {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 16px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.order-back:hover { color: var(--accent); }
|
||||||
|
.order-status {
|
||||||
|
margin-top: 16px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.order-status.show {
|
||||||
|
display: block;
|
||||||
|
animation: msgSlide 0.25s cubic-bezier(.22,1,.36,1);
|
||||||
|
}
|
||||||
|
.order-status.success { color: #4ade80; }
|
||||||
|
.order-status.error { color: #f87171; }
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.order-panel { padding: 32px 24px; }
|
||||||
|
}
|
||||||
|
|
||||||
/* ══════════════════════════════════════════════════════════
|
/* ══════════════════════════════════════════════════════════
|
||||||
FAQ
|
FAQ
|
||||||
══════════════════════════════════════════════════════════ */
|
══════════════════════════════════════════════════════════ */
|
||||||
@@ -1815,6 +1923,10 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- ── Billing toggle ── -->
|
<!-- ── Billing toggle ── -->
|
||||||
|
<div class="pricing-slider">
|
||||||
|
<div class="pricing-slider-track" id="pricing-track">
|
||||||
|
|
||||||
|
<div class="pricing-panel">
|
||||||
<div class="pricing-billing-toggle">
|
<div class="pricing-billing-toggle">
|
||||||
<span class="billing-label active" id="billing-monthly-label">Monthly</span>
|
<span class="billing-label active" id="billing-monthly-label">Monthly</span>
|
||||||
<label class="toggle-switch">
|
<label class="toggle-switch">
|
||||||
@@ -1864,7 +1976,7 @@
|
|||||||
Support chat with human escalation
|
Support chat with human escalation
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="https://app.derez.ai" class="btn btn-primary btn-block">Hire Trainee</a>
|
<button class="btn btn-primary btn-block" onclick="hireAgent('trainee')">Hire Trainee</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Junior -->
|
<!-- Junior -->
|
||||||
@@ -1916,7 +2028,7 @@
|
|||||||
Higher API key credit allocation
|
Higher API key credit allocation
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="https://app.derez.ai" class="btn btn-primary btn-block">Hire Junior</a>
|
<button class="btn btn-primary btn-block" onclick="hireAgent('junior')">Hire Junior</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Senior -->
|
<!-- Senior -->
|
||||||
@@ -1975,10 +2087,28 @@
|
|||||||
Highest API key credit allocation
|
Highest API key credit allocation
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="https://app.derez.ai" class="btn btn-primary btn-block">Hire Senior</a>
|
<button class="btn btn-primary btn-block" onclick="hireAgent('senior')">Hire Senior</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div><!-- /pricing-panel -->
|
||||||
|
|
||||||
|
<div class="order-panel" id="order-panel">
|
||||||
|
<h3 id="order-title">Processing with Stripe</h3>
|
||||||
|
<p class="order-plan" id="order-plan-display"></p>
|
||||||
|
<div class="order-email-row">
|
||||||
|
<label for="order-email">Email address</label>
|
||||||
|
<input type="email" id="order-email" placeholder="you@example.com" autocomplete="email" />
|
||||||
|
</div>
|
||||||
|
<button class="order-stripe-btn" id="order-stripe-btn" onclick="processStripeOrder()">
|
||||||
|
Proceed to Stripe
|
||||||
|
</button>
|
||||||
|
<div class="order-status" id="order-status"></div>
|
||||||
|
<a class="order-back" onclick="backToPricing()">← Back to plans</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- /pricing-slider-track -->
|
||||||
|
</div><!-- /pricing-slider -->
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -1989,7 +2119,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="story-card">
|
<div class="story-card">
|
||||||
<div class="story-avatar">
|
<div class="story-avatar">
|
||||||
<div class="story-avatar-placeholder" style="font-size:40px;">👤</div>
|
<img src="assets/images/oliver-arnold.jpg" alt="Oliver Arnold">
|
||||||
</div>
|
</div>
|
||||||
<div class="story-body">
|
<div class="story-body">
|
||||||
<div class="story-label">From the Founder</div>
|
<div class="story-label">From the Founder</div>
|
||||||
@@ -2348,12 +2478,103 @@
|
|||||||
document.getElementById('period-senior').textContent = yearly ? '/ month ✦ yearly' : '/ month';
|
document.getElementById('period-senior').textContent = yearly ? '/ month ✦ yearly' : '/ month';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Pricing Slider / Order Form ──────────────────────────── */
|
||||||
|
const ORDER_WEBHOOK = "https://n8n.derez.ai/webhook/5318a0d8-d064-42fb-95b7-aa5552cb3fa9";
|
||||||
|
let selectedProduct = null;
|
||||||
|
|
||||||
|
function hireAgent(product) {
|
||||||
|
selectedProduct = product;
|
||||||
|
|
||||||
|
// Update order panel with plan info
|
||||||
|
const yearly = document.getElementById('billing-toggle').checked;
|
||||||
|
const period = yearly ? 'yearly' : 'monthly';
|
||||||
|
const names = { trainee: 'Trainee', junior: 'Junior', senior: 'Senior' };
|
||||||
|
document.getElementById('order-plan-display').textContent = names[product] + ' — ' + period;
|
||||||
|
|
||||||
|
// Slide pricing out, order form in
|
||||||
|
document.getElementById('pricing-track').classList.add('slide-left');
|
||||||
|
|
||||||
|
// Reset status
|
||||||
|
document.getElementById('order-status').className = 'order-status';
|
||||||
|
document.getElementById('order-status').style.display = 'none';
|
||||||
|
document.getElementById('order-stripe-btn').disabled = false;
|
||||||
|
document.getElementById('order-stripe-btn').textContent = 'Proceed to Stripe';
|
||||||
|
document.getElementById('order-email').focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function backToPricing() {
|
||||||
|
document.getElementById('pricing-track').classList.remove('slide-left');
|
||||||
|
selectedProduct = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function processStripeOrder() {
|
||||||
|
const email = document.getElementById('order-email').value.trim();
|
||||||
|
const statusEl = document.getElementById('order-status');
|
||||||
|
const btn = document.getElementById('order-stripe-btn');
|
||||||
|
|
||||||
|
if (!email) {
|
||||||
|
statusEl.textContent = 'Please enter your email address.';
|
||||||
|
statusEl.className = 'order-status show error';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
btn.disabled = true;
|
||||||
|
btn.textContent = 'Processing with Stripe…';
|
||||||
|
statusEl.className = 'order-status show';
|
||||||
|
statusEl.textContent = 'Connecting to Stripe…';
|
||||||
|
|
||||||
|
const yearly = document.getElementById('billing-toggle').checked;
|
||||||
|
const period = yearly ? 'yearly' : 'monthly';
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await fetch(ORDER_WEBHOOK, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify({
|
||||||
|
email: email,
|
||||||
|
product: selectedProduct,
|
||||||
|
period: period,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!res.ok) throw new Error('Webhook returned ' + res.status);
|
||||||
|
|
||||||
|
// Try to parse the response — could be JSON or plain text
|
||||||
|
const ct = res.headers.get('content-type') || '';
|
||||||
|
let data;
|
||||||
|
if (ct.indexOf('json') !== -1) {
|
||||||
|
data = await res.json();
|
||||||
|
} else {
|
||||||
|
data = await res.text();
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we get a Stripe checkout URL back, open it
|
||||||
|
const checkoutUrl = (data && typeof data === 'object')
|
||||||
|
? (data.url || data.checkout_url || data.checkoutUrl || data.redirect)
|
||||||
|
: null;
|
||||||
|
if (checkoutUrl && checkoutUrl.startsWith('http')) {
|
||||||
|
window.open(checkoutUrl, '_blank');
|
||||||
|
statusEl.textContent = '✓ Redirecting to Stripe checkout…';
|
||||||
|
statusEl.className = 'order-status show success';
|
||||||
|
} else {
|
||||||
|
statusEl.textContent = '✓ Request sent! Check your email for the Stripe payment link.';
|
||||||
|
statusEl.className = 'order-status show success';
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
statusEl.textContent = 'Error: ' + err.message + '. Please try again.';
|
||||||
|
statusEl.className = 'order-status show error';
|
||||||
|
btn.disabled = false;
|
||||||
|
btn.textContent = 'Proceed to Stripe';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Chat Widget ──────────────────────────────────────────── */
|
/* ── Chat Widget ──────────────────────────────────────────── */
|
||||||
const CHAT_URL = "https://n8n.derez.ai/webhook/a58d00c4-f0c9-40cd-bb50-4f45f0442ef0";
|
const CHAT_URL = "https://n8n.derez.ai/webhook/a58d00c4-f0c9-40cd-bb50-4f45f0442ef0";
|
||||||
let chatId = null;
|
let chatId = null;
|
||||||
let chatOpen = false;
|
let chatOpen = false;
|
||||||
let chatBusy = false;
|
let chatBusy = false;
|
||||||
let greeted = false;
|
let greeted = false;
|
||||||
|
let probeTimer = null;
|
||||||
|
|
||||||
function chatToggle() {
|
function chatToggle() {
|
||||||
chatOpen = !chatOpen;
|
chatOpen = !chatOpen;
|
||||||
@@ -2361,6 +2582,8 @@
|
|||||||
document.getElementById('chat-fab').classList.toggle('open', chatOpen);
|
document.getElementById('chat-fab').classList.toggle('open', chatOpen);
|
||||||
document.getElementById('chat-widget').setAttribute('aria-hidden', !chatOpen);
|
document.getElementById('chat-widget').setAttribute('aria-hidden', !chatOpen);
|
||||||
if (chatOpen) {
|
if (chatOpen) {
|
||||||
|
// User opened chat manually — cancel the auto-open probe
|
||||||
|
if (probeTimer) { clearTimeout(probeTimer); probeTimer = null; }
|
||||||
if (!chatId) {
|
if (!chatId) {
|
||||||
chatId = String(Math.floor(100000 + Math.random() * 900000));
|
chatId = String(Math.floor(100000 + Math.random() * 900000));
|
||||||
chatAppendMsg('bot', "Hi! I'm your Sales Agent. Ask me about plans, setup, pricing, integrations, or anything about your AI agent.");
|
chatAppendMsg('bot', "Hi! I'm your Sales Agent. Ask me about plans, setup, pricing, integrations, or anything about your AI agent.");
|
||||||
@@ -2442,7 +2665,7 @@
|
|||||||
/* ── Visitor Probe — auto-open after 15s ────────────────── */
|
/* ── Visitor Probe — auto-open after 15s ────────────────── */
|
||||||
(function () {
|
(function () {
|
||||||
let fired = false;
|
let fired = false;
|
||||||
setTimeout(function () {
|
probeTimer = setTimeout(function () {
|
||||||
fetch("https://ipinfo.io/json")
|
fetch("https://ipinfo.io/json")
|
||||||
.then(function (r) { return r.json(); })
|
.then(function (r) { return r.json(); })
|
||||||
.then(function (geo) { fireProbe(geo); })
|
.then(function (geo) { fireProbe(geo); })
|
||||||
@@ -2509,7 +2732,7 @@
|
|||||||
if (!chatId) chatId = cid;
|
if (!chatId) chatId = cid;
|
||||||
chatAppendMsg("bot", reply);
|
chatAppendMsg("bot", reply);
|
||||||
greeted = true;
|
greeted = true;
|
||||||
chatOpenSilent();
|
if (!chatOpen) chatOpenSilent();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function () {});
|
.catch(function () {});
|
||||||
|
|||||||
Reference in New Issue
Block a user