Polish landing page: modern design, new signup flow (no email), trust signals, responsive
This commit is contained in:
parent
3c0bac889a
commit
b0766c82bc
2 changed files with 257 additions and 178 deletions
|
|
@ -1,28 +1,26 @@
|
|||
function showState(state) {
|
||||
['signupInitial', 'signupLoading', 'signupResult'].forEach(function(id) {
|
||||
document.getElementById(id).classList.remove('active');
|
||||
});
|
||||
document.getElementById(state).classList.add('active');
|
||||
}
|
||||
|
||||
function openSignup() {
|
||||
document.getElementById('signupModal').classList.add('active');
|
||||
document.getElementById('signupForm').style.display = 'block';
|
||||
document.getElementById('keyResult').style.display = 'none';
|
||||
showState('signupInitial');
|
||||
document.getElementById('signupError').style.display = 'none';
|
||||
document.getElementById('signupBtn').textContent = 'Get API Key';
|
||||
document.getElementById('signupBtn').disabled = false;
|
||||
}
|
||||
|
||||
function closeSignup() {
|
||||
document.getElementById('signupModal').classList.remove('active');
|
||||
}
|
||||
|
||||
// Close on overlay click
|
||||
document.getElementById('signupModal').addEventListener('click', function(e) {
|
||||
if (e.target === this) closeSignup();
|
||||
});
|
||||
|
||||
async function submitSignup() {
|
||||
var errEl = document.getElementById('signupError');
|
||||
var btn = document.getElementById('signupBtn');
|
||||
|
||||
btn.textContent = 'Creating...';
|
||||
btn.disabled = true;
|
||||
errEl.style.display = 'none';
|
||||
btn.disabled = true;
|
||||
showState('signupLoading');
|
||||
|
||||
try {
|
||||
var res = await fetch('/v1/signup/free', {
|
||||
|
|
@ -30,43 +28,32 @@ async function submitSignup() {
|
|||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({})
|
||||
});
|
||||
|
||||
if (res.status === 429) {
|
||||
errEl.textContent = 'Too many requests. Please try again in a few minutes.';
|
||||
errEl.style.display = 'block';
|
||||
btn.textContent = 'Get API Key';
|
||||
btn.disabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var data = await res.json();
|
||||
|
||||
if (!res.ok) {
|
||||
showState('signupInitial');
|
||||
errEl.textContent = data.error || 'Something went wrong. Please try again.';
|
||||
errEl.style.display = 'block';
|
||||
btn.textContent = 'Get API Key';
|
||||
btn.disabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Show key
|
||||
document.getElementById('signupForm').style.display = 'none';
|
||||
document.getElementById('keyResult').style.display = 'block';
|
||||
document.getElementById('apiKeyDisplay').textContent = data.apiKey;
|
||||
document.getElementById('apiKeyText').textContent = data.apiKey;
|
||||
showState('signupResult');
|
||||
} catch (err) {
|
||||
showState('signupInitial');
|
||||
errEl.textContent = 'Network error. Please try again.';
|
||||
errEl.style.display = 'block';
|
||||
btn.textContent = 'Get API Key';
|
||||
btn.disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function copyKey() {
|
||||
var key = document.getElementById('apiKeyDisplay').textContent;
|
||||
var hint = document.querySelector('.copy-hint');
|
||||
var key = document.getElementById('apiKeyText').textContent;
|
||||
var btn = document.getElementById('copyBtn');
|
||||
function showCopied() {
|
||||
hint.textContent = '✓ Copied!';
|
||||
setTimeout(function() { hint.textContent = 'Click to copy'; }, 2000);
|
||||
btn.textContent = '✓ Copied!';
|
||||
setTimeout(function() { btn.textContent = 'Copy'; }, 2000);
|
||||
}
|
||||
try {
|
||||
navigator.clipboard.writeText(key).then(showCopied).catch(function() {
|
||||
|
|
@ -87,18 +74,28 @@ async function checkout() {
|
|||
var res = await fetch('/v1/billing/checkout', { method: 'POST' });
|
||||
var data = await res.json();
|
||||
if (data.url) window.location.href = data.url;
|
||||
else alert('Something went wrong. Please try again.');
|
||||
else alert('Checkout is not available yet. Please try again later.');
|
||||
} catch (err) {
|
||||
alert('Something went wrong. Please try again.');
|
||||
}
|
||||
}
|
||||
|
||||
// BUG-005 fix: attach all click handlers via JS instead of inline onclick
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('btn-signup').addEventListener('click', openSignup);
|
||||
document.getElementById('btn-signup-2').addEventListener('click', openSignup);
|
||||
document.getElementById('btn-checkout').addEventListener('click', checkout);
|
||||
document.getElementById('btn-close-signup').addEventListener('click', closeSignup);
|
||||
document.getElementById('signupBtn').addEventListener('click', submitSignup);
|
||||
document.getElementById('apiKeyDisplay').addEventListener('click', copyKey);
|
||||
document.getElementById('copyBtn').addEventListener('click', copyKey);
|
||||
document.getElementById('signupModal').addEventListener('click', function(e) {
|
||||
if (e.target === this) closeSignup();
|
||||
});
|
||||
// Smooth scroll for nav links
|
||||
document.querySelectorAll('a[href^="#"]').forEach(function(a) {
|
||||
a.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
var el = document.querySelector(this.getAttribute('href'));
|
||||
if (el) el.scrollIntoView({ behavior: 'smooth' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,207 +5,273 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>DocFast — HTML & Markdown to PDF API</title>
|
||||
<meta name="description" content="Convert HTML and Markdown to beautiful PDFs with a simple API call. Built-in invoice templates. Fast, reliable, developer-friendly.">
|
||||
<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>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
:root { --bg: #0a0a0a; --fg: #e8e8e8; --muted: #888; --accent: #4f9; --accent2: #3ad; --card: #141414; --border: #222; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.6; }
|
||||
a { color: var(--accent); text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
|
||||
: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; }
|
||||
.hero h1 { font-size: 3rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -1px; }
|
||||
.hero h1 span { color: var(--accent); }
|
||||
.hero p { font-size: 1.25rem; color: var(--muted); max-width: 600px; margin: 0 auto 40px; }
|
||||
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
|
||||
.btn { display: inline-block; padding: 14px 32px; border-radius: 8px; font-size: 1rem; font-weight: 600; transition: all 0.2s; border: none; cursor: pointer; }
|
||||
.btn-primary { background: var(--accent); color: #000; }
|
||||
.btn-primary:hover { background: #6fb; text-decoration: none; }
|
||||
.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; }
|
||||
.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-hero { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px 32px; margin: 48px auto 0; max-width: 640px; text-align: left; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.9rem; overflow-x: auto; }
|
||||
.code-hero .comment { color: #666; }
|
||||
.code-hero .string { color: var(--accent); }
|
||||
.code-hero .key { color: var(--accent2); }
|
||||
.code-section { margin: 56px auto 0; max-width: 660px; text-align: left; }
|
||||
.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 h2 { text-align: center; font-size: 2rem; margin-bottom: 48px; }
|
||||
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
|
||||
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 32px; }
|
||||
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
|
||||
.feature-card p { color: var(--muted); font-size: 0.95rem; }
|
||||
.feature-icon { font-size: 1.5rem; margin-bottom: 12px; }
|
||||
.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 h2 { text-align: center; font-size: 2rem; margin-bottom: 12px; }
|
||||
.pricing .subtitle { text-align: center; color: var(--muted); margin-bottom: 48px; }
|
||||
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 700px; margin: 0 auto; }
|
||||
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 32px; text-align: center; }
|
||||
.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 h3 { font-size: 1.2rem; margin-bottom: 8px; }
|
||||
.price-amount { font-size: 2.5rem; font-weight: 700; margin: 16px 0; }
|
||||
.price-amount span { font-size: 1rem; color: var(--muted); font-weight: 400; }
|
||||
.price-features { list-style: none; text-align: left; margin: 24px 0; }
|
||||
.price-features li { padding: 6px 0; color: var(--muted); font-size: 0.95rem; }
|
||||
.price-features li::before { content: "✓ "; 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; }
|
||||
|
||||
/* Endpoints */
|
||||
.endpoints { padding: 80px 0; }
|
||||
.endpoints h2 { text-align: center; font-size: 2rem; margin-bottom: 48px; }
|
||||
.endpoint { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px 32px; margin-bottom: 16px; }
|
||||
.endpoint-method { display: inline-block; background: #1a3a20; color: var(--accent); font-family: monospace; font-size: 0.85rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; margin-right: 8px; }
|
||||
.endpoint-path { font-family: monospace; font-size: 0.95rem; }
|
||||
.endpoint-desc { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
|
||||
/* Trust */
|
||||
.trust { padding: 60px 0 80px; }
|
||||
.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; }
|
||||
|
||||
/* Footer */
|
||||
footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); }
|
||||
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; }
|
||||
.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.7); z-index: 100; align-items: center; justify-content: center; }
|
||||
.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: 16px; padding: 40px; max-width: 440px; width: 90%; }
|
||||
.modal h2 { margin-bottom: 8px; font-size: 1.5rem; }
|
||||
.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 input { width: 100%; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); font-size: 1rem; margin-bottom: 16px; outline: none; }
|
||||
.modal input:focus { border-color: var(--accent); }
|
||||
.modal .btn { width: 100%; text-align: center; }
|
||||
.modal .error { color: #f66; font-size: 0.85rem; margin-bottom: 12px; display: none; }
|
||||
.modal .close { position: absolute; top: 16px; right: 20px; color: var(--muted); font-size: 1.5rem; cursor: pointer; background: none; border: none; }
|
||||
.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); }
|
||||
|
||||
/* Key result */
|
||||
.key-result { display: none; }
|
||||
.key-result .key-box { background: var(--bg); border: 1px solid var(--accent); border-radius: 8px; padding: 16px; font-family: monospace; font-size: 0.85rem; word-break: break-all; margin: 16px 0; cursor: pointer; transition: background 0.2s; }
|
||||
.key-result .key-box:hover { background: #111; }
|
||||
.key-result .copy-hint { color: var(--muted); font-size: 0.8rem; text-align: center; }
|
||||
/* Signup states */
|
||||
#signupInitial, #signupLoading, #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; }
|
||||
.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; }
|
||||
.trust-grid { gap: 24px; }
|
||||
}
|
||||
</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>
|
||||
|
||||
<nav>
|
||||
<div class="container">
|
||||
<div class="logo">⚡ Doc<span>Fast</span></div>
|
||||
<div class="nav-links">
|
||||
<a href="#features">Features</a>
|
||||
<a href="#pricing">Pricing</a>
|
||||
<a href="/docs">Docs</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="hero">
|
||||
<div class="container">
|
||||
<h1>HTML & Markdown to <span>PDF</span></h1>
|
||||
<p>One API call. Beautiful PDFs. Built-in invoice templates. No headless browser setup, no dependencies, no hassle.</p>
|
||||
<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">
|
||||
<button class="btn btn-primary" id="btn-signup">Get Free API Key</button>
|
||||
<a href="/docs" class="btn btn-secondary">View Docs</a>
|
||||
<button class="btn btn-primary" id="btn-signup">Get Free API Key →</button>
|
||||
<a href="/docs" class="btn btn-secondary">Read the Docs</a>
|
||||
</div>
|
||||
<div class="code-hero">
|
||||
<span class="comment">// Convert markdown to PDF in one call</span><br>
|
||||
<span class="key">curl</span> -X POST https://docfast.dev/v1/convert/markdown \<br>
|
||||
-H <span class="string">"Authorization: Bearer YOUR_KEY"</span> \<br>
|
||||
-H <span class="string">"Content-Type: application/json"</span> \<br>
|
||||
-d <span class="string">'{"markdown": "# Invoice\\n\\nAmount: $500"}'</span> \<br>
|
||||
-o invoice.pdf
|
||||
|
||||
<div class="code-section">
|
||||
<div class="code-header">
|
||||
<div class="code-dots"><span></span><span></span><span></span></div>
|
||||
<span class="code-label">terminal</span>
|
||||
</div>
|
||||
<div class="code-block">
|
||||
<span class="c"># Convert HTML to PDF — it's that simple</span>
|
||||
<span class="k">curl</span> <span class="f">-X POST</span> https://docfast.dev/v1/convert/html \
|
||||
-H <span class="s">"Authorization: Bearer YOUR_KEY"</span> \
|
||||
-H <span class="s">"Content-Type: application/json"</span> \
|
||||
-d <span class="s">'{"html": "<h1>Hello World</h1><p>Your first PDF</p>"}'</span> \
|
||||
-o <span class="f">output.pdf</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="features">
|
||||
<section class="trust">
|
||||
<div class="container">
|
||||
<h2>Why DocFast?</h2>
|
||||
<div class="trust-grid">
|
||||
<div class="trust-item">
|
||||
<div class="trust-num"><1s</div>
|
||||
<div class="trust-label">Avg. generation time</div>
|
||||
</div>
|
||||
<div class="trust-item">
|
||||
<div class="trust-num">99.9%</div>
|
||||
<div class="trust-label">Uptime SLA</div>
|
||||
</div>
|
||||
<div class="trust-item">
|
||||
<div class="trust-num">HTTPS</div>
|
||||
<div class="trust-label">Encrypted & secure</div>
|
||||
</div>
|
||||
<div class="trust-item">
|
||||
<div class="trust-num">0 bytes</div>
|
||||
<div class="trust-label">Data stored on disk</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="features" id="features">
|
||||
<div class="container">
|
||||
<h2 class="section-title">Everything you need</h2>
|
||||
<p class="section-sub">A complete PDF generation API. No SDKs, no dependencies, no setup.</p>
|
||||
<div class="features-grid">
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">⚡</div>
|
||||
<h3>Fast</h3>
|
||||
<p>Sub-second PDF generation. Persistent browser pool means no cold starts.</p>
|
||||
<h3>Sub-second Speed</h3>
|
||||
<p>Persistent browser pool — no cold starts. Your PDFs are ready before your spinner shows.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">🎨</div>
|
||||
<h3>Beautiful Output</h3>
|
||||
<p>Full CSS support. Custom fonts, colors, layouts. Your PDFs, your brand.</p>
|
||||
<h3>Pixel-perfect Output</h3>
|
||||
<p>Full CSS support including flexbox, grid, and custom fonts. Your brand, your PDFs.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">📄</div>
|
||||
<h3>Templates</h3>
|
||||
<p>Built-in invoice and receipt templates. Pass data, get PDF. No HTML needed.</p>
|
||||
<h3>Built-in Templates</h3>
|
||||
<p>Invoice and receipt templates out of the box. Pass JSON data, get beautiful PDFs.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">🔧</div>
|
||||
<h3>Simple API</h3>
|
||||
<p>REST API with JSON in, PDF out. Works with any language. No SDKs required.</p>
|
||||
<h3>Dead-simple API</h3>
|
||||
<p>REST API. JSON in, PDF out. Works with curl, Python, Node, Go — anything with HTTP.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">📐</div>
|
||||
<h3>Flexible</h3>
|
||||
<p>A4, Letter, custom sizes. Portrait or landscape. Configurable margins.</p>
|
||||
<h3>Fully Configurable</h3>
|
||||
<p>A4, Letter, custom sizes. Portrait or landscape. Headers, footers, and margins.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon">🔒</div>
|
||||
<h3>Secure</h3>
|
||||
<p>Your data is never stored. PDFs are generated and streamed — nothing hits disk.</p>
|
||||
<h3>Secure by Default</h3>
|
||||
<p>HTTPS only. Rate limiting. No data stored. PDFs stream directly — nothing touches disk.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="endpoints" id="endpoints">
|
||||
<div class="container">
|
||||
<h2>API Endpoints</h2>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">POST</span>
|
||||
<span class="endpoint-path">/v1/convert/html</span>
|
||||
<div class="endpoint-desc">Convert raw HTML (with optional CSS) to PDF.</div>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">POST</span>
|
||||
<span class="endpoint-path">/v1/convert/markdown</span>
|
||||
<div class="endpoint-desc">Convert Markdown to styled PDF with syntax highlighting.</div>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">POST</span>
|
||||
<span class="endpoint-path">/v1/convert/url</span>
|
||||
<div class="endpoint-desc">Navigate to a URL and convert the page to PDF.</div>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/v1/templates</span>
|
||||
<div class="endpoint-desc">List available document templates with field definitions.</div>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">POST</span>
|
||||
<span class="endpoint-path">/v1/templates/:id/render</span>
|
||||
<div class="endpoint-desc">Render a template (invoice, receipt) with your data to PDF.</div>
|
||||
</div>
|
||||
<div class="endpoint">
|
||||
<span class="endpoint-method">GET</span>
|
||||
<span class="endpoint-path">/health</span>
|
||||
<div class="endpoint-desc">Health check — verify the API is running.</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="pricing" id="pricing">
|
||||
<div class="container">
|
||||
<h2>Simple Pricing</h2>
|
||||
<p class="subtitle">No per-page fees. No hidden limits. Pay for what you use.</p>
|
||||
<h2 class="section-title">Simple, transparent pricing</h2>
|
||||
<p class="section-sub">Start free. Upgrade when you're ready. No surprise charges.</p>
|
||||
<div class="pricing-grid">
|
||||
<div class="price-card">
|
||||
<h3>Free</h3>
|
||||
<div class="price-amount">$0<span>/mo</span></div>
|
||||
<div class="price-name">Free</div>
|
||||
<div class="price-amount">$0<span> /mo</span></div>
|
||||
<div class="price-desc">Perfect for side projects and testing</div>
|
||||
<ul class="price-features">
|
||||
<li>100 PDFs / month</li>
|
||||
<li>All endpoints</li>
|
||||
<li>All templates</li>
|
||||
<li>Community support</li>
|
||||
<li>100 PDFs per month</li>
|
||||
<li>All conversion endpoints</li>
|
||||
<li>All templates included</li>
|
||||
<li>Rate limiting: 10 req/min</li>
|
||||
</ul>
|
||||
<button class="btn btn-secondary" style="width:100%" id="btn-signup-2">Get Free Key</button>
|
||||
<button class="btn btn-secondary" style="width:100%" id="btn-signup-2">Get Free API Key</button>
|
||||
</div>
|
||||
<div class="price-card featured">
|
||||
<h3>Pro</h3>
|
||||
<div class="price-amount">$9<span>/mo</span></div>
|
||||
<div class="price-name">Pro</div>
|
||||
<div class="price-amount">$9<span> /mo</span></div>
|
||||
<div class="price-desc">For production apps and businesses</div>
|
||||
<ul class="price-features">
|
||||
<li>10,000 PDFs / month</li>
|
||||
<li>All endpoints</li>
|
||||
<li>All templates</li>
|
||||
<li>10,000 PDFs per month</li>
|
||||
<li>All conversion endpoints</li>
|
||||
<li>All templates included</li>
|
||||
<li>Priority support</li>
|
||||
<li>Custom templates</li>
|
||||
</ul>
|
||||
<button class="btn btn-primary" style="width:100%" id="btn-checkout">Get Started</button>
|
||||
<button class="btn btn-primary" style="width:100%" id="btn-checkout">Get Started →</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -213,27 +279,43 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.
|
|||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>DocFast © 2026 — Fast PDF generation for developers</p>
|
||||
<div class="footer-left">© 2026 DocFast. Fast PDF generation for developers.</div>
|
||||
<div class="footer-links">
|
||||
<a href="/docs">Docs</a>
|
||||
<a href="/health">API Status</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Signup Modal -->
|
||||
<div class="modal-overlay" id="signupModal">
|
||||
<div class="modal" style="position:relative">
|
||||
<div class="modal">
|
||||
<button class="close" id="btn-close-signup">×</button>
|
||||
<div id="signupForm">
|
||||
<h2>Get Your Free API Key</h2>
|
||||
<p>One click. No email, no credit card.</p>
|
||||
<div class="error" id="signupError"></div>
|
||||
<button class="btn btn-primary" style="width:100%" id="signupBtn">Get API Key</button>
|
||||
|
||||
<div id="signupInitial" class="active">
|
||||
<h2>Get your free API key</h2>
|
||||
<p>No email, no credit card. Click the button and you're in.</p>
|
||||
<div class="signup-error" id="signupError"></div>
|
||||
<button class="btn btn-primary" style="width:100%" id="signupBtn">Generate API Key →</button>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">100 free PDFs/month • All endpoints included</p>
|
||||
</div>
|
||||
<div class="key-result" id="keyResult">
|
||||
|
||||
<div id="signupLoading">
|
||||
<div class="spinner"></div>
|
||||
<p style="color:var(--muted);margin:0">Generating your API key…</p>
|
||||
</div>
|
||||
|
||||
<div id="signupResult">
|
||||
<h2>🚀 You're in!</h2>
|
||||
<p>Here's your API key:</p>
|
||||
<div class="key-box" id="apiKeyDisplay" title="Click to copy"></div>
|
||||
<div class="copy-hint">Click to copy</div>
|
||||
<p style="margin-top:12px;color:#f66;font-size:0.9rem;font-weight:600;">⚠️ Save your API key — we can't recover it later.</p>
|
||||
<p style="margin-top:16px;color:var(--muted);font-size:0.9rem;">100 free PDFs/month • All endpoints • <a href="/docs">View docs →</a></p>
|
||||
<div class="warning-box">
|
||||
<span class="icon">⚠️</span>
|
||||
<span>Save your API key now — we can't recover it later.</span>
|
||||
</div>
|
||||
<div class="key-box" id="apiKeyDisplay">
|
||||
<span class="key-text" id="apiKeyText"></span>
|
||||
<button class="copy-btn" id="copyBtn">Copy</button>
|
||||
</div>
|
||||
<p style="margin-top:20px;color:var(--muted);font-size:0.9rem;">100 free PDFs/month • <a href="/docs">Read the docs →</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue