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:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
44
resources/js/pages/legal/Show.tsx
Normal file
44
resources/js/pages/legal/Show.tsx
Normal 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
Reference in New Issue
Block a user