feat(i18n): Complete localization of marketing frontend with react-i18next, prefixed URLs, JSON migrations, and automation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Head, Link, usePage } from '@inertiajs/react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import MarketingLayout from '@/layouts/marketing/MarketingLayout';
|
||||
|
||||
interface Props {
|
||||
@@ -16,15 +17,17 @@ interface Props {
|
||||
}
|
||||
|
||||
const BlogShow: React.FC<Props> = ({ post }) => {
|
||||
const { t } = useTranslation('blog_show');
|
||||
|
||||
return (
|
||||
<MarketingLayout title={`${post.title} - Fotospiel Blog`}>
|
||||
<Head title={`${post.title} - Fotospiel Blog`} />
|
||||
<MarketingLayout title={`${post.title} ${t('title_suffix')}`}>
|
||||
<Head title={`${post.title} ${t('title_suffix')}`} />
|
||||
{/* Hero Section */}
|
||||
<section className="bg-gradient-to-r from-[#FFB6C1] via-[#FFD700] to-[#87CEEB] text-white py-20 px-4">
|
||||
<div className="container mx-auto text-center">
|
||||
<h1 className="text-4xl md:text-5xl font-bold mb-4">{post.title}</h1>
|
||||
<p className="text-lg mb-8">
|
||||
Von {post.author?.name || 'Dem Fotospiel Team'} | {new Date(post.published_at).toLocaleDateString('de-DE')}
|
||||
{t('by_author')} {post.author?.name || t('team')} | {t('published_on')} {new Date(post.published_at).toLocaleDateString('de-DE')}
|
||||
</p>
|
||||
{post.featured_image && (
|
||||
<img
|
||||
@@ -50,7 +53,7 @@ const BlogShow: React.FC<Props> = ({ post }) => {
|
||||
href="/blog"
|
||||
className="bg-[#FFB6C1] text-white px-8 py-3 rounded-full font-semibold hover:bg-[#FF69B4] transition"
|
||||
>
|
||||
Zurück zum Blog
|
||||
{t('back_to_blog')}
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user