Marketing packages now use localized name/description data plus seeded placeholder-

driven breakdown tables, with frontend/cards/dialog updated accordingly (database/
  migrations/2025_10_17_000001_add_description_table_to_packages.php, database/
  migrations/2025_10_17_000002_add_translation_columns_to_packages.php, database/seeders/PackageSeeder.php, app/
  Http/Controllers/MarketingController.php, resources/js/pages/marketing/Packages.tsx).
  Filament Package resource gains locale tabs, markdown editor, numeric/toggle inputs, and simplified feature
  management (app/Filament/Resources/PackageResource.php, app/Filament/Resources/PackageResource/Pages/
  CreatePackage.php, .../EditPackage.php).
  Legal pages now render markdown-backed content inside the main layout via a new controller/view route setup and
  updated footer links (app/Http/Controllers/LegalPageController.php, routes/web.php, resources/views/partials/
  footer.blade.php, resources/js/pages/legal/Show.tsx, remove old static pages).
  Translation files and shared assets updated to cover new marketing/legal strings and styling tweaks (public/
  lang/*/marketing.json, resources/lang/*/marketing.php, resources/css/app.css, resources/js/admin/components/
  LanguageSwitcher.tsx).
This commit is contained in:
Codex Agent
2025-10-17 21:20:54 +02:00
parent 25e8f0511b
commit 48a2974152
30 changed files with 1702 additions and 711 deletions

View File

@@ -119,6 +119,108 @@
font-display: swap;
}
/* Basic typography styling for rendered markdown (prose) without Tailwind plugin */
.prose {
color: rgb(55 65 81);
font-family: var(--font-sans-marketing);
line-height: 1.75;
max-width: 100%;
}
.prose.prose-slate {
color: rgb(51 65 85);
}
.prose :where(p, ul, ol, blockquote, pre, table, figure) {
margin-bottom: 1.25em;
}
.prose h1 {
font-family: var(--font-display);
font-size: clamp(2.25rem, 4vw, 3rem);
line-height: 1.1;
margin-top: 0;
margin-bottom: 0.75em;
}
.prose h2 {
font-family: var(--font-display);
font-size: clamp(1.875rem, 3vw, 2.5rem);
line-height: 1.2;
margin-top: 1.6em;
margin-bottom: 0.6em;
}
.prose h3 {
font-size: clamp(1.5rem, 2.5vw, 2rem);
font-weight: 600;
line-height: 1.25;
margin-top: 1.4em;
margin-bottom: 0.5em;
}
.prose h4 {
font-size: 1.25rem;
font-weight: 600;
margin-top: 1.2em;
margin-bottom: 0.4em;
}
.prose p {
margin: 0 0 1.25em;
}
.prose a {
color: rgb(236 72 153);
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 4px;
}
.prose strong {
font-weight: 600;
}
.prose ul,
.prose ol {
padding-left: 1.5em;
}
.prose ul {
list-style-type: disc;
}
.prose ol {
list-style-type: decimal;
}
.prose blockquote {
border-left: 4px solid rgba(236, 72, 153, 0.4);
color: rgb(75 85 99);
font-style: italic;
margin-left: 0;
padding-left: 1.25em;
}
.prose table {
border-collapse: collapse;
width: 100%;
}
.prose table th,
.prose table td {
border: 1px solid rgba(148, 163, 184, 0.6);
padding: 0.75em;
text-align: left;
}
.prose code {
background-color: rgba(148, 163, 184, 0.15);
border-radius: 0.375rem;
font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
padding: 0.15em 0.35em;
}
@layer utilities {
.font-display {
font-family: var(--font-display);

View File

@@ -60,7 +60,7 @@ export function LanguageSwitcher() {
document.documentElement.setAttribute('lang', locale);
} catch (error) {
if (import.meta.env.DEV) {
// eslint-disable-next-line no-console
console.error('Failed to switch language', error);
}
} finally {

View File

@@ -56,7 +56,7 @@ if (!i18n.isInitialized) {
})
.catch((error) => {
if (import.meta.env.DEV) {
// eslint-disable-next-line no-console
console.error('Failed to initialize i18n', error);
}
});

View File

@@ -54,7 +54,7 @@ export async function processQueue() {
if (processing) return; processing = true;
try {
const now = Date.now();
let items = await list();
const items = await list();
for (const it of items) {
if (it.status === 'done') continue;
if (it.nextAttemptAt && it.nextAttemptAt > now) continue;

View File

@@ -12,7 +12,7 @@ function getCsrfToken(): string | null {
const decodedCookie = decodeURIComponent(document.cookie);
const ca = decodedCookie.split(';');
for (let i = 0; i < ca.length; i++) {
let c = ca[i].trimStart();
const c = ca[i].trimStart();
if (c.startsWith(name)) {
const token = c.substring(name.length);
try {

View File

@@ -8,7 +8,7 @@ import { useAppearance } from '@/hooks/use-appearance';
const Footer: React.FC = () => {
const { t } = useTranslation('marketing');
const { t } = useTranslation(['marketing', 'legal']);
return (
@@ -32,10 +32,10 @@ const Footer: React.FC = () => {
<div>
<h3 className="font-semibold font-display text-gray-900 mb-4">Rechtliches</h3>
<ul className="space-y-2 text-sm text-gray-600 font-sans-marketing">
<li><Link href="/impressum" className="hover:text-pink-500">{t('nav.impressum')}</Link></li>
<li><Link href="/datenschutz" className="hover:text-pink-500">{t('nav.privacy')}</Link></li>
<li><Link href="/agb" className="hover:text-pink-500">AGB</Link></li>
<li><Link href="/kontakt" className="hover:text-pink-500">{t('nav.contact')}</Link></li>
<li><Link href="/impressum" className="hover:text-pink-500 transition-colors">{t('legal:impressum')}</Link></li>
<li><Link href="/datenschutz" className="hover:text-pink-500 transition-colors">{t('legal:datenschutz')}</Link></li>
<li><Link href="/agb" className="hover:text-pink-500 transition-colors">{t('legal:agb')}</Link></li>
<li><Link href="/kontakt" className="hover:text-pink-500 transition-colors">{t('marketing:nav.contact')}</Link></li>
</ul>
</div>
@@ -57,4 +57,4 @@ const Footer: React.FC = () => {
);
};
export default Footer;
export default Footer;

View File

@@ -1,42 +0,0 @@
import React from 'react';
import { Head, Link } from '@inertiajs/react';
import { useTranslation } from 'react-i18next';
import MarketingLayout from '@/layouts/mainWebsite';
import { useLocalizedRoutes } from '@/hooks/useLocalizedRoutes';
const Datenschutz: React.FC = () => {
const { t } = useTranslation('legal');
const { localizedPath } = useLocalizedRoutes();
return (
<MarketingLayout title={t('datenschutz_title')}>
<Head title={t('datenschutz_title')} />
<div className="container mx-auto px-4 py-8">
<h1 className="text-2xl font-bold mb-4 font-display">{t('datenschutz')}</h1>
<p className="mb-4 font-sans-marketing">{t('datenschutz_intro')}</p>
<p className="mb-4 font-sans-marketing">{t('responsible')}</p>
<p className="mb-4 font-sans-marketing">{t('data_collection')}</p>
<h2 className="text-xl font-semibold mb-2 font-display">{t('payments')}</h2>
<p className="mb-4 font-sans-marketing">
{t('payments_desc')} <a href="https://stripe.com/de/privacy" target="_blank" rel="noopener noreferrer">{t('stripe_privacy')}</a> {t('and')} <a href="https://www.paypal.com/de/webapps/mpp/ua/privacy-full" target="_blank" rel="noopener noreferrer">{t('paypal_privacy')}</a>.
</p>
<p className="mb-4 font-sans-marketing">{t('data_retention')}</p>
<p className="mb-4 font-sans-marketing">
{t('rights')} <Link href={localizedPath('/kontakt')}>{t('contact')}</Link>.
</p>
<p className="mb-4 font-sans-marketing">{t('cookies')}</p>
<h2 className="text-xl font-semibold mb-2 font-display">{t('personal_data')}</h2>
<p className="mb-4 font-sans-marketing">{t('personal_data_desc')}</p>
<h2 className="text-xl font-semibold mb-2 font-display">{t('account_deletion')}</h2>
<p className="mb-4 font-sans-marketing">{t('account_deletion_desc')}</p>
<h2 className="text-xl font-semibold mb-2 font-display">{t('data_security')}</h2>
<p className="mb-4 font-sans-marketing">{t('data_security_desc')}</p>
</div>
</MarketingLayout>
);
};
export default Datenschutz;

View File

@@ -1,33 +0,0 @@
import React from 'react';
import { Head, Link } from '@inertiajs/react';
import { useTranslation } from 'react-i18next';
import MarketingLayout from '@/layouts/mainWebsite';
import { useLocalizedRoutes } from '@/hooks/useLocalizedRoutes';
const Impressum: React.FC = () => {
const { t } = useTranslation('legal');
const { localizedPath } = useLocalizedRoutes();
return (
<MarketingLayout title={t('impressum_title')}>
<Head title={t('impressum_title')} />
<div className="container mx-auto px-4 py-8">
<h1 className="text-2xl font-bold mb-4 font-display">{t('impressum')}</h1>
<p className="mb-4 font-sans-marketing">{t('impressum_section')}</p>
<p className="mb-4 font-sans-marketing">
{t('company')}<br />
{t('address')}<br />
{t('representative')}<br />
{t('contact')}: <Link href={localizedPath('/kontakt')}>{t('contact')}</Link>
</p>
<p className="mb-4 font-sans-marketing">{t('vat_id')}</p>
<h2 className="text-xl font-semibold mb-2 font-display">{t('monetization')}</h2>
<p className="mb-4 font-sans-marketing">{t('monetization_desc')}</p>
<p className="mb-4 font-sans-marketing">{t('register_court')}</p>
<p className="mb-4 font-sans-marketing">{t('commercial_register')}</p>
</div>
</MarketingLayout>
);
};
export default Impressum;

View File

@@ -0,0 +1,44 @@
import React from 'react';
import MarketingLayout from '@/layouts/mainWebsite';
type LegalShowProps = {
seoTitle: string;
title: string;
content: string;
effectiveFrom?: string | null;
effectiveFromLabel?: string | null;
versionLabel?: string | null;
slug: string;
};
export default function LegalShow(props: LegalShowProps) {
const { seoTitle, title, content, effectiveFromLabel, versionLabel } = props;
return (
<MarketingLayout title={seoTitle}>
<section className="bg-white py-16">
<div className="mx-auto max-w-4xl px-6">
<header className="mb-10">
<p className="text-sm uppercase tracking-[0.2em] text-gray-400">
FotoSpiel.App
</p>
<h1 className="mt-2 text-3xl font-semibold text-gray-900 md:text-4xl">
{title}
</h1>
{(effectiveFromLabel || versionLabel) && (
<p className="mt-3 text-sm text-gray-500">
{[effectiveFromLabel, versionLabel].filter(Boolean).join(' · ')}
</p>
)}
</header>
<article
className="prose prose-slate max-w-none prose-headings:font-display"
dangerouslySetInnerHTML={{ __html: content }}
/>
</div>
</section>
</MarketingLayout>
);
}

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,10 @@ return [
'account_deletion_desc' => 'Sie haben das Recht, Ihre persönlichen Daten jederzeit löschen zu lassen (Recht auf Löschung, Art. 17 DSGVO). Kontaktieren Sie uns unter [E-Mail] zur Löschung Ihres Accounts. Alle zugehörigen Daten (Events, Photos, Purchases) werden gelöscht, soweit keine gesetzlichen Aufbewahrungspflichten bestehen.',
'data_security' => 'Datensicherheit',
'data_security_desc' => 'Wir verwenden HTTPS, verschlüsselte Speicherung (Passwörter hashed) und regelmäßige Backups. Zugriff auf Daten ist rollebasierend beschränkt (Tenant vs SuperAdmin).',
'agb' => 'Allgemeine Geschäftsbedingungen',
'effective_from' => 'Gültig seit :date',
'version' => 'Version :version',
'and' => 'und',
'stripe_privacy' => 'Stripe Datenschutz',
'paypal_privacy' => 'PayPal Datenschutz',
];
];

View File

@@ -50,6 +50,20 @@ return [
'feature_reseller_dashboard' => 'Reseller-Dashboard',
'feature_custom_branding' => 'Benutzerdefiniertes Branding',
'feature_advanced_reporting' => 'Erweiterte Berichterstattung',
'badge_most_popular' => 'Beliebteste Wahl',
'badge_best_value' => 'Bestes Preis-Leistungs-Verhältnis',
'badge_starter' => 'Perfekt für den Start',
'billing_per_event' => 'pro Event',
'billing_per_year' => 'pro Jahr',
'more_features' => '+:count weitere Features',
'max_photos_label' => 'Max. Fotos',
'max_guests_label' => 'Max. Gäste',
'gallery_days_label' => 'Galerie-Tage',
'feature_overview' => 'Feature-Überblick',
'order_hint' => 'Sofort startklar keine versteckten Kosten, sichere Zahlung via Stripe oder PayPal.',
'features_label' => 'Features',
'breakdown_label' => 'Leistungsübersicht',
'limits_label' => 'Limits & Kapazitäten',
],
'nav' => [
'home' => 'Startseite',
@@ -146,4 +160,4 @@ return [
'currency' => [
'euro' => '€',
],
];
];

View File

@@ -29,4 +29,7 @@ return [
'account_deletion_desc' => 'You have the right to have your personal data deleted at any time (right to erasure, Art. 17 GDPR). Contact us at [Email] to delete your account. All associated data (events, photos, purchases) will be deleted, unless legal retention obligations exist.',
'data_security' => 'Data Security',
'data_security_desc' => 'We use HTTPS, encrypted storage (passwords hashed) and regular backups. Access to data is role-based restricted (Tenant vs SuperAdmin).',
];
'agb' => 'Terms & Conditions',
'effective_from' => 'Effective from :date',
'version' => 'Version :version',
];

View File

@@ -50,6 +50,20 @@ return [
'feature_reseller_dashboard' => 'Reseller Dashboard',
'feature_custom_branding' => 'Custom Branding',
'feature_advanced_reporting' => 'Advanced Reporting',
'badge_most_popular' => 'Most Popular',
'badge_best_value' => 'Best Value',
'badge_starter' => 'Perfect Starter',
'billing_per_event' => 'per event',
'billing_per_year' => 'per year',
'more_features' => '+:count more features',
'max_photos_label' => 'Max. photos',
'max_guests_label' => 'Max. guests',
'gallery_days_label' => 'Gallery days',
'feature_overview' => 'Feature overview',
'order_hint' => 'Ready to launch instantly secure Stripe or PayPal checkout, no hidden fees.',
'features_label' => 'Features',
'breakdown_label' => 'At-a-glance',
'limits_label' => 'Limits & Capacity',
],
'nav' => [
'home' => 'Home',
@@ -146,4 +160,4 @@ return [
'currency' => [
'euro' => '€',
],
];
];

View File

@@ -1,10 +1,12 @@
<footer class="bg-gray-800 text-white py-8 px-4">
<div class="container mx-auto text-center">
<p>&copy; 2025 {{ __('marketing.footer.company') }}. {{ __('marketing.footer.rights_reserved') }}</p>
<div class="mt-4 space-x-4">
<a href="{{ route('impressum') }}" class="hover:text-[#FFB6C1]">{{ __('legal.impressum') }}</a>
<a href="{{ route('datenschutz') }}" class="hover:text-[#FFB6C1]">{{ __('legal.datenschutz') }}</a>
<a href="{{ route('kontakt') }}" class="hover:text-[#FFB6C1]">{{ __('marketing.nav.contact') }}</a>
<div class="mt-4 flex flex-wrap items-center justify-center gap-3 text-sm font-medium">
<a href="{{ route('impressum') }}" class="transition-colors hover:text-[#FFB6C1]">{{ __('legal.impressum') }}</a>
<span class="text-white/40">&bull;</span>
<a href="{{ route('datenschutz') }}" class="transition-colors hover:text-[#FFB6C1]">{{ __('legal.datenschutz') }}</a>
<span class="text-white/40">&bull;</span>
<a href="{{ route('agb') }}" class="transition-colors hover:text-[#FFB6C1]">{{ __('legal.agb') }}</a>
</div>
</div>
</footer>
</footer>