From 5cf589fffdb6d5ef2b67459ea20293ae7f3a6836 Mon Sep 17 00:00:00 2001 From: DankaMarci Date: Fri, 3 Jul 2026 16:11:08 +0200 Subject: [PATCH 1/3] feat: implement redesigned Gym Support Content and update PageHeader for improved subtitle handling --- .../components/GymSupportContent.tsx | 158 +++++++----------- .../sport/sportpalya-tamogatas/page.tsx | 22 ++- src/components/common/PageHeader.tsx | 4 +- 3 files changed, 79 insertions(+), 105 deletions(-) diff --git a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx index 2e2e2da..f832095 100644 --- a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx +++ b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx @@ -1,6 +1,6 @@ -import React, {ReactNode} from 'react'; +import { ReactNode } from 'react'; import { Card, CardContent } from '@/components/ui/card'; -import { parseFormattedText } from '@/utils/parseFormattedText'; +import { parseFormattedText } from '@/utils/parseFormattedText'; interface SportpalyaTamogatasContentData { title: string; @@ -34,109 +34,77 @@ interface SportpalyaTamogatasContentData { export default function SportpalyaTamogatasContent({ content }: { content: SportpalyaTamogatasContentData }) { return ( -
- {/* Introduction */} - - -
- - {parseFormattedText(content.description)} - -
-
-
+
+ + {parseFormattedText(content.application.description)} + - {/* Application */} - - -
-

- {content.application.title} -

- {parseFormattedText(content.application.description)} -
-
-
+ + + - {/* Support Period and Location */} - - -
-

- {content.period.title} -

-
-
    - {content.period.items.map((item, i) => ( -
  • {parseFormattedText(item)}
  • - ))} -
-
-
-
-
+ + {parseFormattedText(content.condition.intro)} + + {parseFormattedText(content.condition.outro)} + - {/* Conditions */} - - -
-

- {content.condition.title} -

-

{parseFormattedText(content.condition.intro)}

-
    - {content.condition.items.map((item, i) => ( -
  1. {parseFormattedText(item)}
  2. - ))} -
-
- {parseFormattedText(content.condition.outro)} -
-
-
-
+ + {parseFormattedText(content.selection.description)} + + - {/* Selection */} - - -
-

- {content.selection.title} -

- {parseFormattedText(content.selection.description)} -
    - {content.selection.items.map((item, i) => ( -
  • {parseFormattedText(item)}
  • - ))} -
-
-
-
+ + + - {/* Result */} - - -
-

- {content.result.title} -

-
    - {content.result.items.map((item, i) => ( -
  • {parseFormattedText(item)}
  • - ))} -
-
-
-
-

{parseFormattedText(content.footer)}

+

+ {parseFormattedText(content.footer)} +

); }; +function SectionCard({ title, children }: { title: string; children: ReactNode }) { + return ( + + +

+ {title} +

+
+
+ {children} +
+ + + ); +} + function Paragraph({ children }: { children: ReactNode }) { return ( -
-

{children}

+

{children}

+ ); +} + +function TextList({ items, ordered = false }: { items: string[]; ordered?: boolean }) { + const ListTag = ordered ? 'ol' : 'ul'; + + return ( + + {items.map((item, index) => ( +
  • + {parseFormattedText(item)} +
  • + ))} +
    + ); +} + +function NoticeBox({ children }: { children: ReactNode }) { + return ( +
    + {children}
    ); -} \ No newline at end of file +} diff --git a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx index 5ce2ec9..7628853 100644 --- a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx +++ b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx @@ -2,22 +2,28 @@ import { getDictionary } from '@/get-dictionary'; import type { Locale } from '@/i18n-config'; import GymSupportContent from './components/GymSupportContent'; import { PageHeader } from '@/components/common/PageHeader'; +import { parseFormattedText } from '@/utils/parseFormattedText'; + type SportpalyaTamogatasPageProps = { params: Promise<{ lang: Locale }>; }; + export default async function SportpalyaTamogatasPage({ params, }: SportpalyaTamogatasPageProps) { const { lang } = await params; - const dictionary = await getDictionary(lang, 'sport'); + const dictionary = await getDictionary(lang, 'sport'); + const content = dictionary.sport.sportpalyaTamogatas; + return ( -
    -
    - - +
    +
    + +
    ); -} \ No newline at end of file +} diff --git a/src/components/common/PageHeader.tsx b/src/components/common/PageHeader.tsx index 16c5c9d..c656887 100644 --- a/src/components/common/PageHeader.tsx +++ b/src/components/common/PageHeader.tsx @@ -7,8 +7,8 @@ import { ArrowLeft } from "lucide-react"; export interface PageHeaderProps { title: string; - subtitle?: string; - description?: string; // fallback for subtitle (backward compatibility) + subtitle?: React.ReactNode; + description?: React.ReactNode; // fallback for subtitle (backward compatibility) tags?: string[]; onBack?: () => void; backHref?: string; From f7c65b0c63f9e713e07e11b56d81c1933b751fa4 Mon Sep 17 00:00:00 2001 From: DankaMarci Date: Fri, 3 Jul 2026 16:29:30 +0200 Subject: [PATCH 2/3] feat: redesign Sportterem booking page layout and improve content structure --- .../components/SportteremContent.tsx | 266 +++++++----------- .../[lang]/sport/sportterem-igenyles/page.tsx | 20 +- 2 files changed, 113 insertions(+), 173 deletions(-) diff --git a/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx b/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx index 06fe62f..9936ad0 100644 --- a/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx +++ b/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx @@ -5,199 +5,133 @@ import { parseFormattedText } from '@/utils/parseFormattedText'; interface SportteremContentData { title: string; description: string; - facilities: { - title: string; - items: string[] + facilities: { + title: string; + items: string[]; }; - conditions: { - title: string; - description: string + conditions: { + title: string; + description: string; }; - process: { - title: string; - description: string; - warning: string + process: { + title: string; + description: string; + warning: string; }; - requiredData: { - title: string; - intro: string; - items: string[] + requiredData: { + title: string; + intro: string; + items: string[]; }; - selection: { - title: string; - intro: string; - items: string[]; - warning: string + selection: { + title: string; + intro: string; + items: string[]; + warning: string; }; - usage: { + usage: { title: string; - items: string[] + items: string[]; }; - costs: { - title: string; - description: string; - items: string[] + costs: { + title: string; + description: string; + items: string[]; }; - contact: { - title: string; - description: string + contact: { + title: string; + description: string; }; footer: string; } - export default function SportteremContent({ content }: { content: SportteremContentData }) { return ( -
    +
    + + + + + + {parseFormattedText(content.conditions.description)} + - {/* Introduction */} - - -
    - - {parseFormattedText(content.description)} - -
    -
    -
    + + {parseFormattedText(content.process.description)} + {parseFormattedText(content.process.warning)} + - {/* Facilities */} - - -
    -

    - {content.facilities.title} -

    -
    -
      - {content.facilities.items.map((item, i) => ( -
    • {parseFormattedText(item)}
    • - ))} -
    -
    -
    -
    -
    + + {parseFormattedText(content.requiredData.intro)} + + - {/* Conditions */} - - -
    -

    - {content.conditions.title} -

    - {parseFormattedText(content.conditions.description)} -
    -
    -
    + + {parseFormattedText(content.selection.intro)} + + {parseFormattedText(content.selection.warning)} + - {/* Process & Deadlines */} - - -
    -

    - {content.process.title} -

    - {parseFormattedText(content.process.description)} -
    - {parseFormattedText(content.process.warning)} -
    -
    -
    -
    + + + - {/* Required Data */} - - -
    -

    - {content.requiredData.title} -

    -

    {parseFormattedText(content.requiredData.intro)}

    -
      - {content.requiredData.items.map((item, i) => ( -
    • {parseFormattedText(item)}
    • - ))} -
    -
    -
    -
    + + {parseFormattedText(content.costs.description)} + + - {/* Selection Criteria */} - - -
    -

    - {content.selection.title} -

    -

    {parseFormattedText(content.selection.intro)}

    -
      - {content.selection.items.map((item, i) => ( -
    • {parseFormattedText(item)}
    • - ))} -
    -
    - {parseFormattedText(content.selection.warning)} -
    -
    -
    -
    + + {parseFormattedText(content.contact.description)} + - {/* Rules & usage */} - - -
    -

    - {content.usage.title} -

    -
      - {content.usage.items.map((item, i) => ( -
    • {parseFormattedText(item)}
    • - ))} -
    -
    -
    -
    +

    + {parseFormattedText(content.footer)} +

    +
    + ); +} - {/* Costs */} - - -
    -

    - {content.costs.title} -

    - {parseFormattedText(content.costs.description)} -
      - {content.costs.items.map((item, i) => ( -
    • {parseFormattedText(item)}
    • - ))} -
    -
    -
    -
    +function SectionCard({ title, children }: { title: string; children: ReactNode }) { + return ( + + +

    + {title} +

    +
    +
    + {children} +
    + + + ); +} - {/* Kapcsolattartás */} - - -
    -

    - {content.contact.title} -

    - {parseFormattedText(content.contact.description)} -
    -
    -
    +function Paragraph({ children }: { children: ReactNode }) { + return ( +

    {children}

    + ); +} -

    {parseFormattedText(content.footer)}

    +function TextList({ items, ordered = false }: { items: string[]; ordered?: boolean }) { + const ListTag = ordered ? 'ol' : 'ul'; -
    + return ( + + {items.map((item, index) => ( +
  • + {parseFormattedText(item)} +
  • + ))} +
    ); -}; +} -function Paragraph({ children }: { children: ReactNode }) { +function WarningBox({ children }: { children: ReactNode }) { return ( -
    -

    {children}

    +
    + {children}
    ); -} \ No newline at end of file +} diff --git a/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx b/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx index 8e17fb9..f9773a8 100644 --- a/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx +++ b/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx @@ -2,22 +2,28 @@ import { getDictionary } from '@/get-dictionary'; import type { Locale } from '@/i18n-config'; import SportteremContent from './components/SportteremContent'; import { PageHeader } from '@/components/common/PageHeader'; +import { parseFormattedText } from '@/utils/parseFormattedText'; + type SportteremIgenylesPageProps = { params: Promise<{ lang: Locale }>; }; + export default async function SportteremIgenylesPage({ params, }: SportteremIgenylesPageProps) { const { lang } = await params; - const dictionary = await getDictionary(lang, 'sport'); + const dictionary = await getDictionary(lang, 'sport'); + const content = dictionary.sport.sportterem; + return ( -
    -
    - - +
    + +
    ); -} \ No newline at end of file +} From c562fffc8fe2c587d9308aae2c349e7bdb0a0d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lipt=C3=A1k=20P=C3=A9ter?= Date: Sat, 25 Jul 2026 11:58:26 +0200 Subject: [PATCH 3/3] feat: update container styling for Sportterem booking page --- src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx b/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx index f9773a8..99733d2 100644 --- a/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx +++ b/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx @@ -17,7 +17,7 @@ export default async function SportteremIgenylesPage({ return (
    -
    +