Redesign playground: template tabs, live preview, split pane, mobile responsive
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 13m8s
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 13m8s
- Add 3 pre-built templates (Invoice, Report, Custom HTML) - Split-pane editor with live HTML preview (updates as you type) - Generation timer shows actual response time - Before/after comparison (free watermarked vs Pro clean) - Pro CTA integrated into result panel - Fully responsive: stacks on mobile - Professional polish matching site design language
This commit is contained in:
parent
a178a1b06d
commit
dabf3c1004
6 changed files with 762 additions and 138 deletions
|
|
@ -173,6 +173,35 @@ async function checkout() {
|
|||
}
|
||||
|
||||
// === Demo Playground ===
|
||||
var pgTemplates = {
|
||||
invoice: '<html>\n<head>\n<style>\n body { font-family: Inter, -apple-system, sans-serif; padding: 40px; color: #1a1a2e; }\n .header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }\n .company { font-size: 24px; font-weight: 800; color: #34d399; }\n .invoice-title { font-size: 14px; color: #666; text-transform: uppercase; letter-spacing: 1px; }\n .invoice-num { font-size: 20px; font-weight: 700; }\n .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 40px; }\n .meta-label { font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }\n .meta-value { font-size: 14px; }\n table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }\n th { background: #f8f9fa; padding: 12px 16px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #666; border-bottom: 2px solid #e9ecef; }\n td { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }\n .text-right { text-align: right; }\n .total-row td { font-weight: 700; font-size: 16px; border-top: 2px solid #1a1a2e; border-bottom: none; }\n .footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #e9ecef; font-size: 12px; color: #999; text-align: center; }\n</style>\n</head>\n<body>\n <div class="header">\n <div>\n <div class="company">Acme Corp</div>\n <div style="color:#666;font-size:13px;">123 Business Ave, Suite 100<br>San Francisco, CA 94102</div>\n </div>\n <div style="text-align:right;">\n <div class="invoice-title">Invoice</div>\n <div class="invoice-num">#INV-2024-0042</div>\n <div style="color:#666;font-size:13px;margin-top:4px;">Feb 20, 2026</div>\n </div>\n </div>\n <div class="meta">\n <div><div class="meta-label">Bill To</div><div class="meta-value"><strong>Jane Smith</strong><br>456 Client Road<br>New York, NY 10001</div></div>\n <div><div class="meta-label">Payment Due</div><div class="meta-value">March 20, 2026</div><div class="meta-label" style="margin-top:12px;">Payment Method</div><div class="meta-value">Bank Transfer</div></div>\n </div>\n <table>\n <thead><tr><th>Description</th><th class="text-right">Qty</th><th class="text-right">Rate</th><th class="text-right">Amount</th></tr></thead>\n <tbody>\n <tr><td>Web Development — Landing Page</td><td class="text-right">40 hrs</td><td class="text-right">$150</td><td class="text-right">$6,000</td></tr>\n <tr><td>UI/UX Design — Mockups</td><td class="text-right">16 hrs</td><td class="text-right">$125</td><td class="text-right">$2,000</td></tr>\n <tr><td>API Integration & Testing</td><td class="text-right">24 hrs</td><td class="text-right">$150</td><td class="text-right">$3,600</td></tr>\n <tr class="total-row"><td colspan="3">Total</td><td class="text-right">$11,600</td></tr>\n </tbody>\n </table>\n <div class="footer">Thank you for your business! • Payment terms: Net 30 • Acme Corp</div>\n</body>\n</html>',
|
||||
report: '<html>\n<head>\n<style>\n body { font-family: Inter, -apple-system, sans-serif; padding: 40px; color: #1a1a2e; line-height: 1.6; }\n h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }\n .subtitle { color: #666; font-size: 14px; margin-bottom: 32px; }\n .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }\n .stat { background: #f8f9fa; border-radius: 12px; padding: 20px; text-align: center; }\n .stat-num { font-size: 32px; font-weight: 800; color: #34d399; }\n .stat-label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }\n h2 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #f0f0f0; }\n p { color: #444; font-size: 14px; }\n .highlight { background: linear-gradient(135deg, #34d399 0%, #60a5fa 100%); color: white; border-radius: 12px; padding: 24px; margin: 24px 0; }\n .highlight h3 { font-size: 16px; margin-bottom: 8px; }\n .highlight p { color: rgba(255,255,255,0.9); }\n</style>\n</head>\n<body>\n <h1>Q4 2025 Performance Report</h1>\n <div class="subtitle">Prepared by Analytics Team — February 2026</div>\n <div class="stats">\n <div class="stat"><div class="stat-num">142%</div><div class="stat-label">Revenue Growth</div></div>\n <div class="stat"><div class="stat-num">2.4M</div><div class="stat-label">API Calls</div></div>\n <div class="stat"><div class="stat-num">99.9%</div><div class="stat-label">Uptime</div></div>\n </div>\n <h2>Executive Summary</h2>\n <p>Q4 saw exceptional growth across all key metrics. Customer acquisition increased by 85% while churn decreased to an all-time low of 1.2%. Our expansion into the EU market contributed significantly to revenue gains.</p>\n <div class="highlight">\n <h3>🎯 Key Achievement</h3>\n <p>Crossed 10,000 active users milestone in December, two months ahead of target. Enterprise segment grew 200% QoQ.</p>\n </div>\n <h2>Product Updates</h2>\n <p>Launched 3 major features: batch processing, webhook notifications, and custom templates. Template engine adoption reached 40% of Pro users within the first month.</p>\n <h2>Outlook</h2>\n <p>Q1 2026 focus areas include Markdown-to-PDF improvements, enhanced template library, and SOC 2 certification to unlock enterprise sales pipeline.</p>\n</body>\n</html>',
|
||||
custom: '<html>\n<head>\n<style>\n body {\n font-family: sans-serif;\n padding: 40px;\n }\n h1 { color: #34d399; }\n</style>\n</head>\n<body>\n <h1>Hello World!</h1>\n <p>Edit this HTML and watch the preview update in real time.</p>\n <p>Then click <strong>Generate PDF</strong> to download it.</p>\n</body>\n</html>'
|
||||
};
|
||||
|
||||
var previewDebounce = null;
|
||||
function updatePreview() {
|
||||
var iframe = document.getElementById('demoPreview');
|
||||
var html = document.getElementById('demoHtml').value;
|
||||
if (!iframe) return;
|
||||
var doc = iframe.contentDocument || iframe.contentWindow.document;
|
||||
doc.open();
|
||||
doc.write(html);
|
||||
doc.close();
|
||||
}
|
||||
|
||||
function setTemplate(name) {
|
||||
var ta = document.getElementById('demoHtml');
|
||||
ta.value = pgTemplates[name] || pgTemplates.custom;
|
||||
updatePreview();
|
||||
// Update active tab
|
||||
document.querySelectorAll('.pg-tab').forEach(function(t) {
|
||||
var isActive = t.getAttribute('data-template') === name;
|
||||
t.classList.toggle('active', isActive);
|
||||
t.setAttribute('aria-selected', isActive ? 'true' : 'false');
|
||||
});
|
||||
}
|
||||
|
||||
async function generateDemo() {
|
||||
var btn = document.getElementById('demoGenerateBtn');
|
||||
var status = document.getElementById('demoStatus');
|
||||
|
|
@ -183,14 +212,16 @@ async function generateDemo() {
|
|||
if (!html) {
|
||||
errorEl.textContent = 'Please enter some HTML.';
|
||||
errorEl.style.display = 'block';
|
||||
result.style.display = 'none';
|
||||
result.classList.remove('visible');
|
||||
return;
|
||||
}
|
||||
|
||||
errorEl.style.display = 'none';
|
||||
result.style.display = 'none';
|
||||
result.classList.remove('visible');
|
||||
btn.disabled = true;
|
||||
status.textContent = 'Generating PDF…';
|
||||
btn.classList.add('pg-generating');
|
||||
status.textContent = 'Generating…';
|
||||
var startTime = performance.now();
|
||||
|
||||
try {
|
||||
var res = await fetch('/v1/demo/html', {
|
||||
|
|
@ -204,21 +235,25 @@ async function generateDemo() {
|
|||
errorEl.textContent = data.error || 'Something went wrong.';
|
||||
errorEl.style.display = 'block';
|
||||
btn.disabled = false;
|
||||
btn.classList.remove('pg-generating');
|
||||
status.textContent = '';
|
||||
return;
|
||||
}
|
||||
|
||||
var elapsed = ((performance.now() - startTime) / 1000).toFixed(1);
|
||||
var blob = await res.blob();
|
||||
var url = URL.createObjectURL(blob);
|
||||
var dl = document.getElementById('demoDownload');
|
||||
dl.href = url;
|
||||
result.style.display = 'block';
|
||||
document.getElementById('demoDownload').href = url;
|
||||
document.getElementById('demoTime').textContent = elapsed;
|
||||
result.classList.add('visible');
|
||||
status.textContent = '';
|
||||
btn.disabled = false;
|
||||
btn.classList.remove('pg-generating');
|
||||
} catch (err) {
|
||||
errorEl.textContent = 'Network error. Please try again.';
|
||||
errorEl.style.display = 'block';
|
||||
btn.disabled = false;
|
||||
btn.classList.remove('pg-generating');
|
||||
status.textContent = '';
|
||||
}
|
||||
}
|
||||
|
|
@ -233,6 +268,21 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
// Demo playground
|
||||
document.getElementById('demoGenerateBtn').addEventListener('click', generateDemo);
|
||||
|
||||
// Playground tabs
|
||||
document.querySelectorAll('.pg-tab').forEach(function(tab) {
|
||||
tab.addEventListener('click', function() { setTemplate(this.getAttribute('data-template')); });
|
||||
});
|
||||
// Init with invoice template
|
||||
setTemplate('invoice');
|
||||
// Live preview on input
|
||||
document.getElementById('demoHtml').addEventListener('input', function() {
|
||||
clearTimeout(previewDebounce);
|
||||
previewDebounce = setTimeout(updatePreview, 150);
|
||||
});
|
||||
// Playground checkout button
|
||||
var pgCheckout = document.getElementById('btn-checkout-playground');
|
||||
if (pgCheckout) pgCheckout.addEventListener('click', checkout);
|
||||
|
||||
// Checkout buttons
|
||||
document.getElementById('btn-checkout').addEventListener('click', checkout);
|
||||
var heroCheckout = document.getElementById('btn-checkout-hero');
|
||||
|
|
|
|||
2
public/app.min.js
vendored
2
public/app.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -14,7 +14,6 @@
|
|||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="DocFast API Documentation">
|
||||
<meta name="twitter:description" content="Convert HTML and Markdown to PDF with a simple REST API call.">
|
||||
<meta name="twitter:image" content="https://docfast.dev/og-image.png">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
|
||||
<link rel="stylesheet" href="/swagger-ui/swagger-ui.css">
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -14,12 +14,9 @@
|
|||
<meta name="twitter:title" content="DocFast — HTML & Markdown to PDF API">
|
||||
<meta name="twitter:description" content="Convert HTML and Markdown to beautiful PDFs with a simple API call.">
|
||||
<meta name="twitter:image" content="https://docfast.dev/og-image.png">
|
||||
<link rel="canonical" href="https://docfast.dev/">
|
||||
<link rel="canonical" href="https://docfast.dev">
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"DocFast","url":"https://docfast.dev","applicationCategory":"DeveloperApplication","operatingSystem":"Web","description":"Convert HTML and Markdown to beautiful PDFs with a simple API call. Fast, reliable, developer-friendly.","offers":[{"@type":"Offer","price":"9","priceCurrency":"EUR","name":"Pro","description":"5,000 PDFs/month","billingIncrement":"P1M"}]}
|
||||
</script>
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebApplication","name":"DocFast","url":"https://docfast.dev","browserRequirements":"Requires JavaScript. Requires HTML5.","applicationCategory":"DeveloperApplication","operatingSystem":"All","offers":[{"@type":"Offer","price":"9","priceCurrency":"EUR","name":"Pro","description":"5,000 PDFs per month, priority support","billingIncrement":"P1M"}]}
|
||||
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"DocFast","url":"https://docfast.dev","applicationCategory":"DeveloperApplication","operatingSystem":"Web","description":"Convert HTML and Markdown to beautiful PDFs with a simple API call. Fast, reliable, developer-friendly.","offers":[{"@type":"Offer","price":"9","priceCurrency":"EUR","name":"Pro","description":"5,000 PDFs per month","billingIncrement":"P1M"}]}
|
||||
</script>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
|
||||
<style>
|
||||
|
|
@ -116,7 +113,7 @@ section { position: relative; }
|
|||
.eu-badge { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 20px; transition: border-color 0.2s, transform 0.2s; }
|
||||
.eu-badge:hover { border-color: rgba(52,211,153,0.3); transform: translateY(-2px); }
|
||||
.eu-icon { font-size: 3rem; flex-shrink: 0; }
|
||||
.eu-content h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: var(--fg); }
|
||||
.eu-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: var(--fg); }
|
||||
.eu-content p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; margin: 0; }
|
||||
@media (max-width: 640px) {
|
||||
.eu-badge { flex-direction: column; text-align: center; gap: 16px; padding: 24px; }
|
||||
|
|
@ -140,12 +137,8 @@ footer .container { display: flex; align-items: center; justify-content: space-b
|
|||
.modal .close { position: absolute; top: 16px; right: 20px; color: var(--muted); font-size: 1.4rem; cursor: pointer; background: none; border: none; transition: color 0.2s; }
|
||||
.modal .close:hover { color: var(--fg); }
|
||||
|
||||
/* Signup states */
|
||||
#signupInitial, #signupLoading, #signupVerify, #signupResult { display: none; }
|
||||
#signupInitial.active { display: block; }
|
||||
#signupLoading.active { display: flex; flex-direction: column; align-items: center; padding: 40px 0; text-align: center; }
|
||||
#signupResult.active { display: block; }
|
||||
#signupVerify.active { display: block; }
|
||||
/* Playground */
|
||||
#demoHtml:focus { border-color: var(--accent); outline: none; }
|
||||
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 16px; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
|
|
@ -262,12 +255,65 @@ html, body {
|
|||
#emailChangeResult.active { display: block; }
|
||||
#emailChangeVerify.active { display: block; }
|
||||
|
||||
/* Demo playground */
|
||||
.demo-playground { padding: 80px 0; }
|
||||
.demo-playground textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
/* Playground — redesigned */
|
||||
.playground { padding: 80px 0; }
|
||||
.pg-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
|
||||
.pg-tab { background: var(--card); border: 1px solid var(--border); color: var(--muted); padding: 10px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
|
||||
.pg-tab:hover { border-color: var(--muted); color: var(--fg); }
|
||||
.pg-tab.active { background: rgba(52,211,153,0.08); border-color: var(--accent); color: var(--accent); }
|
||||
.pg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); min-height: 380px; }
|
||||
.pg-editor-pane, .pg-preview-pane { display: flex; flex-direction: column; min-height: 0; }
|
||||
.pg-pane-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #1a1f2b; border-bottom: 1px solid var(--border); }
|
||||
.pg-pane-header-preview { justify-content: space-between; }
|
||||
.pg-pane-dots { display: flex; gap: 5px; }
|
||||
.pg-pane-dots span { width: 8px; height: 8px; border-radius: 50%; }
|
||||
.pg-pane-dots span:nth-child(1) { background: #f87171; }
|
||||
.pg-pane-dots span:nth-child(2) { background: #fbbf24; }
|
||||
.pg-pane-dots span:nth-child(3) { background: #34d399; }
|
||||
.pg-pane-label { font-size: 0.75rem; color: var(--muted); font-family: monospace; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
|
||||
.pg-preview-badge { font-size: 0.65rem; color: var(--accent); background: rgba(52,211,153,0.08); padding: 3px 8px; border-radius: 4px; font-weight: 500; }
|
||||
#demoHtml { flex: 1; width: 100%; padding: 16px; border: none; background: transparent; color: var(--fg); font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 0.82rem; line-height: 1.7; resize: none; outline: none; tab-size: 2; }
|
||||
.pg-preview-pane { border-left: 1px solid var(--border); }
|
||||
.pg-preview-frame-wrap { flex: 1; background: #fff; position: relative; overflow: hidden; }
|
||||
#demoPreview { width: 100%; height: 100%; border: none; background: #fff; }
|
||||
.pg-actions { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
|
||||
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }
|
||||
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
|
||||
.pg-btn-icon { font-size: 1.1rem; }
|
||||
.pg-status { color: var(--muted); font-size: 0.9rem; }
|
||||
.pg-result { display: none; margin-top: 24px; background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 28px; animation: pgSlideIn 0.3s ease; }
|
||||
.pg-result.visible { display: block; }
|
||||
@keyframes pgSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
||||
.pg-result-inner { display: flex; align-items: center; gap: 16px; }
|
||||
.pg-result-icon { font-size: 2rem; }
|
||||
.pg-result-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
|
||||
.pg-result-comparison { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
|
||||
.pg-compare-item { padding: 12px 20px; border-radius: 8px; text-align: center; flex: 1; max-width: 200px; }
|
||||
.pg-compare-free { background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); }
|
||||
.pg-compare-pro { background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.2); }
|
||||
.pg-compare-label { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
|
||||
.pg-compare-free .pg-compare-label { color: #f87171; }
|
||||
.pg-compare-pro .pg-compare-label { color: var(--accent); }
|
||||
.pg-compare-desc { color: var(--muted); font-size: 0.8rem; }
|
||||
.pg-compare-arrow { color: var(--muted); font-size: 1.2rem; font-weight: 700; }
|
||||
.pg-result-cta { text-align: center; margin-top: 20px; }
|
||||
.pg-generating .pg-btn-icon { display: inline-block; animation: spin 0.7s linear infinite; }
|
||||
@media (max-width: 768px) {
|
||||
.pg-split { grid-template-columns: 1fr; min-height: auto; }
|
||||
.pg-preview-pane { border-left: none; border-top: 1px solid var(--border); }
|
||||
.pg-preview-frame-wrap { height: 250px; }
|
||||
#demoHtml { min-height: 200px; }
|
||||
.pg-result-comparison { flex-direction: column; gap: 8px; }
|
||||
.pg-compare-arrow { transform: rotate(90deg); }
|
||||
.pg-compare-item { max-width: 100%; }
|
||||
}
|
||||
@media (max-width: 375px) {
|
||||
.pg-tabs { gap: 4px; }
|
||||
.pg-tab { padding: 8px 12px; font-size: 0.75rem; }
|
||||
}
|
||||
|
||||
/* Focus-visible for accessibility */
|
||||
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
/* Skip to content */
|
||||
.skip-link { position: absolute; top: -100%; left: 16px; background: var(--accent); color: #0b0d11; padding: 8px 16px; border-radius: 0 0 8px 8px; font-weight: 600; font-size: 0.9rem; z-index: 200; transition: top 0.2s; }
|
||||
.skip-link:focus { top: 0; }
|
||||
|
|
@ -277,7 +323,7 @@ html, body {
|
|||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<a href="#main-content" class="skip-link">Skip to main content</a>
|
||||
<a href="#main" class="skip-link">Skip to content</a>
|
||||
|
||||
<nav aria-label="Main navigation">
|
||||
<div class="container">
|
||||
|
|
@ -290,17 +336,16 @@ html, body {
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" id="main-content">
|
||||
<section class="hero">
|
||||
<main class="hero" role="main" id="main">
|
||||
<div class="container">
|
||||
<div class="badge">🚀 Simple PDF API for Developers</div>
|
||||
<h1>HTML to <span class="gradient">PDF</span><br>in one API call</h1>
|
||||
<p>Convert HTML, Markdown, or URLs to pixel-perfect PDFs. Built-in templates for invoices & receipts. No headless browser headaches.</p>
|
||||
<div class="hero-actions">
|
||||
<a href="#demo" class="btn btn-primary" id="btn-try-demo">Try Demo →</a>
|
||||
<button class="btn btn-secondary" id="btn-checkout-hero" aria-label="Get Pro API key">Get Pro API Key — €9/mo</button>
|
||||
<a href="#playground" class="btn btn-primary">Try Demo →</a>
|
||||
<button class="btn btn-secondary" id="btn-checkout-hero">Get Pro API Key — €9/mo</button>
|
||||
</div>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.9rem;">No signup needed for demo • <a href="#" class="open-recover" style="color:var(--accent);">Lost your API key? Recover it →</a></p>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.9rem;">Already have an account? <a href="#" class="open-recover" style="color:var(--accent);">Lost your API key? Recover it →</a></p>
|
||||
|
||||
<div class="code-section">
|
||||
<div class="code-header">
|
||||
|
|
@ -317,7 +362,7 @@ html, body {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<section class="trust">
|
||||
<div class="container">
|
||||
|
|
@ -347,7 +392,7 @@ html, body {
|
|||
<div class="eu-badge">
|
||||
<div class="eu-icon">🇪🇺</div>
|
||||
<div class="eu-content">
|
||||
<h2>Hosted in the EU</h2>
|
||||
<h3>Hosted in the EU</h3>
|
||||
<p>Your data never leaves the EU • GDPR Compliant • Hetzner Germany (Nuremberg)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -393,23 +438,79 @@ html, body {
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section class="playground" id="playground">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Try it — right now</h2>
|
||||
<p class="section-sub">Pick a template or write your own HTML. Generate a real PDF in seconds.</p>
|
||||
|
||||
<!-- Template Tabs -->
|
||||
<div class="pg-tabs" role="tablist">
|
||||
<button class="pg-tab active" data-template="invoice" role="tab" aria-selected="true">📄 Invoice</button>
|
||||
<button class="pg-tab" data-template="report" role="tab" aria-selected="false">📊 Report</button>
|
||||
<button class="pg-tab" data-template="custom" role="tab" aria-selected="false">✏️ Custom HTML</button>
|
||||
</div>
|
||||
|
||||
<!-- Editor + Preview Split -->
|
||||
<div class="pg-split">
|
||||
<div class="pg-editor-pane">
|
||||
<div class="pg-pane-header">
|
||||
<div class="pg-pane-dots" aria-hidden="true"><span></span><span></span><span></span></div>
|
||||
<span class="pg-pane-label">HTML</span>
|
||||
</div>
|
||||
<textarea id="demoHtml" spellcheck="false" aria-label="HTML input for PDF generation"></textarea>
|
||||
</div>
|
||||
<div class="pg-preview-pane">
|
||||
<div class="pg-pane-header pg-pane-header-preview">
|
||||
<span class="pg-pane-label">Live Preview</span>
|
||||
<span class="pg-preview-badge">Updates as you type</span>
|
||||
</div>
|
||||
<div class="pg-preview-frame-wrap">
|
||||
<iframe id="demoPreview" title="Live HTML preview" sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="pg-actions">
|
||||
<button class="btn btn-primary btn-lg" id="demoGenerateBtn">
|
||||
<span class="pg-btn-icon">⚡</span> Generate PDF
|
||||
</button>
|
||||
<span id="demoStatus" class="pg-status"></span>
|
||||
</div>
|
||||
<div class="signup-error" id="demoError" style="margin-top:12px;"></div>
|
||||
|
||||
<!-- Result -->
|
||||
<div id="demoResult" class="pg-result">
|
||||
<div class="pg-result-inner">
|
||||
<div class="pg-result-icon">✅</div>
|
||||
<div class="pg-result-content">
|
||||
<p class="pg-result-title">PDF generated in <span id="demoTime">0.4</span>s</p>
|
||||
<a id="demoDownload" href="#" download="docfast-demo.pdf" class="btn btn-primary btn-sm">Download PDF →</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pg-result-comparison">
|
||||
<div class="pg-compare-item pg-compare-free">
|
||||
<div class="pg-compare-label">🆓 Free Demo</div>
|
||||
<div class="pg-compare-desc">Watermarked output</div>
|
||||
</div>
|
||||
<div class="pg-compare-arrow">→</div>
|
||||
<div class="pg-compare-item pg-compare-pro">
|
||||
<div class="pg-compare-label">⚡ Pro</div>
|
||||
<div class="pg-compare-desc">Clean, production-ready</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pg-result-cta">
|
||||
<button class="btn btn-secondary btn-sm" id="btn-checkout-playground">Get Pro — €9/mo → No watermarks</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="pricing" id="pricing">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Simple, transparent pricing</h2>
|
||||
<p class="section-sub">Try instantly with the demo. Go Pro when you're ready.</p>
|
||||
<div class="pricing-grid" style="grid-template-columns:1fr 1fr;max-width:700px;">
|
||||
<div class="price-card">
|
||||
<div class="price-name">Demo</div>
|
||||
<div class="price-amount" style="font-size:2rem;">Free<span></span></div>
|
||||
<div class="price-desc">Try it out — no signup needed</div>
|
||||
<ul class="price-features">
|
||||
<li>5 PDFs per hour</li>
|
||||
<li>HTML & Markdown to PDF</li>
|
||||
<li>Watermarked output</li>
|
||||
<li>No API key required</li>
|
||||
</ul>
|
||||
<a href="#demo" class="btn btn-secondary" style="width:100%">Try Demo ↓</a>
|
||||
</div>
|
||||
<p class="section-sub">One plan. Everything included. No surprises.</p>
|
||||
<div style="max-width:400px;margin:0 auto;">
|
||||
<div class="price-card featured">
|
||||
<div class="price-name">Pro</div>
|
||||
<div class="price-amount">€9<span> /mo</span></div>
|
||||
|
|
@ -418,47 +519,15 @@ html, body {
|
|||
<li>5,000 PDFs per month</li>
|
||||
<li>All conversion endpoints</li>
|
||||
<li>All templates included</li>
|
||||
<li>Clean PDFs — no watermark</li>
|
||||
<li>No watermarks</li>
|
||||
<li>Priority support (<a href="mailto:support@docfast.dev">support@docfast.dev</a>)</li>
|
||||
</ul>
|
||||
<button class="btn btn-primary" style="width:100%" id="btn-checkout" aria-label="Get started with Pro plan">Get Started →</button>
|
||||
<button class="btn btn-primary" style="width:100%" id="btn-checkout">Get Pro API Key — €9/mo</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="demo-playground" id="demo">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Try it now</h2>
|
||||
<p class="section-sub">Generate a PDF right here — no signup, no API key. 5 free demos per hour.</p>
|
||||
<div style="max-width:700px;margin:0 auto;">
|
||||
<div class="code-header">
|
||||
<div class="code-dots" aria-hidden="true"><span></span><span></span><span></span></div>
|
||||
<span class="code-label">HTML → PDF playground</span>
|
||||
</div>
|
||||
<textarea id="demoHtml" aria-label="HTML input for demo PDF generation" style="width:100%;min-height:180px;padding:20px;background:var(--card);border:1px solid var(--border);border-top:none;color:var(--fg);font-family:'SF Mono','Fira Code',monospace;font-size:0.85rem;line-height:1.7;resize:vertical;border-radius:0;" spellcheck="false"><h1 style="color:#34d399;font-family:sans-serif;">Hello from DocFast!</h1>
|
||||
<p style="font-family:sans-serif;font-size:18px;color:#333;">This is a demo PDF generated via the DocFast API.</p>
|
||||
<ul style="font-family:sans-serif;color:#555;">
|
||||
<li>HTML & Markdown to PDF</li>
|
||||
<li>Sub-second generation</li>
|
||||
<li>EU hosted, GDPR compliant</li>
|
||||
</ul></textarea>
|
||||
<div style="display:flex;gap:12px;align-items:center;margin-top:16px;flex-wrap:wrap;">
|
||||
<button class="btn btn-primary" id="demoGenerateBtn" aria-label="Generate demo PDF">Generate PDF →</button>
|
||||
<span id="demoStatus" style="color:var(--muted);font-size:0.85rem;"></span>
|
||||
</div>
|
||||
<div id="demoResult" style="display:none;margin-top:16px;padding:16px;background:var(--card);border:1px solid var(--accent);border-radius:var(--radius);text-align:center;">
|
||||
<p style="margin-bottom:12px;color:var(--fg);">✅ PDF generated!</p>
|
||||
<a id="demoDownload" href="#" download="demo.pdf" class="btn btn-primary" style="display:inline-flex;">Download PDF ↓</a>
|
||||
<p style="margin-top:12px;color:var(--muted);font-size:0.8rem;">Demo PDFs include a small watermark. <a href="#pricing">Upgrade to Pro</a> for clean output.</p>
|
||||
</div>
|
||||
<div id="demoError" style="display:none;margin-top:16px;padding:14px;background:rgba(248,113,113,0.06);border:1px solid rgba(248,113,113,0.15);border-radius:var(--radius);color:#f87171;font-size:0.9rem;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<footer aria-label="Footer">
|
||||
<div class="container">
|
||||
<div class="footer-left">© 2026 DocFast. Fast PDF generation for developers.</div>
|
||||
|
|
@ -475,16 +544,16 @@ html, body {
|
|||
</footer>
|
||||
|
||||
<!-- Recovery Modal -->
|
||||
<div class="modal-overlay" id="recoverModal" role="dialog" aria-modal="true" aria-label="Recover API key">
|
||||
<div class="modal-overlay" id="recoverModal" role="dialog" aria-label="Recover API key">
|
||||
<div class="modal">
|
||||
<button class="close" id="btn-close-recover" aria-label="Close dialog">×</button>
|
||||
<button class="close" id="btn-close-recover">×</button>
|
||||
|
||||
<div id="recoverInitial" class="active">
|
||||
<h2>Recover your API key</h2>
|
||||
<p>Enter the email you signed up with. We'll send a verification code.</p>
|
||||
<div class="signup-error" id="recoverError"></div>
|
||||
<input type="email" id="recoverEmailInput" aria-label="Email address" placeholder="your.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverBtn" aria-label="Send verification code">Send Verification Code →</button>
|
||||
<input type="email" id="recoverEmailInput" placeholder="your.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverBtn">Send Verification Code →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">Your key will be shown here after verification — never sent via email</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -497,8 +566,8 @@ html, body {
|
|||
<h2>Enter verification code</h2>
|
||||
<p>We sent a 6-digit code to <strong id="recoverEmailDisplay"></strong></p>
|
||||
<div class="signup-error" id="recoverVerifyError"></div>
|
||||
<input type="text" id="recoverCode" aria-label="Verification code" placeholder="123456" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" style="width:100%;padding:14px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:1.4rem;letter-spacing:0.3em;text-align:center;margin-bottom:16px;font-family:monospace;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverVerifyBtn" aria-label="Verify recovery code">Verify →</button>
|
||||
<input type="text" id="recoverCode" placeholder="123456" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" style="width:100%;padding:14px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:1.4rem;letter-spacing:0.3em;text-align:center;margin-bottom:16px;font-family:monospace;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverVerifyBtn">Verify →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">Code expires in 15 minutes</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -510,7 +579,7 @@ html, body {
|
|||
</div>
|
||||
<div style="background:var(--bg);border:1px solid var(--accent);border-radius:8px;padding:14px;font-family:monospace;font-size:0.82rem;word-break:break-all;margin:16px 0;position:relative;">
|
||||
<span id="recoveredKeyText"></span>
|
||||
<button onclick="copyRecoveredKey()" id="copyRecoveredBtn" aria-label="Copy recovered API key" style="position:absolute;top:8px;right:8px;background:var(--accent);color:var(--bg);border:none;border-radius:4px;padding:4px 12px;cursor:pointer;font-size:0.8rem;">Copy</button>
|
||||
<button onclick="copyRecoveredKey()" id="copyRecoveredBtn" style="position:absolute;top:8px;right:8px;background:var(--accent);color:var(--bg);border:none;border-radius:4px;padding:4px 12px;cursor:pointer;font-size:0.8rem;">Copy</button>
|
||||
</div>
|
||||
<p style="margin-top:20px;color:var(--muted);font-size:0.9rem;"><a href="/docs">Read the docs →</a></p>
|
||||
</div>
|
||||
|
|
@ -519,17 +588,17 @@ html, body {
|
|||
|
||||
|
||||
<!-- Email Change Modal -->
|
||||
<div class="modal-overlay" id="emailChangeModal" role="dialog" aria-modal="true" aria-label="Change email">
|
||||
<div class="modal-overlay" id="emailChangeModal" role="dialog" aria-label="Change email">
|
||||
<div class="modal">
|
||||
<button class="close" id="btn-close-email-change" aria-label="Close dialog">×</button>
|
||||
<button class="close" id="btn-close-email-change">×</button>
|
||||
|
||||
<div id="emailChangeInitial" class="active">
|
||||
<h2>Change your email</h2>
|
||||
<p>Enter your API key and new email address.</p>
|
||||
<div class="signup-error" id="emailChangeError"></div>
|
||||
<input type="text" id="emailChangeApiKey" aria-label="API key" placeholder="Your API key (df_free_... or df_pro_...)" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:12px;font-family:monospace;" required>
|
||||
<input type="email" id="emailChangeNewEmail" aria-label="New email address" placeholder="new.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="emailChangeBtn" aria-label="Send verification code for email change">Send Verification Code →</button>
|
||||
<input type="text" id="emailChangeApiKey" placeholder="Your API key (df_free_... or df_pro_...)" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:12px;font-family:monospace;" required>
|
||||
<input type="email" id="emailChangeNewEmail" placeholder="new.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="emailChangeBtn">Send Verification Code →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">A verification code will be sent to your new email</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -542,8 +611,8 @@ html, body {
|
|||
<h2>Enter verification code</h2>
|
||||
<p>We sent a 6-digit code to <strong id="emailChangeEmailDisplay"></strong></p>
|
||||
<div class="signup-error" id="emailChangeVerifyError"></div>
|
||||
<input type="text" id="emailChangeCode" aria-label="Verification code" placeholder="123456" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" style="width:100%;padding:14px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:1.4rem;letter-spacing:0.3em;text-align:center;margin-bottom:16px;font-family:monospace;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="emailChangeVerifyBtn" aria-label="Verify email change code">Verify →</button>
|
||||
<input type="text" id="emailChangeCode" placeholder="123456" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" style="width:100%;padding:14px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:1.4rem;letter-spacing:0.3em;text-align:center;margin-bottom:16px;font-family:monospace;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="emailChangeVerifyBtn">Verify →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">Code expires in 15 minutes</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,23 +14,329 @@
|
|||
<meta name="twitter:title" content="DocFast — HTML & Markdown to PDF API">
|
||||
<meta name="twitter:description" content="Convert HTML and Markdown to beautiful PDFs with a simple API call.">
|
||||
<meta name="twitter:image" content="https://docfast.dev/og-image.png">
|
||||
<link rel="canonical" href="https://docfast.dev/">
|
||||
<link rel="canonical" href="https://docfast.dev">
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"DocFast","url":"https://docfast.dev","applicationCategory":"DeveloperApplication","operatingSystem":"Web","description":"Convert HTML and Markdown to beautiful PDFs with a simple API call. Fast, reliable, developer-friendly.","offers":[{"@type":"Offer","price":"9","priceCurrency":"EUR","name":"Pro","description":"5,000 PDFs per month","billingIncrement":"P1M"}]}
|
||||
</script>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
|
||||
{{> styles_base}}
|
||||
{{> styles_index_extra}}
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
:root {
|
||||
--bg: #0b0d11; --bg2: #12151c; --fg: #e4e7ed; --muted: #7a8194;
|
||||
--accent: #34d399; --accent-hover: #5eead4; --accent-glow: rgba(52,211,153,0.12);
|
||||
--accent2: #60a5fa; --card: #151922; --border: #1e2433;
|
||||
--radius: 12px; --radius-lg: 16px;
|
||||
}
|
||||
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
|
||||
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
|
||||
a:hover { color: var(--accent-hover); }
|
||||
.container { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
|
||||
|
||||
/* Nav */
|
||||
nav { padding: 20px 0; border-bottom: 1px solid var(--border); }
|
||||
nav .container { display: flex; align-items: center; justify-content: space-between; }
|
||||
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
|
||||
.logo span { color: var(--accent); }
|
||||
.nav-links { display: flex; gap: 28px; align-items: center; }
|
||||
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
|
||||
.nav-links a:hover { color: var(--fg); }
|
||||
|
||||
/* Hero */
|
||||
.hero { padding: 100px 0 80px; text-align: center; position: relative; }
|
||||
.hero::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%); pointer-events: none; }
|
||||
.badge { display: inline-block; padding: 6px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; color: var(--accent); background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); margin-bottom: 24px; letter-spacing: 0.3px; }
|
||||
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 20px; letter-spacing: -1.5px; line-height: 1.15; }
|
||||
.hero h1 .gradient { background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
|
||||
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
|
||||
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
|
||||
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; transition: all 0.2s; border: none; cursor: pointer; text-decoration: none; }
|
||||
.btn-primary { background: var(--accent); color: #0b0d11; }
|
||||
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(52,211,153,0.2); }
|
||||
.btn-secondary { border: 1px solid var(--border); color: var(--fg); background: transparent; }
|
||||
.btn-secondary:hover { border-color: var(--muted); text-decoration: none; background: rgba(255,255,255,0.03); }
|
||||
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
|
||||
|
||||
/* Code block */
|
||||
.code-section { margin: 56px auto 0; max-width: 660px; text-align: left; display: flex; flex-direction: column; }
|
||||
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #1a1f2b; border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
|
||||
.code-dots { display: flex; gap: 6px; }
|
||||
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
|
||||
.code-dots span:nth-child(1) { background: #f87171; }
|
||||
.code-dots span:nth-child(2) { background: #fbbf24; }
|
||||
.code-dots span:nth-child(3) { background: #34d399; }
|
||||
.code-label { font-size: 0.75rem; color: var(--muted); font-family: monospace; }
|
||||
.code-block { background: var(--card); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); padding: 24px 28px; font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 0.85rem; line-height: 1.85; overflow-x: auto; }
|
||||
.code-block .c { color: #4a5568; }
|
||||
.code-block .s { color: var(--accent); }
|
||||
.code-block .k { color: var(--accent2); }
|
||||
.code-block .f { color: #c084fc; }
|
||||
|
||||
/* Sections */
|
||||
section { position: relative; }
|
||||
.section-title { text-align: center; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
|
||||
.section-sub { text-align: center; color: var(--muted); margin-bottom: 48px; font-size: 1.05rem; }
|
||||
|
||||
/* Features */
|
||||
.features { padding: 80px 0; }
|
||||
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
|
||||
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }
|
||||
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: border-color 0.2s, transform 0.2s; }
|
||||
.feature-card:hover { border-color: rgba(52,211,153,0.3); transform: translateY(-2px); }
|
||||
.feature-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 16px; background: rgba(52,211,153,0.08); }
|
||||
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
|
||||
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
|
||||
|
||||
/* Pricing */
|
||||
.pricing { padding: 80px 0; }
|
||||
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 700px; margin: 0 auto; }
|
||||
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
|
||||
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; position: relative; }
|
||||
.price-card.featured { border-color: var(--accent); }
|
||||
.price-card.featured::before { content: 'POPULAR'; position: absolute; top: -10px; right: 20px; background: var(--accent); color: #0b0d11; font-size: 0.65rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; letter-spacing: 0.5px; }
|
||||
.price-name { font-size: 0.9rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
|
||||
.price-amount { font-size: 3rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 4px; }
|
||||
.price-amount span { font-size: 1rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
|
||||
.price-desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
|
||||
.price-features { list-style: none; margin-bottom: 28px; }
|
||||
.price-features li { padding: 5px 0; color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
|
||||
.price-features li::before { content: "✓"; color: var(--accent); font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
|
||||
|
||||
/* Trust */
|
||||
.trust { padding: 60px 0 40px; }
|
||||
.trust-grid { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
|
||||
.trust-item { text-align: center; flex: 1; min-width: 160px; max-width: 220px; }
|
||||
.trust-num { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
|
||||
.trust-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
|
||||
|
||||
/* EU Hosting */
|
||||
.eu-hosting { padding: 40px 0 80px; }
|
||||
.eu-badge { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 20px; transition: border-color 0.2s, transform 0.2s; }
|
||||
.eu-badge:hover { border-color: rgba(52,211,153,0.3); transform: translateY(-2px); }
|
||||
.eu-icon { font-size: 3rem; flex-shrink: 0; }
|
||||
.eu-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: var(--fg); }
|
||||
.eu-content p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; margin: 0; }
|
||||
@media (max-width: 640px) {
|
||||
.eu-badge { flex-direction: column; text-align: center; gap: 16px; padding: 24px; }
|
||||
.eu-icon { font-size: 2.5rem; }
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
footer { padding: 40px 0; border-top: 1px solid var(--border); }
|
||||
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
|
||||
.footer-left { color: var(--muted); font-size: 0.85rem; }
|
||||
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
|
||||
.footer-links a { color: var(--muted); font-size: 0.85rem; }
|
||||
.footer-links a:hover { color: var(--fg); }
|
||||
|
||||
/* Modal */
|
||||
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); z-index: 100; align-items: center; justify-content: center; }
|
||||
.modal-overlay.active { display: flex; }
|
||||
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; max-width: 460px; width: 90%; position: relative; }
|
||||
.modal h2 { margin-bottom: 8px; font-size: 1.4rem; font-weight: 700; }
|
||||
.modal p { color: var(--muted); margin-bottom: 24px; font-size: 0.95rem; }
|
||||
.modal .close { position: absolute; top: 16px; right: 20px; color: var(--muted); font-size: 1.4rem; cursor: pointer; background: none; border: none; transition: color 0.2s; }
|
||||
.modal .close:hover { color: var(--fg); }
|
||||
|
||||
/* Playground */
|
||||
#demoHtml:focus { border-color: var(--accent); outline: none; }
|
||||
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 16px; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
|
||||
.key-box { background: var(--bg); border: 1px solid var(--accent); border-radius: 8px; padding: 16px; font-family: monospace; font-size: 0.82rem; word-break: break-all; margin: 16px 0 12px; position: relative; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
||||
.key-box:hover { background: #151922; }
|
||||
.key-text { flex: 1; }
|
||||
.copy-btn { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: var(--accent); border-radius: 6px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
|
||||
.copy-btn:hover { background: rgba(52,211,153,0.2); }
|
||||
.warning-box { background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.15); border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: #fbbf24; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
|
||||
.warning-box .icon { font-size: 1.1rem; flex-shrink: 0; }
|
||||
.signup-error { color: #f87171; font-size: 0.85rem; margin-bottom: 16px; display: none; padding: 10px 14px; background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); border-radius: 8px; }
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 640px) {
|
||||
.hero { padding: 72px 0 56px; }
|
||||
.nav-links { gap: 16px; }
|
||||
.code-block {
|
||||
font-size: 0.75rem;
|
||||
padding: 18px 16px;
|
||||
overflow-x: hidden;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.trust-grid { gap: 24px; }
|
||||
.footer-links { gap: 16px; }
|
||||
footer .container { flex-direction: column; text-align: center; }
|
||||
}
|
||||
|
||||
/* Fix mobile terminal gaps at 375px and smaller */
|
||||
@media (max-width: 375px) {
|
||||
.container {
|
||||
padding: 0 12px !important;
|
||||
}
|
||||
.code-section {
|
||||
margin: 32px auto 0;
|
||||
max-width: calc(100vw - 24px) !important;
|
||||
}
|
||||
.code-header {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
.code-block {
|
||||
padding: 12px !important;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
.hero {
|
||||
padding: 56px 0 40px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Additional mobile overflow fixes */
|
||||
html, body {
|
||||
overflow-x: hidden !important;
|
||||
max-width: 100vw !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
* {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
body {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
.container {
|
||||
overflow-x: hidden !important;
|
||||
max-width: 100vw !important;
|
||||
padding: 0 16px !important;
|
||||
}
|
||||
.code-section {
|
||||
max-width: calc(100vw - 32px) !important;
|
||||
overflow: hidden !important;
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
white-space: normal !important;
|
||||
}
|
||||
.code-block {
|
||||
overflow-x: hidden !important;
|
||||
white-space: pre-wrap !important;
|
||||
word-break: break-all !important;
|
||||
max-width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
.trust-grid {
|
||||
justify-content: center !important;
|
||||
overflow-x: hidden !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
/* Force any wide elements to fit */
|
||||
pre, code, .code-block {
|
||||
max-width: calc(100vw - 32px) !important;
|
||||
overflow-wrap: break-word !important;
|
||||
word-break: break-all !important;
|
||||
white-space: pre-wrap !important;
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
.code-section {
|
||||
max-width: calc(100vw - 32px) !important;
|
||||
overflow-x: hidden !important;
|
||||
white-space: normal !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Recovery modal states */
|
||||
#recoverInitial, #recoverLoading, #recoverVerify, #recoverResult { display: none; }
|
||||
#recoverInitial.active { display: block; }
|
||||
#recoverLoading.active { display: flex; flex-direction: column; align-items: center; padding: 40px 0; text-align: center; }
|
||||
#recoverResult.active { display: block; }
|
||||
#recoverVerify.active { display: block; }
|
||||
|
||||
/* Email change modal states */
|
||||
#emailChangeInitial, #emailChangeLoading, #emailChangeVerify, #emailChangeResult { display: none; }
|
||||
#emailChangeInitial.active { display: block; }
|
||||
#emailChangeLoading.active { display: flex; flex-direction: column; align-items: center; padding: 40px 0; text-align: center; }
|
||||
#emailChangeResult.active { display: block; }
|
||||
#emailChangeVerify.active { display: block; }
|
||||
|
||||
/* Playground — redesigned */
|
||||
.playground { padding: 80px 0; }
|
||||
.pg-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
|
||||
.pg-tab { background: var(--card); border: 1px solid var(--border); color: var(--muted); padding: 10px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
|
||||
.pg-tab:hover { border-color: var(--muted); color: var(--fg); }
|
||||
.pg-tab.active { background: rgba(52,211,153,0.08); border-color: var(--accent); color: var(--accent); }
|
||||
.pg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); min-height: 380px; }
|
||||
.pg-editor-pane, .pg-preview-pane { display: flex; flex-direction: column; min-height: 0; }
|
||||
.pg-pane-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #1a1f2b; border-bottom: 1px solid var(--border); }
|
||||
.pg-pane-header-preview { justify-content: space-between; }
|
||||
.pg-pane-dots { display: flex; gap: 5px; }
|
||||
.pg-pane-dots span { width: 8px; height: 8px; border-radius: 50%; }
|
||||
.pg-pane-dots span:nth-child(1) { background: #f87171; }
|
||||
.pg-pane-dots span:nth-child(2) { background: #fbbf24; }
|
||||
.pg-pane-dots span:nth-child(3) { background: #34d399; }
|
||||
.pg-pane-label { font-size: 0.75rem; color: var(--muted); font-family: monospace; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
|
||||
.pg-preview-badge { font-size: 0.65rem; color: var(--accent); background: rgba(52,211,153,0.08); padding: 3px 8px; border-radius: 4px; font-weight: 500; }
|
||||
#demoHtml { flex: 1; width: 100%; padding: 16px; border: none; background: transparent; color: var(--fg); font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 0.82rem; line-height: 1.7; resize: none; outline: none; tab-size: 2; }
|
||||
.pg-preview-pane { border-left: 1px solid var(--border); }
|
||||
.pg-preview-frame-wrap { flex: 1; background: #fff; position: relative; overflow: hidden; }
|
||||
#demoPreview { width: 100%; height: 100%; border: none; background: #fff; }
|
||||
.pg-actions { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
|
||||
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }
|
||||
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
|
||||
.pg-btn-icon { font-size: 1.1rem; }
|
||||
.pg-status { color: var(--muted); font-size: 0.9rem; }
|
||||
.pg-result { display: none; margin-top: 24px; background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 28px; animation: pgSlideIn 0.3s ease; }
|
||||
.pg-result.visible { display: block; }
|
||||
@keyframes pgSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
||||
.pg-result-inner { display: flex; align-items: center; gap: 16px; }
|
||||
.pg-result-icon { font-size: 2rem; }
|
||||
.pg-result-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
|
||||
.pg-result-comparison { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
|
||||
.pg-compare-item { padding: 12px 20px; border-radius: 8px; text-align: center; flex: 1; max-width: 200px; }
|
||||
.pg-compare-free { background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); }
|
||||
.pg-compare-pro { background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.2); }
|
||||
.pg-compare-label { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
|
||||
.pg-compare-free .pg-compare-label { color: #f87171; }
|
||||
.pg-compare-pro .pg-compare-label { color: var(--accent); }
|
||||
.pg-compare-desc { color: var(--muted); font-size: 0.8rem; }
|
||||
.pg-compare-arrow { color: var(--muted); font-size: 1.2rem; font-weight: 700; }
|
||||
.pg-result-cta { text-align: center; margin-top: 20px; }
|
||||
.pg-generating .pg-btn-icon { display: inline-block; animation: spin 0.7s linear infinite; }
|
||||
@media (max-width: 768px) {
|
||||
.pg-split { grid-template-columns: 1fr; min-height: auto; }
|
||||
.pg-preview-pane { border-left: none; border-top: 1px solid var(--border); }
|
||||
.pg-preview-frame-wrap { height: 250px; }
|
||||
#demoHtml { min-height: 200px; }
|
||||
.pg-result-comparison { flex-direction: column; gap: 8px; }
|
||||
.pg-compare-arrow { transform: rotate(90deg); }
|
||||
.pg-compare-item { max-width: 100%; }
|
||||
}
|
||||
@media (max-width: 375px) {
|
||||
.pg-tabs { gap: 4px; }
|
||||
.pg-tab { padding: 8px 12px; font-size: 0.75rem; }
|
||||
}
|
||||
|
||||
/* Focus-visible for accessibility */
|
||||
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
/* Skip to content */
|
||||
.skip-link { position: absolute; top: -100%; left: 16px; background: var(--accent); color: #0b0d11; padding: 8px 16px; border-radius: 0 0 8px 8px; font-weight: 600; font-size: 0.9rem; z-index: 200; transition: top 0.2s; }
|
||||
.skip-link:focus { top: 0; }
|
||||
</style>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<a href="#main" class="skip-link">Skip to content</a>
|
||||
|
||||
{{> nav}}
|
||||
<nav aria-label="Main navigation">
|
||||
<div class="container">
|
||||
<a href="/" class="logo">⚡ Doc<span>Fast</span></a>
|
||||
<div class="nav-links">
|
||||
<a href="#features">Features</a>
|
||||
<a href="#pricing">Pricing</a>
|
||||
<a href="/docs">Docs</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" id="main-content">
|
||||
<section class="hero">
|
||||
<main class="hero" role="main" id="main">
|
||||
<div class="container">
|
||||
<div class="badge">🚀 Simple PDF API for Developers</div>
|
||||
<h1>HTML to <span class="gradient">PDF</span><br>in one API call</h1>
|
||||
|
|
@ -56,7 +362,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<section class="trust">
|
||||
<div class="container">
|
||||
|
|
@ -86,7 +392,7 @@
|
|||
<div class="eu-badge">
|
||||
<div class="eu-icon">🇪🇺</div>
|
||||
<div class="eu-content">
|
||||
<h2>Hosted in the EU</h2>
|
||||
<h3>Hosted in the EU</h3>
|
||||
<p>Your data never leaves the EU • GDPR Compliant • Hetzner Germany (Nuremberg)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -132,20 +438,69 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section class="playground" id="playground" style="padding:80px 0;">
|
||||
<section class="playground" id="playground">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Try it now</h2>
|
||||
<p class="section-sub">Paste HTML, get a watermarked PDF. No signup required.</p>
|
||||
<div style="max-width:660px;margin:0 auto;">
|
||||
<textarea id="demoHtml" rows="6" placeholder="<h1>Hello World</h1><p>Paste your HTML here…</p>" style="width:100%;padding:16px;border:1px solid var(--border);background:var(--card);color:var(--fg);border-radius:var(--radius);font-family:'SF Mono','Fira Code',monospace;font-size:0.85rem;resize:vertical;margin-bottom:16px;"></textarea>
|
||||
<div style="display:flex;gap:12px;align-items:center;flex-wrap:wrap;">
|
||||
<button class="btn btn-primary" id="demoGenerateBtn">Generate PDF →</button>
|
||||
<span id="demoStatus" style="color:var(--muted);font-size:0.9rem;"></span>
|
||||
<h2 class="section-title">Try it — right now</h2>
|
||||
<p class="section-sub">Pick a template or write your own HTML. Generate a real PDF in seconds.</p>
|
||||
|
||||
<!-- Template Tabs -->
|
||||
<div class="pg-tabs" role="tablist">
|
||||
<button class="pg-tab active" data-template="invoice" role="tab" aria-selected="true">📄 Invoice</button>
|
||||
<button class="pg-tab" data-template="report" role="tab" aria-selected="false">📊 Report</button>
|
||||
<button class="pg-tab" data-template="custom" role="tab" aria-selected="false">✏️ Custom HTML</button>
|
||||
</div>
|
||||
|
||||
<!-- Editor + Preview Split -->
|
||||
<div class="pg-split">
|
||||
<div class="pg-editor-pane">
|
||||
<div class="pg-pane-header">
|
||||
<div class="pg-pane-dots" aria-hidden="true"><span></span><span></span><span></span></div>
|
||||
<span class="pg-pane-label">HTML</span>
|
||||
</div>
|
||||
<textarea id="demoHtml" spellcheck="false" aria-label="HTML input for PDF generation"></textarea>
|
||||
</div>
|
||||
<div class="signup-error" id="demoError" style="margin-top:12px;"></div>
|
||||
<div id="demoResult" style="display:none;margin-top:16px;padding:16px;background:var(--card);border:1px solid var(--accent);border-radius:var(--radius);">
|
||||
<p style="margin:0;">✅ PDF generated! <a id="demoDownload" href="#" download="docfast-demo.pdf" style="font-weight:600;">Download PDF →</a></p>
|
||||
<p style="margin:8px 0 0;color:var(--muted);font-size:0.85rem;">Demo PDFs include a watermark. Get a Pro key for clean output.</p>
|
||||
<div class="pg-preview-pane">
|
||||
<div class="pg-pane-header pg-pane-header-preview">
|
||||
<span class="pg-pane-label">Live Preview</span>
|
||||
<span class="pg-preview-badge">Updates as you type</span>
|
||||
</div>
|
||||
<div class="pg-preview-frame-wrap">
|
||||
<iframe id="demoPreview" title="Live HTML preview" sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="pg-actions">
|
||||
<button class="btn btn-primary btn-lg" id="demoGenerateBtn">
|
||||
<span class="pg-btn-icon">⚡</span> Generate PDF
|
||||
</button>
|
||||
<span id="demoStatus" class="pg-status"></span>
|
||||
</div>
|
||||
<div class="signup-error" id="demoError" style="margin-top:12px;"></div>
|
||||
|
||||
<!-- Result -->
|
||||
<div id="demoResult" class="pg-result">
|
||||
<div class="pg-result-inner">
|
||||
<div class="pg-result-icon">✅</div>
|
||||
<div class="pg-result-content">
|
||||
<p class="pg-result-title">PDF generated in <span id="demoTime">0.4</span>s</p>
|
||||
<a id="demoDownload" href="#" download="docfast-demo.pdf" class="btn btn-primary btn-sm">Download PDF →</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pg-result-comparison">
|
||||
<div class="pg-compare-item pg-compare-free">
|
||||
<div class="pg-compare-label">🆓 Free Demo</div>
|
||||
<div class="pg-compare-desc">Watermarked output</div>
|
||||
</div>
|
||||
<div class="pg-compare-arrow">→</div>
|
||||
<div class="pg-compare-item pg-compare-pro">
|
||||
<div class="pg-compare-label">⚡ Pro</div>
|
||||
<div class="pg-compare-desc">Clean, production-ready</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pg-result-cta">
|
||||
<button class="btn btn-secondary btn-sm" id="btn-checkout-playground">Get Pro — €9/mo → No watermarks</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -167,28 +522,38 @@
|
|||
<li>No watermarks</li>
|
||||
<li>Priority support (<a href="mailto:support@docfast.dev">support@docfast.dev</a>)</li>
|
||||
</ul>
|
||||
<button class="btn btn-primary" style="width:100%" id="btn-checkout" aria-label="Get Pro API key">Get Pro API Key — €9/mo</button>
|
||||
<button class="btn btn-primary" style="width:100%" id="btn-checkout">Get Pro API Key — €9/mo</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
{{> footer}}
|
||||
<footer aria-label="Footer">
|
||||
<div class="container">
|
||||
<div class="footer-left">© 2026 DocFast. Fast PDF generation for developers.</div>
|
||||
<div class="footer-links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/docs">Docs</a>
|
||||
<a href="/health">API Status</a>
|
||||
<a href="mailto:support@docfast.dev">Support</a>
|
||||
<a href="/impressum">Impressum</a>
|
||||
<a href="/privacy">Privacy Policy</a>
|
||||
<a href="/terms">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Recovery Modal -->
|
||||
<div class="modal-overlay" id="recoverModal" role="dialog" aria-modal="true" aria-label="Recover API key">
|
||||
<div class="modal-overlay" id="recoverModal" role="dialog" aria-label="Recover API key">
|
||||
<div class="modal">
|
||||
<button class="close" id="btn-close-recover" aria-label="Close">×</button>
|
||||
<button class="close" id="btn-close-recover">×</button>
|
||||
|
||||
<div id="recoverInitial" class="active">
|
||||
<h2>Recover your API key</h2>
|
||||
<p>Enter the email you signed up with. We'll send a verification code.</p>
|
||||
<div class="signup-error" id="recoverError"></div>
|
||||
<label for="recoverEmailInput" class="sr-only">Email address</label>
|
||||
<input type="email" id="recoverEmailInput" placeholder="your.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverBtn" aria-label="Send verification code">Send Verification Code →</button>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverBtn">Send Verification Code →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">Your key will be shown here after verification — never sent via email</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -201,9 +566,8 @@
|
|||
<h2>Enter verification code</h2>
|
||||
<p>We sent a 6-digit code to <strong id="recoverEmailDisplay"></strong></p>
|
||||
<div class="signup-error" id="recoverVerifyError"></div>
|
||||
<label for="recoverCode" class="sr-only">Verification code</label>
|
||||
<input type="text" id="recoverCode" placeholder="123456" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" style="width:100%;padding:14px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:1.4rem;letter-spacing:0.3em;text-align:center;margin-bottom:16px;font-family:monospace;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverVerifyBtn" aria-label="Verify recovery code">Verify →</button>
|
||||
<button class="btn btn-primary" style="width:100%" id="recoverVerifyBtn">Verify →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">Code expires in 15 minutes</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -215,7 +579,7 @@
|
|||
</div>
|
||||
<div style="background:var(--bg);border:1px solid var(--accent);border-radius:8px;padding:14px;font-family:monospace;font-size:0.82rem;word-break:break-all;margin:16px 0;position:relative;">
|
||||
<span id="recoveredKeyText"></span>
|
||||
<button onclick="copyRecoveredKey()" id="copyRecoveredBtn" aria-label="Copy recovered API key" style="position:absolute;top:8px;right:8px;background:var(--accent);color:var(--bg);border:none;border-radius:4px;padding:4px 12px;cursor:pointer;font-size:0.8rem;">Copy</button>
|
||||
<button onclick="copyRecoveredKey()" id="copyRecoveredBtn" style="position:absolute;top:8px;right:8px;background:var(--accent);color:var(--bg);border:none;border-radius:4px;padding:4px 12px;cursor:pointer;font-size:0.8rem;">Copy</button>
|
||||
</div>
|
||||
<p style="margin-top:20px;color:var(--muted);font-size:0.9rem;"><a href="/docs">Read the docs →</a></p>
|
||||
</div>
|
||||
|
|
@ -223,7 +587,43 @@
|
|||
</div>
|
||||
|
||||
|
||||
<script src="/app.min.js"></script>
|
||||
<!-- Email Change Modal -->
|
||||
<div class="modal-overlay" id="emailChangeModal" role="dialog" aria-label="Change email">
|
||||
<div class="modal">
|
||||
<button class="close" id="btn-close-email-change">×</button>
|
||||
|
||||
<div id="emailChangeInitial" class="active">
|
||||
<h2>Change your email</h2>
|
||||
<p>Enter your API key and new email address.</p>
|
||||
<div class="signup-error" id="emailChangeError"></div>
|
||||
<input type="text" id="emailChangeApiKey" placeholder="Your API key (df_free_... or df_pro_...)" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:12px;font-family:monospace;" required>
|
||||
<input type="email" id="emailChangeNewEmail" placeholder="new.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="emailChangeBtn">Send Verification Code →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">A verification code will be sent to your new email</p>
|
||||
</div>
|
||||
|
||||
<div id="emailChangeLoading">
|
||||
<div class="spinner"></div>
|
||||
<p style="color:var(--muted);margin:0">Sending verification code…</p>
|
||||
</div>
|
||||
|
||||
<div id="emailChangeVerify">
|
||||
<h2>Enter verification code</h2>
|
||||
<p>We sent a 6-digit code to <strong id="emailChangeEmailDisplay"></strong></p>
|
||||
<div class="signup-error" id="emailChangeVerifyError"></div>
|
||||
<input type="text" id="emailChangeCode" placeholder="123456" maxlength="6" pattern="[0-9]{6}" inputmode="numeric" style="width:100%;padding:14px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:1.4rem;letter-spacing:0.3em;text-align:center;margin-bottom:16px;font-family:monospace;" required>
|
||||
<button class="btn btn-primary" style="width:100%" id="emailChangeVerifyBtn">Verify →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">Code expires in 15 minutes</p>
|
||||
</div>
|
||||
|
||||
<div id="emailChangeResult">
|
||||
<h2>✅ Email updated!</h2>
|
||||
<p>Your account email has been changed to <strong id="emailChangeNewDisplay"></strong></p>
|
||||
<p style="margin-top:20px;color:var(--muted);font-size:0.9rem;"><a href="/docs">Read the docs →</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/app.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -255,6 +255,63 @@ html, body {
|
|||
#emailChangeResult.active { display: block; }
|
||||
#emailChangeVerify.active { display: block; }
|
||||
|
||||
/* Playground — redesigned */
|
||||
.playground { padding: 80px 0; }
|
||||
.pg-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
|
||||
.pg-tab { background: var(--card); border: 1px solid var(--border); color: var(--muted); padding: 10px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
|
||||
.pg-tab:hover { border-color: var(--muted); color: var(--fg); }
|
||||
.pg-tab.active { background: rgba(52,211,153,0.08); border-color: var(--accent); color: var(--accent); }
|
||||
.pg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); min-height: 380px; }
|
||||
.pg-editor-pane, .pg-preview-pane { display: flex; flex-direction: column; min-height: 0; }
|
||||
.pg-pane-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #1a1f2b; border-bottom: 1px solid var(--border); }
|
||||
.pg-pane-header-preview { justify-content: space-between; }
|
||||
.pg-pane-dots { display: flex; gap: 5px; }
|
||||
.pg-pane-dots span { width: 8px; height: 8px; border-radius: 50%; }
|
||||
.pg-pane-dots span:nth-child(1) { background: #f87171; }
|
||||
.pg-pane-dots span:nth-child(2) { background: #fbbf24; }
|
||||
.pg-pane-dots span:nth-child(3) { background: #34d399; }
|
||||
.pg-pane-label { font-size: 0.75rem; color: var(--muted); font-family: monospace; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
|
||||
.pg-preview-badge { font-size: 0.65rem; color: var(--accent); background: rgba(52,211,153,0.08); padding: 3px 8px; border-radius: 4px; font-weight: 500; }
|
||||
#demoHtml { flex: 1; width: 100%; padding: 16px; border: none; background: transparent; color: var(--fg); font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 0.82rem; line-height: 1.7; resize: none; outline: none; tab-size: 2; }
|
||||
.pg-preview-pane { border-left: 1px solid var(--border); }
|
||||
.pg-preview-frame-wrap { flex: 1; background: #fff; position: relative; overflow: hidden; }
|
||||
#demoPreview { width: 100%; height: 100%; border: none; background: #fff; }
|
||||
.pg-actions { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
|
||||
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }
|
||||
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
|
||||
.pg-btn-icon { font-size: 1.1rem; }
|
||||
.pg-status { color: var(--muted); font-size: 0.9rem; }
|
||||
.pg-result { display: none; margin-top: 24px; background: var(--card); border: 1px solid var(--accent); border-radius: var(--radius-lg); padding: 28px; animation: pgSlideIn 0.3s ease; }
|
||||
.pg-result.visible { display: block; }
|
||||
@keyframes pgSlideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
||||
.pg-result-inner { display: flex; align-items: center; gap: 16px; }
|
||||
.pg-result-icon { font-size: 2rem; }
|
||||
.pg-result-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
|
||||
.pg-result-comparison { display: flex; align-items: center; gap: 16px; justify-content: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
|
||||
.pg-compare-item { padding: 12px 20px; border-radius: 8px; text-align: center; flex: 1; max-width: 200px; }
|
||||
.pg-compare-free { background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); }
|
||||
.pg-compare-pro { background: rgba(52,211,153,0.06); border: 1px solid rgba(52,211,153,0.2); }
|
||||
.pg-compare-label { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
|
||||
.pg-compare-free .pg-compare-label { color: #f87171; }
|
||||
.pg-compare-pro .pg-compare-label { color: var(--accent); }
|
||||
.pg-compare-desc { color: var(--muted); font-size: 0.8rem; }
|
||||
.pg-compare-arrow { color: var(--muted); font-size: 1.2rem; font-weight: 700; }
|
||||
.pg-result-cta { text-align: center; margin-top: 20px; }
|
||||
.pg-generating .pg-btn-icon { display: inline-block; animation: spin 0.7s linear infinite; }
|
||||
@media (max-width: 768px) {
|
||||
.pg-split { grid-template-columns: 1fr; min-height: auto; }
|
||||
.pg-preview-pane { border-left: none; border-top: 1px solid var(--border); }
|
||||
.pg-preview-frame-wrap { height: 250px; }
|
||||
#demoHtml { min-height: 200px; }
|
||||
.pg-result-comparison { flex-direction: column; gap: 8px; }
|
||||
.pg-compare-arrow { transform: rotate(90deg); }
|
||||
.pg-compare-item { max-width: 100%; }
|
||||
}
|
||||
@media (max-width: 375px) {
|
||||
.pg-tabs { gap: 4px; }
|
||||
.pg-tab { padding: 8px 12px; font-size: 0.75rem; }
|
||||
}
|
||||
|
||||
/* Focus-visible for accessibility */
|
||||
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
/* Skip to content */
|
||||
|
|
@ -381,20 +438,69 @@ html, body {
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section class="playground" id="playground" style="padding:80px 0;">
|
||||
<section class="playground" id="playground">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Try it now</h2>
|
||||
<p class="section-sub">Paste HTML, get a watermarked PDF. No signup required.</p>
|
||||
<div style="max-width:660px;margin:0 auto;">
|
||||
<textarea id="demoHtml" rows="6" placeholder="<h1>Hello World</h1><p>Paste your HTML here…</p>" style="width:100%;padding:16px;border:1px solid var(--border);background:var(--card);color:var(--fg);border-radius:var(--radius);font-family:'SF Mono','Fira Code',monospace;font-size:0.85rem;resize:vertical;margin-bottom:16px;"></textarea>
|
||||
<div style="display:flex;gap:12px;align-items:center;flex-wrap:wrap;">
|
||||
<button class="btn btn-primary" id="demoGenerateBtn">Generate PDF →</button>
|
||||
<span id="demoStatus" style="color:var(--muted);font-size:0.9rem;"></span>
|
||||
<h2 class="section-title">Try it — right now</h2>
|
||||
<p class="section-sub">Pick a template or write your own HTML. Generate a real PDF in seconds.</p>
|
||||
|
||||
<!-- Template Tabs -->
|
||||
<div class="pg-tabs" role="tablist">
|
||||
<button class="pg-tab active" data-template="invoice" role="tab" aria-selected="true">📄 Invoice</button>
|
||||
<button class="pg-tab" data-template="report" role="tab" aria-selected="false">📊 Report</button>
|
||||
<button class="pg-tab" data-template="custom" role="tab" aria-selected="false">✏️ Custom HTML</button>
|
||||
</div>
|
||||
|
||||
<!-- Editor + Preview Split -->
|
||||
<div class="pg-split">
|
||||
<div class="pg-editor-pane">
|
||||
<div class="pg-pane-header">
|
||||
<div class="pg-pane-dots" aria-hidden="true"><span></span><span></span><span></span></div>
|
||||
<span class="pg-pane-label">HTML</span>
|
||||
</div>
|
||||
<textarea id="demoHtml" spellcheck="false" aria-label="HTML input for PDF generation"></textarea>
|
||||
</div>
|
||||
<div class="signup-error" id="demoError" style="margin-top:12px;"></div>
|
||||
<div id="demoResult" style="display:none;margin-top:16px;padding:16px;background:var(--card);border:1px solid var(--accent);border-radius:var(--radius);">
|
||||
<p style="margin:0;">✅ PDF generated! <a id="demoDownload" href="#" download="docfast-demo.pdf" style="font-weight:600;">Download PDF →</a></p>
|
||||
<p style="margin:8px 0 0;color:var(--muted);font-size:0.85rem;">Demo PDFs include a watermark. Get a Pro key for clean output.</p>
|
||||
<div class="pg-preview-pane">
|
||||
<div class="pg-pane-header pg-pane-header-preview">
|
||||
<span class="pg-pane-label">Live Preview</span>
|
||||
<span class="pg-preview-badge">Updates as you type</span>
|
||||
</div>
|
||||
<div class="pg-preview-frame-wrap">
|
||||
<iframe id="demoPreview" title="Live HTML preview" sandbox="allow-same-origin"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="pg-actions">
|
||||
<button class="btn btn-primary btn-lg" id="demoGenerateBtn">
|
||||
<span class="pg-btn-icon">⚡</span> Generate PDF
|
||||
</button>
|
||||
<span id="demoStatus" class="pg-status"></span>
|
||||
</div>
|
||||
<div class="signup-error" id="demoError" style="margin-top:12px;"></div>
|
||||
|
||||
<!-- Result -->
|
||||
<div id="demoResult" class="pg-result">
|
||||
<div class="pg-result-inner">
|
||||
<div class="pg-result-icon">✅</div>
|
||||
<div class="pg-result-content">
|
||||
<p class="pg-result-title">PDF generated in <span id="demoTime">0.4</span>s</p>
|
||||
<a id="demoDownload" href="#" download="docfast-demo.pdf" class="btn btn-primary btn-sm">Download PDF →</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pg-result-comparison">
|
||||
<div class="pg-compare-item pg-compare-free">
|
||||
<div class="pg-compare-label">🆓 Free Demo</div>
|
||||
<div class="pg-compare-desc">Watermarked output</div>
|
||||
</div>
|
||||
<div class="pg-compare-arrow">→</div>
|
||||
<div class="pg-compare-item pg-compare-pro">
|
||||
<div class="pg-compare-label">⚡ Pro</div>
|
||||
<div class="pg-compare-desc">Clean, production-ready</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pg-result-cta">
|
||||
<button class="btn btn-secondary btn-sm" id="btn-checkout-playground">Get Pro — €9/mo → No watermarks</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue