Skip to content

Commit eae2c25

Browse files
feat(routes): add Partners and Contact pages with localization support
- Updated routing to include new Partners and Contact pages. - Added corresponding routes in the constants file. - Implemented PartnersPage and ContactPage components with translation support. - Updated localization files for multiple languages to include new text for Partners and Contact sections. - Modified Footer component to link to the new pages.
1 parent 0196e26 commit eae2c25

11 files changed

Lines changed: 94 additions & 15 deletions

File tree

frontend/src/app/routes.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createBrowserRouter, Navigate } from 'react-router-dom';
22
import { Root } from '@/app/Root';
3-
import { HomePage } from '@/features/showcase';
3+
import { HomePage, PartnersPage, ContactPage } from '@/features/showcase';
44
import { GymDashboard } from '@/features/gym';
55
import EditorApp from '@/features/editor/EditorApp';
66
import { ROUTES } from '@/core/config';
@@ -12,6 +12,8 @@ export const router = createBrowserRouter([
1212
children: [
1313
{ index: true, element: <HomePage /> },
1414
{ path: ROUTES.GYM, element: <GymDashboard /> },
15+
{ path: ROUTES.PARTNERS, element: <PartnersPage /> },
16+
{ path: ROUTES.CONTACT, element: <ContactPage /> },
1517
// /editor and /editor/demo both redirect to the demo session (wall id=1)
1618
{ path: ROUTES.EDITOR, element: <Navigate to="/editor/1" replace /> },
1719
{ path: `${ROUTES.EDITOR}/demo`, element: <Navigate to="/editor/1" replace /> },

frontend/src/core/config/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ export const ROUTES = {
88
GYM: '/gym',
99
EDITOR: '/editor',
1010
EDITOR_SESSION: '/editor/:wallId',
11+
PARTNERS: '/partners',
12+
CONTACT: '/contact',
1113
} as const;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { useTranslation, Trans } from 'react-i18next';
2+
3+
const EMAIL = 'contact@setrsoft.com';
4+
5+
export function ContactPage() {
6+
const { t } = useTranslation();
7+
8+
return (
9+
<div className="flex flex-col items-center justify-center py-24 px-4 text-center animate-fade-in">
10+
<h1 className="text-3xl font-bold text-white mb-6">{t('contact.title')}</h1>
11+
<p className="text-on-surface-variant text-lg">
12+
<Trans
13+
i18nKey="contact.body"
14+
components={{ emailLink: <a href={`mailto:${EMAIL}`} className="text-mint hover:underline" /> }}
15+
/>
16+
</p>
17+
</div>
18+
);
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { useTranslation, Trans } from 'react-i18next';
2+
3+
const EMAIL = 'contact@setrsoft.com';
4+
5+
export function PartnersPage() {
6+
const { t } = useTranslation();
7+
8+
return (
9+
<div className="flex flex-col items-center justify-center py-24 px-4 text-center animate-fade-in">
10+
<h1 className="text-3xl font-bold text-white mb-6">{t('partners.title')}</h1>
11+
<p className="text-on-surface-variant max-w-xl text-lg leading-relaxed">
12+
<Trans
13+
i18nKey="partners.body"
14+
components={{ emailLink: <a href={`mailto:${EMAIL}`} className="text-mint hover:underline" /> }}
15+
/>
16+
</p>
17+
</div>
18+
);
19+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
export { HomePage } from './HomePage';
2+
export { PartnersPage } from './PartnersPage';
3+
export { ContactPage } from './ContactPage';

frontend/src/locales/cn.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@
4646
"hold_info_hold_id": "支点 ID",
4747
"hold_info_hold_type_id": "支点类型 ID"
4848
},
49+
"partners": {
50+
"title": "合作伙伴",
51+
"body": "我们正在寻找合作伙伴,共同推动这个项目,开创攀岩的未来。如果您有兴趣,请联系我们:<emailLink>contact@setrsoft.com</emailLink>"
52+
},
53+
"contact": {
54+
"title": "联系方式",
55+
"body": "请发送邮件至 <emailLink>contact@setrsoft.com</emailLink>"
56+
},
4957
"footer": {
5058
"org": "SetRsoft 组织",
5159
"docs": "文档",

frontend/src/locales/de.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
"inspector_title": "Griff-Inspektor",
4949
"delete_hold": "Griff löschen"
5050
},
51+
"partners": {
52+
"title": "Partner",
53+
"body": "Wir suchen Partner, um dieses Projekt voranzutreiben und die Zukunft des Kletterns zu gestalten. Kontaktiere uns unter <emailLink>contact@setrsoft.com</emailLink>, wenn du interessiert bist."
54+
},
55+
"contact": {
56+
"title": "Kontakt",
57+
"body": "Schreib uns an <emailLink>contact@setrsoft.com</emailLink>"
58+
},
5159
"footer": {
5260
"org": "SetRsoft Organisation",
5361
"sentence": "Die Open-Source-Software für Indoor-Klettern.",

frontend/src/locales/en.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
"inspector_title": "Hold Inspector",
4949
"delete_hold": "Delete hold"
5050
},
51+
"partners": {
52+
"title": "Partners",
53+
"body": "We are looking for partners to empower this project and develop the future of climbing. Contact us at <emailLink>contact@setrsoft.com</emailLink> if you are interested."
54+
},
55+
"contact": {
56+
"title": "Contact",
57+
"body": "Reach us at <emailLink>contact@setrsoft.com</emailLink>"
58+
},
5159
"footer": {
5260
"org": "SetRsoft organisation",
5361
"sentence": "The Open Source software for indoor climbing industry.",

frontend/src/locales/fr.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
"inspector_title": "Inspecteur de prises",
4949
"delete_hold": "Supprimer la prise"
5050
},
51+
"partners": {
52+
"title": "Partenaires",
53+
"body": "Nous cherchons des partenaires pour soutenir ce projet et développer l'avenir de l'escalade. Contactez-nous à <emailLink>contact@setrsoft.com</emailLink> si vous êtes intéressé."
54+
},
55+
"contact": {
56+
"title": "Contact",
57+
"body": "Contactez-nous à <emailLink>contact@setrsoft.com</emailLink>"
58+
},
5159
"footer": {
5260
"org": "Organisation SetRsoft",
5361
"sentence": "Le logiciel open source pour l'escalade indoor.",

frontend/src/locales/ru.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
"inspector_title": "Инспектор зацепок",
4949
"delete_hold": "Удалить зацепку"
5050
},
51+
"partners": {
52+
"title": "Партнёры",
53+
"body": "Мы ищем партнёров для развития этого проекта и будущего скалолазания. Напишите нам на <emailLink>contact@setrsoft.com</emailLink>, если вас это интересует."
54+
},
55+
"contact": {
56+
"title": "Контакты",
57+
"body": "Свяжитесь с нами по адресу <emailLink>contact@setrsoft.com</emailLink>"
58+
},
5159
"footer": {
5260
"org": "Организация SetRsoft",
5361
"sentence": "Программное обеспечение с открытым исходным кодом для скалодромов.",

0 commit comments

Comments
 (0)