From c6e55e391f5ccecebe7467e6c1e58b9704b53485 Mon Sep 17 00:00:00 2001 From: Panny2507 Date: Fri, 30 Jan 2026 14:28:48 +0100 Subject: [PATCH 1/3] page es content --- .../components/GymSupportContent.tsx | 207 ++++++++++++++++++ .../[lang]/sport/sportpalyaTamogatas/page.tsx | 0 2 files changed, 207 insertions(+) create mode 100644 src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx create mode 100644 src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx diff --git a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx new file mode 100644 index 0000000..399278d --- /dev/null +++ b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx @@ -0,0 +1,207 @@ +import {JSX, ReactNode} from 'react'; +import { Card, CardContent } from '@/components/ui/card'; +import { PageHeader } from '@/components/common/PageHeader'; + +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; +} + +function parseFormattedText(text: string) { + // Split by both patterns + const parts: (string | JSX.Element)[] = []; + let lastIndex = 0; + let match; + + // Combined regex to match both bold and email + const combinedRegex = /(\*\*.*?\*\*)|([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/g; + + while ((match = combinedRegex.exec(text)) !== null) { + // Add text before match + if (match.index > lastIndex) { + parts.push(text.substring(lastIndex, match.index)); + } + + // Check if it's bold text + if (match[0].startsWith('**')) { + const boldText = match[0].replace(/\*\*/g, ''); + + // Check if bold text contains an email + const emailRegex = /([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/g; + const emailMatch = emailRegex.exec(boldText); + + if (emailMatch) { + // Bold text with email inside + parts.push( + + {boldText} + + ); + } else { + // Just bold text + parts.push({boldText}); + } + } else { + // Just email link (not bold) + parts.push( + + {match[0]} + + ); + } + + lastIndex = match.index + match[0].length; + } + + // Add remaining text + if (lastIndex < text.length) { + parts.push(text.substring(lastIndex)); + } + + return parts.length > 0 ? parts : text; +} + +export default function SportpalyaTamogatasContent({ content }: { content: SportpalyaTamogatasContentData }) { + return ( +
+ + + {/* Introduction */} + + +
+ + {parseFormattedText(content.description)} + +
+
+
+ + {/* Application */} + + +
+

+ {content.application.title} +

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

+ {content.period.title} +

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

+ {content.condition.title} +

+

{parseFormattedText(content.condition.intro)}

+
    + {content.condition.items.map((item, i) => ( +
  • {parseFormattedText(item)}
  • + ))} +
+
+ {parseFormattedText(content.condition.outro)} +
+
+
+
+ + {/* 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)}

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

{children}

+
+ ); +} \ No newline at end of file diff --git a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx new file mode 100644 index 0000000..e69de29 From 0b90a8a67763872731593e7adb617a387adb3c94 Mon Sep 17 00:00:00 2001 From: Panny2507 Date: Mon, 23 Feb 2026 17:00:20 +0100 Subject: [PATCH 2/3] page --- .../components/GymSupportContent.tsx | 64 +------------------ .../[lang]/sport/sportpalyaTamogatas/page.tsx | 24 +++++++ 2 files changed, 25 insertions(+), 63 deletions(-) diff --git a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx index 399278d..bd42ccd 100644 --- a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx +++ b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx @@ -1,6 +1,7 @@ import {JSX, ReactNode} from 'react'; import { Card, CardContent } from '@/components/ui/card'; import { PageHeader } from '@/components/common/PageHeader'; +import { parseFormattedText } from '@/utils/emailKatt-felkover'; interface SportpalyaTamogatasContentData { title: string; @@ -32,68 +33,6 @@ interface SportpalyaTamogatasContentData { footer: string; } -function parseFormattedText(text: string) { - // Split by both patterns - const parts: (string | JSX.Element)[] = []; - let lastIndex = 0; - let match; - - // Combined regex to match both bold and email - const combinedRegex = /(\*\*.*?\*\*)|([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/g; - - while ((match = combinedRegex.exec(text)) !== null) { - // Add text before match - if (match.index > lastIndex) { - parts.push(text.substring(lastIndex, match.index)); - } - - // Check if it's bold text - if (match[0].startsWith('**')) { - const boldText = match[0].replace(/\*\*/g, ''); - - // Check if bold text contains an email - const emailRegex = /([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/g; - const emailMatch = emailRegex.exec(boldText); - - if (emailMatch) { - // Bold text with email inside - parts.push( - - {boldText} - - ); - } else { - // Just bold text - parts.push({boldText}); - } - } else { - // Just email link (not bold) - parts.push( - - {match[0]} - - ); - } - - lastIndex = match.index + match[0].length; - } - - // Add remaining text - if (lastIndex < text.length) { - parts.push(text.substring(lastIndex)); - } - - return parts.length > 0 ? parts : text; -} - export default function SportpalyaTamogatasContent({ content }: { content: SportpalyaTamogatasContentData }) { return (
@@ -193,7 +132,6 @@ export default function SportpalyaTamogatasContent({ content }: { content: Sport

{parseFormattedText(content.footer)}

-
); }; diff --git a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx index e69de29..65c187a 100644 --- a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx +++ b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/page.tsx @@ -0,0 +1,24 @@ +import { getDictionary } from '@/get-dictionary'; +import type { Locale } from '@/i18n-config'; +import { PageHeader } from '@/components/common/PageHeader'; +import SportteremContent from './components/GymSupportContent'; +type SportteremIgenylesPageProps = { + params: Promise<{ lang: Locale }>; +}; +export default async function SportteremIgenylesPage({ + params, +}: SportteremIgenylesPageProps) { + const { lang } = await params; + const dictionary = await getDictionary(lang); + return ( +
+
+
+ +
+
+
+ ); +} \ No newline at end of file From f7a2e6a61c62d0f107eccde7a2aea6e3d5a7f798 Mon Sep 17 00:00:00 2001 From: Panny2507 Date: Mon, 23 Feb 2026 18:37:17 +0100 Subject: [PATCH 3/3] sportpalyatamogatas v1 --- .../components/GymSupportContent.tsx | 8 ++-- src/app/(app)/components/navigation-items.ts | 2 +- src/dictionaries/en.json | 38 +++++++++++++++++++ src/dictionaries/hu.json | 37 ++++++++++++++++++ 4 files changed, 80 insertions(+), 5 deletions(-) diff --git a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx index bd42ccd..d2e6eeb 100644 --- a/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx +++ b/src/app/(app)/[lang]/sport/sportpalyaTamogatas/components/GymSupportContent.tsx @@ -1,7 +1,7 @@ -import {JSX, ReactNode} from 'react'; +import React, {JSX, ReactNode} from 'react'; import { Card, CardContent } from '@/components/ui/card'; import { PageHeader } from '@/components/common/PageHeader'; -import { parseFormattedText } from '@/utils/emailKatt-felkover'; +import { parseFormattedText } from '@/utils/emailKatt-felkover'; //todo merge masik branchrol h letezzen a fuggveny interface SportpalyaTamogatasContentData { title: string; @@ -87,11 +87,11 @@ export default function SportpalyaTamogatasContent({ content }: { content: Sport {content.condition.title}

{parseFormattedText(content.condition.intro)}

-
    +
      {content.condition.items.map((item, i) => (
    1. {parseFormattedText(item)}
    2. ))} -
+
{parseFormattedText(content.condition.outro)}
diff --git a/src/app/(app)/components/navigation-items.ts b/src/app/(app)/components/navigation-items.ts index 4d67347..c104268 100644 --- a/src/app/(app)/components/navigation-items.ts +++ b/src/app/(app)/components/navigation-items.ts @@ -149,7 +149,7 @@ export function getNavigationItems(lang: string): NavigationItem[] { "Sportpálya támogatás pályázat", "Sports field subsidy application" ), - href: "#", + href: link("/sport/sportpalya-tamogatas"), targetBlank: false, }, { diff --git a/src/dictionaries/en.json b/src/dictionaries/en.json index 1a875e7..9d9391b 100644 --- a/src/dictionaries/en.json +++ b/src/dictionaries/en.json @@ -148,6 +148,44 @@ "eszb_website": "ESZB website" } }, + "sport": { + "sportpalyaTamogatas": { + "title": "Sports Field Support Application", + "description": "The **Budapest University of Technology and Economics Physical Education Center** and the **University Student Council (EHK) ** are announcing a joint application to support the rental of a sports field for **BME student teams**. Our goal is to support regular sports activities among the university's citizens.", + "application": { + "title": "Who can apply?", + "description": "Any team that has **at least 80%** of its members in the given semester as full-time students with an active student status at BME can participate in the competition." + }, + "period": { + "title": "The Period and Location of the Support", + "items": ["The support applies to **a semester** (fall or spring semester) of the given academic year.", + "You can apply not only for sports activities carried out at BME sports facilities (BME Sports Center, Bogdánfy Street Sports Complex, Kármán Tódor Dormitory, Bercsényi 28-30 Dormitory)."] + }, + "condition": { + "title": "Application Conditions and Submission", + "intro": "An application is valid if the team:", + "items": ["Complete and submit the **member list** published as an attachment to the application on time.", + "Complete and submit **the application form attached** to the application on time."], + "outro": "The application is submitted **electronically**, and the completed attachments must be sent to the email address **info@bmeehk.hu** by the deadline set in the schedule published on the EHK website." + }, + "selection": { + "title": "Judging Criteria", + "description": "The applications are evaluated by the BME Physical Education Center in cooperation with the Hungarian Academy of Sciences. The main criteria are:", + "items": ["The team should regularly mobilize **as many people as possible** with the support required.", + "The team's **achievements in the last 2 years**.", + "The **proportion of full-time, active BME students** in the team."] + }, + "result": { + "title": "Result and Remedy", + "items": ["The EHK will publish the final result **on its website** by the deadline set in the application schedule.", + "We are unable to accept applications that do not comply with the announcement (in terms of form or content) or that are submitted after the deadline.", + "In the event of an application with false content, the team may be punished by exclusion and disciplinary proceedings may also be initiated.", + "Questions about the application and any intention to object to the evaluation can be sent to the e-mail address **info@bmeehk.hu**." + ] + }, + "footer": "*Exact information is always included in the application announced for the given semester." + } + }, "language_education": { "title": "Language Education", "info_box": { diff --git a/src/dictionaries/hu.json b/src/dictionaries/hu.json index fd46211..0f4c771 100644 --- a/src/dictionaries/hu.json +++ b/src/dictionaries/hu.json @@ -148,6 +148,43 @@ "eszb_website": "ESZB honlapja" } }, + "sport": { + "sportpalyaTamogatas": { + "title": "Sportpálya Támogatás Pályázat", + "description": "A **Budapesti Műszaki és Gazdaságtudományi Egyetem Testnevelési Központ** és az **Egyetemi Hallgatói Képviselet (EHK)** közös pályázatot hirdet a **BME hallgatói csapatok** sportpálya bérlésének támogatására. Célunk, hogy támogassuk a rendszeres sporttevékenységet az egyetem polgárai körében.", + "application": { + "title": "Kik Pályázhatnak?", + "description": "Pályázaton részt vehet minden olyan csapat, amelynek **legalább 80%-a** az adott félévben, a BME nappali tagozatos, aktív hallgatói jogviszonnyal rendelkező hallgatója." + }, + "period": { + "title": "A Támogatás Időszaka és Helyszíne", + "items": ["A támogatás az adott tanév **egy szemeszterére** (őszi vagy tavaszi félév) vonatkozik.", + "Pályázni nem csak a BME sportlétesítményeiben (BME Sportközpont, Bogdánfy utcai Sporttelep, Kármán Tódor Kollégium, Bercsényi 28-30 Kollégium) végzett sporttevékenységgel lehet."] + }, + "condition": { + "title": "Pályázati Feltételek és Benyújtás", + "intro": "A pályázat akkor érvényes, ha a csapat:", + "items": ["Hiánytalanul kitölti és időben elküldi a pályázat mellékleteként közzétett **taglistát**.", + "Hiánytalanul kitölti és időben elküldi a pályázat mellékleteként közzétett **igénylőlapot.**"], + "outro": "A pályázás **elektronikus formában** történik, a kitöltött mellékleteket az EHK honlapján közzétett ütemezésben rögzített időpontig kell elküldeni az **info@bmeehk.hu** e-mail címre." + }, + "selection": { + "title": "Bírálási Szempontok", + "description": "A pályázatok elbírálását a BME Testnevelési Központ az EHK-val együttműködésben végzi. A legfőbb szempontok:", + "items": ["A csapat **minél több embert mozgasson meg rendszeresen** az igényelt támogatás segítségével.", + "A csapat **elért eredményei az elmúlt 2 évben**.", + "A **BME nappali tagozatos, aktív hallgatói aránya** a csapatban."] + }, + "result": { + "title": "Eredmény és Jogorvoslat", + "items": ["A végleges eredményt az EHK a pályázati ütemezésben rögzített határidőig a **saját honlapján** teszi közzé.", + "A kiírásnak (formai vagy tartalmi) meg nem felelő, vagy a határidő után benyújtott pályázatokat nem áll módunkban elfogadni.", + "Valótlan tartalmú pályázat esetén a csapat kizárással büntethető, és fegyelmi eljárás is kezdeményezhető.", + "A pályázattal kapcsolatos kérdéseket és a felszólalási szándékot az elbírálás ellen az **info@bmeehk.hu** e-mail címen lehet jelezni."] + }, + "footer": "*A pontos információkat mindig az adott félévben kiírt pályázat tartalmazza." + } + }, "language_education": { "title": "Nyelvoktatás", "info_box": {