-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/ehk sportterem igenyles #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9fabe36
sportteremigenyles-szovegek dobozban v1
Panny2507 ac36b3d
sportteremigenyles-szovegek dobozban v2
Panny2507 84acd14
szovegnelkul
Panny2507 6b9d293
navbarfix
Panny2507 c645d23
angol is van
Panny2507 9ded0c9
magyar szöveg fixalas es navbar
Panny2507 42d34ff
mailto kesz
Panny2507 c07e715
félkövér kész
Panny2507 6c832b0
angolszovegkiemelt
Panny2507 b6af047
fajlbakiszervezes
Panny2507 db771d3
refactor: relocate PageHeader component from SportteremContent to the…
peterlipt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { getDictionary } from '@/get-dictionary'; | ||
| import type { Locale } from '@/i18n-config'; | ||
| import { PageHeader } from '@/components/common/PageHeader'; | ||
| import GymSupportContent from './components/GymSupportContent'; | ||
| type SportpalyaTamogatasPageProps = { | ||
| params: Promise<{ lang: Locale }>; | ||
| }; | ||
| export default async function SportpalyaTamogatasPage({ | ||
| params, | ||
| }: SportpalyaTamogatasPageProps) { | ||
| const { lang } = await params; | ||
| const dictionary = await getDictionary(lang); | ||
| return ( | ||
| <div className="min-h-screen bg-gray-50"> | ||
| <div className="container mx-auto px-4 py-8"> | ||
| <main className="container mx-auto py-10 px-4"> | ||
| <GymSupportContent | ||
| content={dictionary.sport.sportpalyaTamogatas} | ||
| /> | ||
| </main> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
204 changes: 204 additions & 0 deletions
204
src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,204 @@ | ||
| import {JSX, ReactNode} from 'react'; | ||
| import { Card, CardContent } from '@/components/ui/card'; | ||
| import { PageHeader } from '@/components/common/PageHeader'; | ||
| import { parseFormattedText } from '@/utils/parseFormattedText'; | ||
|
|
||
| interface SportteremContentData { | ||
| title: string; | ||
| description: string; | ||
| facilities: { | ||
| title: string; | ||
| items: string[] | ||
| }; | ||
| conditions: { | ||
| title: string; | ||
| description: string | ||
| }; | ||
| process: { | ||
| title: string; | ||
| description: string; | ||
| warning: string | ||
| }; | ||
| requiredData: { | ||
| title: string; | ||
| intro: string; | ||
| items: string[] | ||
| }; | ||
| selection: { | ||
| title: string; | ||
| intro: string; | ||
| items: string[]; | ||
| warning: string | ||
| }; | ||
| usage: { | ||
| title: string; | ||
| items: string[] | ||
| }; | ||
| costs: { | ||
| title: string; | ||
| description: string; | ||
| items: string[] | ||
| }; | ||
| contact: { | ||
| title: string; | ||
| description: string | ||
| }; | ||
| footer: string; | ||
| } | ||
|
|
||
|
|
||
| export default function SportteremContent({ content }: { content: SportteremContentData }) { | ||
| return ( | ||
| <div className="flex flex-col gap-4 md:gap-6 lg:px-4 px-2 py-8"> | ||
|
|
||
| {/* Introduction */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <Paragraph> | ||
| {parseFormattedText(content.description)} | ||
| </Paragraph> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Facilities */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.facilities.title} | ||
| </h3> | ||
| <div className="space-y-2 text-gray-700"> | ||
| <ul className="list-disc pl-5 space-y-2"> | ||
| {content.facilities.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Conditions */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.conditions.title} | ||
| </h3> | ||
| <Paragraph>{parseFormattedText(content.conditions.description)}</Paragraph> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Process & Deadlines */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.process.title} | ||
| </h3> | ||
| <Paragraph>{parseFormattedText(content.process.description)}</Paragraph> | ||
| <div className="mt-4 p-3 bg-gray-50 rounded-lg border border-gray-100 text-sm font-semibold"> | ||
| {parseFormattedText(content.process.warning)} | ||
| </div> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Required Data */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.requiredData.title} | ||
| </h3> | ||
| <p>{parseFormattedText(content.requiredData.intro)}</p> | ||
| <ul className="list-disc pl-5 space-y-1"> | ||
| {content.requiredData.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Selection Criteria */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.selection.title} | ||
| </h3> | ||
| <p>{parseFormattedText(content.selection.intro)}</p> | ||
| <ul className="list-disc pl-5 space-y-1"> | ||
| {content.selection.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| <div className="mt-4 p-3 bg-gray-50 rounded-lg border border-gray-100 text-sm font-semibold"> | ||
| {parseFormattedText(content.selection.warning)} | ||
| </div> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Rules & usage */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.usage.title} | ||
| </h3> | ||
| <ul className="list-disc pl-5 space-y-1"> | ||
| {content.usage.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Costs */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.costs.title} | ||
| </h3> | ||
| <Paragraph>{parseFormattedText(content.costs.description)}</Paragraph> | ||
| <ul className="list-disc pl-5 space-y-1"> | ||
| {content.costs.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Kapcsolattartás */} | ||
| <Card className="group hover:shadow-md transition-all duration-300"> | ||
| <CardContent className="p-3 md:p-6"> | ||
| <div className="flex flex-col gap-2 md:gap-3"> | ||
| <h3 className="font-bold text-xl leading-tight text-gray-900 group-hover:text-[#862633] transition-colors"> | ||
| {content.contact.title} | ||
| </h3> | ||
| <Paragraph>{parseFormattedText(content.contact.description)}</Paragraph> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| <p className="text-center text-sm text-gray-400 italic mt-4">{parseFormattedText(content.footer)}</p> | ||
|
|
||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| function Paragraph({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <div className="prose max-w-none text-gray-700 richtext"> | ||
| <p>{children}</p> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { getDictionary } from '@/get-dictionary'; | ||
| import type { Locale } from '@/i18n-config'; | ||
| import SportteremContent from './components/SportteremContent'; | ||
| import { PageHeader } from '@/components/common/PageHeader'; | ||
| type SportteremIgenylesPageProps = { | ||
| params: Promise<{ lang: Locale }>; | ||
| }; | ||
| export default async function SportteremIgenylesPage({ | ||
| params, | ||
| }: SportteremIgenylesPageProps) { | ||
| const { lang } = await params; | ||
| const dictionary = await getDictionary(lang); | ||
| return ( | ||
| <div className="min-h-screen bg-gray-50"> | ||
| <div className="container mx-auto px-4 py-8"> | ||
| <PageHeader title={dictionary.sport.sportterem.title} /> | ||
| <SportteremContent | ||
| content={dictionary.sport.sportterem} | ||
| /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package.json changes pin @types/react and @types/react-dom to specific patch versions (^19.1.9 and ^19.1.7), but the existing versions already used caret ranges (^19) which would have automatically resolved to compatible versions.
While these changes are technically valid, they're unnecessary and could lead to:
The original ranges (^19 and ^19) were sufficient and more flexible.