Ads readiness, lead delivery, project inventory

- SEO/ads: title, description, canonical, OG 1200x630, JSON-LD, robots, sitemap, .htaccess
- Privacy policy page with operator data; server-side consent check; cookie reset in footer
- Metrika loads only after cookie consent; goals lead / email_click / phone_click; utm and yclid stored with the lead
- Form delivery: store, Telegram, SMTP, webhook; config presets; dev stub
- Project window shows public sections only; Moba copy rewritten
- Fix 14 px horizontal overflow in the filter bar on phones
- Move history to archive/; add docs/project-inventory.md and docs/lead-delivery.md
This commit is contained in:
FastD committed 2026-11-10 18:22:55 +03:00
1 parent e352335822
commit b60d00d55c
47 files changed
+1665 -202

No files matched your search

+13 -6
View File
@@ -1,7 +1,8 @@
// Local dev stub for the contact form endpoint.
// Usage: node api/dev-stub.mjs (listens on http://127.0.0.1:8787)
// Point the form's API_URL to http://127.0.0.1:8787/ during development.
// Same JSON contract as api/contact.php, but logs instead of sending to Telegram.
// Point the form's API_URL to http://127.0.0.1:8787/ during development:
// <form id="contact-form" data-endpoint="http://127.0.0.1:8787/api/contact.php" …>
// Same JSON contract as api/contact.php, but logs instead of delivering.
import { createServer } from 'node:http';
const PORT = Number(process.env.PORT) || 8787;
@@ -27,17 +28,23 @@ createServer((req, res) => {
const name = String(body.name ?? '').trim();
const contact = String(body.contact ?? '').trim();
const message = String(body.message ?? '').trim();
if (!name || !contact || !message) {
return send(res, 422, false, 'name, contact, message — обязательные поля.');
}
const consent = body.consent === true;
const meta = body.meta && typeof body.meta === 'object' ? body.meta : {};
if (!consent) return send(res, 422, false, 'Отметьте согласие на обработку персональных данных.');
if (name.length < 2 || name.length > 100) return send(res, 422, false, 'Укажите имя (2–100 символов).');
if (contact.length < 2 || contact.length > 200) return send(res, 422, false, 'Укажите предпочтительное средство связи (2–200 символов).');
if (message.length < 10 || message.length > 4000) return send(res, 422, false, 'Опишите задачу (10–4000 символов).');
console.log('\n=== НОВОЕ СООБЩЕНИЕ (stub) ===');
console.log('Имя: ', name);
console.log('Связь: ', contact);
console.log('Задача: ', message);
if (Object.keys(meta).length) console.log('Мета: ', JSON.stringify(meta));
console.log('================================\n');
send(res, 200, true, 'Сообщение отправлено (stub). Мы ответим в ближайшее время.');
});
}).listen(PORT, HOST, () => {
console.log(`Contact stub: http://${HOST}:${PORT}`);
console.log('POST JSON {name, contact, message}');
console.log('POST JSON {name, contact, message, consent, website, meta}');
});