migration wip
This commit is contained in:
@@ -7,6 +7,7 @@ import { getLocalizedPath } from '@/lib/i18n';
|
||||
import { t } from '@/lib/i18n';
|
||||
import { SEO } from '@/components/SEO';
|
||||
import { LocaleSwitcher } from '@/components/LocaleSwitcher';
|
||||
import { ContentRenderer } from '@/components/content/ContentRenderer';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
@@ -211,10 +212,12 @@ export default async function BlogDetailPage({ params }: PageProps) {
|
||||
})()}
|
||||
|
||||
{/* Article Content */}
|
||||
<div
|
||||
className="prose prose-lg prose-blue max-w-none mb-12"
|
||||
dangerouslySetInnerHTML={{ __html: processedContent }}
|
||||
/>
|
||||
<div className="mb-12">
|
||||
<ContentRenderer
|
||||
content={post.contentHtml}
|
||||
className="prose prose-lg prose-blue"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Article Footer */}
|
||||
<footer className="border-t border-gray-200 pt-8 mt-12">
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getPostsByLocale, getCategoriesByLocale, getMediaById } from '@/lib/dat
|
||||
import { getSiteInfo, t, getLocalizedPath } from '@/lib/i18n';
|
||||
import { SEO } from '@/components/SEO';
|
||||
import { LocaleSwitcher } from '@/components/LocaleSwitcher';
|
||||
import { processHTML } from '@/lib/html-compat';
|
||||
import { ContentRenderer } from '@/components/content/ContentRenderer';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
@@ -140,10 +140,12 @@ export default async function BlogPage({ params }: PageProps) {
|
||||
{post.title}
|
||||
</Link>
|
||||
</h3>
|
||||
<div
|
||||
className="text-gray-600 line-clamp-3 text-sm mb-4"
|
||||
dangerouslySetInnerHTML={{ __html: processHTML(post.excerptHtml) }}
|
||||
/>
|
||||
<div className="text-gray-600 line-clamp-3 text-sm mb-4">
|
||||
<ContentRenderer
|
||||
content={post.excerptHtml}
|
||||
className="text-gray-600 line-clamp-3 text-sm"
|
||||
/>
|
||||
</div>
|
||||
<Link
|
||||
href={getLocalizedPath(`/blog/${post.slug}`, locale as 'en' | 'de')}
|
||||
className="inline-flex items-center text-sm font-medium text-blue-600 hover:text-blue-700"
|
||||
@@ -205,10 +207,12 @@ export default async function BlogPage({ params }: PageProps) {
|
||||
{post.title}
|
||||
</Link>
|
||||
</h3>
|
||||
<div
|
||||
className="text-gray-600 mb-3"
|
||||
dangerouslySetInnerHTML={{ __html: processHTML(post.excerptHtml) }}
|
||||
/>
|
||||
<div className="text-gray-600 mb-3">
|
||||
<ContentRenderer
|
||||
content={post.excerptHtml}
|
||||
className="text-gray-600 mb-3"
|
||||
/>
|
||||
</div>
|
||||
<Link
|
||||
href={getLocalizedPath(`/blog/${post.slug}`, locale as 'en' | 'de')}
|
||||
className="inline-flex items-center text-sm font-medium text-blue-600 hover:text-blue-700"
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ResponsiveSection, ResponsiveWrapper, ResponsiveGrid } from '@/componen
|
||||
import { FeaturedImage } from '@/components/content/FeaturedImage';
|
||||
import { Container } from '@/components/ui/Container';
|
||||
import { Button } from '@/components/ui/Button';
|
||||
import { ContentRenderer } from '@/components/content/ContentRenderer';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
@@ -117,9 +118,9 @@ export default async function Page({ params }: PageProps) {
|
||||
{page.title}
|
||||
</h1>
|
||||
{page.excerptHtml && (
|
||||
<div
|
||||
<ContentRenderer
|
||||
content={page.excerptHtml}
|
||||
className="text-lg sm:text-xl text-gray-600 leading-relaxed"
|
||||
dangerouslySetInnerHTML={{ __html: processHTML(page.excerptHtml) }}
|
||||
/>
|
||||
)}
|
||||
</ResponsiveWrapper>
|
||||
@@ -127,9 +128,9 @@ export default async function Page({ params }: PageProps) {
|
||||
|
||||
{processedContent && (
|
||||
<ResponsiveWrapper className="bg-white rounded-lg shadow-sm p-6 sm:p-8" container={true} maxWidth="full">
|
||||
<div
|
||||
<ContentRenderer
|
||||
content={contentToDisplay || ''}
|
||||
className="prose prose-lg max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: processedContent }}
|
||||
/>
|
||||
</ResponsiveWrapper>
|
||||
)}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { notFound } from 'next/navigation'
|
||||
import { getAllCategories, getProductsByCategory } from '@/lib/data'
|
||||
import { ProductList } from '@/components/ProductList'
|
||||
import { Metadata } from 'next'
|
||||
import { ContentRenderer } from '@/components/content/ContentRenderer'
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
@@ -48,9 +49,9 @@ export default async function ProductCategoryPage({ params }: PageProps) {
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<h1 className="text-4xl font-bold mb-6">{category.name}</h1>
|
||||
{category.description && (
|
||||
<div
|
||||
<ContentRenderer
|
||||
content={category.description}
|
||||
className="mb-8 prose max-w-none"
|
||||
dangerouslySetInnerHTML={{ __html: category.description }}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { getSiteInfo, t, getLocaleFromPath, getLocalizedPath } from '@/lib/i18n'
|
||||
import { processHTML } from '@/lib/html-compat';
|
||||
import { SEO } from '@/components/SEO';
|
||||
import { LocaleSwitcher } from '@/components/LocaleSwitcher';
|
||||
import { ContentRenderer } from '@/components/content/ContentRenderer';
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
@@ -187,9 +188,9 @@ export default async function ProductDetailPage({ params }: PageProps) {
|
||||
<h3 className="text-sm font-medium text-gray-900 mb-3">
|
||||
{t('products.description', locale as 'en' | 'de')}
|
||||
</h3>
|
||||
<div
|
||||
<ContentRenderer
|
||||
content={product.descriptionHtml || ''}
|
||||
className="prose prose-sm max-w-none text-gray-600"
|
||||
dangerouslySetInnerHTML={{ __html: processedDescription }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user