-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/ehk sportpalya tamogatas #68
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
9 commits
Select commit
Hold shift + click to select a range
c6e55e3
page es content
Panny2507 0b90a8a
page
Panny2507 f7a2e6a
sportpalyatamogatas v1
Panny2507 acdf4da
Merge remote-tracking branch 'origin/main' into feat/ehk-sportpalya-t…
Panny2507 0c2c25e
mergeltteremfoglalasestamogatas
Panny2507 0475432
Rename sportpalya tamogatas
peterlipt 50b5803
Merge branch 'feat/ehk-sportpalya-tamogatas' of https://github.com/ki…
Panny2507 d32e7c9
Merge branch 'feat/ehk-sportpalya-tamogatas' of https://github.com/ki…
Panny2507 722d731
bugfixes-done_v2
Panny2507 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
142 changes: 142 additions & 0 deletions
142
src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.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,142 @@ | ||
| import React, {ReactNode} from 'react'; | ||
| import { Card, CardContent } from '@/components/ui/card'; | ||
| import { parseFormattedText } from '@/utils/parseFormattedText'; | ||
|
|
||
| interface SportpalyaTamogatasContentData { | ||
| title: string; | ||
| description: string; | ||
| application: { | ||
| title: string; | ||
| description: string | ||
| }; | ||
| period: { | ||
| title: string; | ||
| items: string[] | ||
| }; | ||
| condition: { | ||
| title: string; | ||
| intro: string; | ||
| items: string[]; | ||
| outro: string | ||
| }; | ||
| selection: { | ||
| title: string; | ||
| description: string; | ||
| items: string[] | ||
| }; | ||
| result: { | ||
| title: string; | ||
| items: string[] | ||
| }; | ||
|
|
||
| footer: string; | ||
| } | ||
|
|
||
| export default function SportpalyaTamogatasContent({ content }: { content: SportpalyaTamogatasContentData }) { | ||
| 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> | ||
|
|
||
| {/* Application */} | ||
| <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.application.title} | ||
| </h3> | ||
| <Paragraph>{parseFormattedText(content.application.description)}</Paragraph> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Support Period and Location */} | ||
| <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.period.title} | ||
| </h3> | ||
| <div className="space-y-2 text-gray-700"> | ||
| <ul className="list-disc pl-5 space-y-2"> | ||
| {content.period.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.condition.title} | ||
| </h3> | ||
| <p>{parseFormattedText(content.condition.intro)}</p> | ||
| <ol className="list-decimal pl-5 space-y-1"> | ||
| {content.condition.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ol> | ||
| <div className="mt-4 p-3 bg-gray-50 rounded-lg border border-gray-100 text-sm font-semibold"> | ||
| {parseFormattedText(content.condition.outro)} | ||
| </div> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Selection */} | ||
| <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> | ||
| <Paragraph>{parseFormattedText(content.selection.description)}</Paragraph> | ||
| <ul className="list-disc pl-5 space-y-1"> | ||
| {content.selection.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Result */} | ||
| <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.result.title} | ||
| </h3> | ||
| <ul className="list-disc pl-5 space-y-1"> | ||
| {content.result.items.map((item, i) => ( | ||
| <li key={i}>{parseFormattedText(item)}</li> | ||
| ))} | ||
| </ul> | ||
| </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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.