Implementierung von SEO-Inhalten und Anpassung der Benutzeroberfläche für den Single Chat
All checks were successful
Deploy SingleChat / deploy (push) Successful in 41s
All checks were successful
Deploy SingleChat / deploy (push) Successful in 41s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { readFileSync, existsSync } from 'fs';
|
||||
import { join, resolve } from 'path';
|
||||
import { loadFeedback } from './feedback-store.js';
|
||||
import { SEO_HOME_CONTENT } from '../client/src/content/seoHome.js';
|
||||
|
||||
const SITE_URL = 'https://www.ypchat.net';
|
||||
const DEFAULT_IMAGE = `${SITE_URL}/static/favicon.png`;
|
||||
@@ -498,18 +499,15 @@ function buildLocalizedLandingContent(route, __dirname) {
|
||||
</section>`;
|
||||
}
|
||||
|
||||
function buildHomeSeoContent() {
|
||||
return `<section lang="de" style="max-width:960px;margin:24px auto;padding:0 16px;font:400 16px/1.6 sans-serif;color:#344038;">
|
||||
function buildHomeSeoContent(localeCode = 'de') {
|
||||
const content = SEO_HOME_CONTENT[localeCode] || SEO_HOME_CONTENT.de;
|
||||
const topics = content.topics.map((topic) => `<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">${escapeHtml(topic.title)}</h2><p style="margin:0;">${escapeHtml(topic.text)}</p></article>`).join('');
|
||||
|
||||
return `<section lang="${escapeHtml(localeCode)}" style="max-width:960px;margin:24px auto;padding:0 16px;font:400 16px/1.6 sans-serif;color:#344038;">
|
||||
<p style="font:700 12px/1.2 sans-serif;color:#637067;text-transform:uppercase;margin:0 0 6px;">YPChat</p>
|
||||
<h1 style="font:700 34px/1.15 sans-serif;color:#18201b;margin:0 0 12px;">Kostenloser Single Chat ohne Anmeldung</h1>
|
||||
<p style="margin:0 0 18px;max-width:760px;">Bei YPChat kannst du kostenlos neue Singles kennenlernen, privat schreiben und direkt mit einem Nicknamen starten. Für den Einstieg wählst du Nickname, Alter, Geschlecht und Land – eine lange Registrierung ist nicht nötig.</p>
|
||||
<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;">
|
||||
<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Singles kennenlernen</h2><p style="margin:0;">Suche nach passenden Kontakten und beginne Gespräche in deinem Tempo.</p></article>
|
||||
<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Privat und respektvoll chatten</h2><p style="margin:0;">Private Unterhaltungen, Bilder im Chat sowie Blockier- und Meldefunktionen geben dir Kontrolle über deine Kontakte.</p></article>
|
||||
<article style="border:1px solid #d7dfd9;border-radius:12px;padding:14px;background:#fff;"><h2 style="font:600 20px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Ohne lange Anmeldung starten</h2><p style="margin:0;">Lege ein kurzes Profil an und öffne den Chat direkt im Browser.</p></article>
|
||||
</div>
|
||||
<section style="margin-top:24px;"><h2 style="font:600 24px/1.25 sans-serif;color:#18201b;margin:0 0 8px;">Häufige Fragen zum kostenlosen Single Chat</h2><h3 style="font:600 18px/1.3 sans-serif;color:#18201b;margin:16px 0 4px;">Ist der Einstieg kostenlos?</h3><p style="margin:0;">Ja. Du kannst dein Profil starten und den Chat kostenlos nutzen.</p><h3 style="font:600 18px/1.3 sans-serif;color:#18201b;margin:16px 0 4px;">Was brauche ich für den Start?</h3><p style="margin:0;">Ein Nickname sowie Alter, Geschlecht und Land genügen für den Einstieg.</p></section>
|
||||
<nav aria-label="Weitere Themen" style="margin-top:22px;"><strong style="color:#18201b;">Mehr zu YPChat:</strong> <a href="/single-chat-ohne-anmeldung">Chat ohne Anmeldung</a> · <a href="/single-treff-chat">Singles kennenlernen im Single Treff Chat</a> · <a href="/ratgeber/erste-nachricht">Tipps für die erste Nachricht</a> · <a href="/sicherheit">Sicher und anonym chatten</a></nav>
|
||||
<h1 style="font:700 34px/1.15 sans-serif;color:#18201b;margin:0 0 12px;">${escapeHtml(content.heading)}</h1>
|
||||
<p style="margin:0 0 18px;max-width:760px;">${escapeHtml(content.intro)}</p>
|
||||
<div style="display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;">${topics}</div>
|
||||
</section>`;
|
||||
}
|
||||
|
||||
@@ -567,14 +565,11 @@ function generateHTML(route, meta, __dirname) {
|
||||
html = upsertHreflangLinks(html, route);
|
||||
|
||||
if (route === '/') {
|
||||
html = html.replace('<div id="app"></div>', `<div id="app">${buildHomeSeoContent()}</div>`);
|
||||
html = html.replace('<div id="app"></div>', `<div id="app">${buildHomeSeoContent('de')}</div>`);
|
||||
}
|
||||
|
||||
if (SEO_LOCALES.some((locale) => `/${locale.code}` === route)) {
|
||||
const localizedLanding = buildLocalizedLandingContent(route, __dirname);
|
||||
if (localizedLanding) {
|
||||
html = html.replace('<div id="app"></div>', `<div id="app">${localizedLanding}</div>`);
|
||||
}
|
||||
html = html.replace('<div id="app"></div>', `<div id="app">${buildHomeSeoContent(route.slice(1))}</div>`);
|
||||
}
|
||||
|
||||
const seoLanding = buildSeoLandingContent(route);
|
||||
|
||||
Reference in New Issue
Block a user