diff --git a/src/18n.ts b/src/18n.ts deleted file mode 100644 index c9920d2..0000000 --- a/src/18n.ts +++ /dev/null @@ -1,50 +0,0 @@ -type Translations = { - [key: string]: string; -}; - -type Locale = { - [key: string]: Translations; -}; - -const translations: Locale = { - pl: { - "O Projekcie": "O Projekcie", - "O IAESTE": "O IAESTE", - "Warsztaty": "Warsztaty", - "Partnerzy": "Partnerzy", - "Firmy": "Firmy", - "Kontakt": "Kontakt", - "Moje konto": "Moje konto", - "Moje warsztaty": "Moje warsztaty", - "Panel administracyjny": "Panel administracyjny", - "Wyloguj się": "Wyloguj się", - "Zaloguj się": "Zaloguj się", - "Menu": "Menu", - "Honorary Status": "Status Honorowy" - }, - en: { - "O Projekcie": "About the Project", - "O IAESTE": "About IAESTE", - "Warsztaty": "Workshops", - "Partnerzy": "Partners", - "Firmy": "Companies", - "Kontakt": "Contact", - "Moje konto": "My Account", - "Moje warsztaty": "My Workshops", - "Panel administracyjny": "Admin Panel", - "Wyloguj się": "Log Out", - "Zaloguj się": "Log In", - "Menu": "Menu", - "Honorary Status": "Honorary Status" - } -}; - -let currentLanguage: 'pl' | 'en' = 'pl'; - -export const setLanguage = (language: 'pl' | 'en') => { - currentLanguage = language; -}; - -export const t = (key: string) => { - return translations[currentLanguage][key] || key; -}; \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 368c689..c839494 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import logo from "./logo.svg" import "./App.css" -import "./18n"; +import "./i18n/i18n"; import "react-toastify/dist/ReactToastify.css" function App() { diff --git a/src/assets/img/PSRP_logo.png b/src/assets/img/PSRP_logo.png new file mode 100644 index 0000000..657453f Binary files /dev/null and b/src/assets/img/PSRP_logo.png differ diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx index 68cc497..24836fe 100644 --- a/src/components/navbar/navbar.tsx +++ b/src/components/navbar/navbar.tsx @@ -7,7 +7,7 @@ import logo from "@/assets/img/logo_horizontal.png"; import { useState } from "react"; import { HomeRepairService, AdminPanelSettings, Logout } from "@mui/icons-material"; import { isAdmin } from "@/utils/isAdmin"; -import { t } from '../../18n'; +import { t } from '../../i18n/i18n'; const NAVLINK_STYLE: React.CSSProperties = { color: "inherit", @@ -43,22 +43,22 @@ export default function Navbar() { - {t("O Projekcie")} + {t("menuOptions.aboutProject")} - {t("O IAESTE")} + {t("menuOptions.aboutIaeste")} - {t("Warsztaty")} + {t("menuOptions.workshops")} - {t("Partnerzy")} + {t("menuOptions.partners")} - {t("Firmy")} + {t("menuOptions.companies")} - {t("Kontakt")} + {t("menuOptions.contact")} @@ -66,7 +66,7 @@ export default function Navbar() { {(state) => ( <> - + handleClick(e) : () => navigate("/login")} sx={{ @@ -87,7 +87,7 @@ export default function Navbar() { padding: "8px 16px", }} > - {state.status === "authenticated" ? `${state.currentUser.firstName} ${state.currentUser.lastName}` : t("Zaloguj się")} + {state.status === "authenticated" ? `${state.currentUser.firstName} ${state.currentUser.lastName}` : t("accountOptions.logIn")} User icon @@ -138,28 +138,28 @@ export default function Navbar() { }} > navigate("/user")}> - User icon {t("Moje konto")} + User icon {t("accountOptions.myAccount")} navigate("/user/warsztaty")}> - {t("Moje warsztaty")} + {t("accountOptions.myWorkshops")} {isAdmin(state) ? ( navigate("/admin")}> - {t("Panel administracyjny")} + {t("accountOptions.adminPanel")} ) : null} navigate("/logout")}> - {t("Wyloguj się")} + {t("accountOptions.logOut")} diff --git a/src/components/pages/landing/partnersCompanies/partnersCompanies.module.css b/src/components/pages/landing/partnersCompanies/partnersCompanies.module.css index 9a2e3dc..b805987 100644 --- a/src/components/pages/landing/partnersCompanies/partnersCompanies.module.css +++ b/src/components/pages/landing/partnersCompanies/partnersCompanies.module.css @@ -1,12 +1,51 @@ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap'); .partnersSection { + position: relative; + isolation: isolate; + overflow: hidden; margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; - background-color: white; + background: linear-gradient(to top, #ffffff 20%, #DAB88B 90%, #cfa87a); + background-size: 100% 50%; + background-position: top; + background-repeat: no-repeat; color: #333; + +} + +/* lewo */ +.partnersSection::before { + content: ""; + position: absolute; + top: 50%; + left: -7%; + width: 35rem; + height: 35rem; + background-image: url('@/assets/icons/cogwheel_light_icon.svg'); + background-repeat: no-repeat; + background-size: contain; + opacity: 0.9; + pointer-events: none; + z-index: 0; +} + +/* prawo */ +.partnersSection::after { + content: ""; + position: absolute; + bottom: 50%; + right: 5%; + width: 19.875rem; + height: 19.875rem; + background-image: url('@/assets/icons/cogwheel_light_icon.svg'); + background-repeat: no-repeat; + background-size: contain; + opacity: 0.9; + pointer-events: none; + z-index: 0; } .container { @@ -16,15 +55,19 @@ } .title { - font-size: 3rem; - margin-top: 1.25rem; - margin-bottom: 1.25rem; - font-weight: bold; + display: flex; + justify-content: center; + font-size: 6rem; + margin-top: 2.75rem; + margin-bottom: 2.75rem; + padding-top: 2.75rem; + font-weight: 700; text-align: left; - font-family: 'Roboto', sans-serif; - color: #333; - text-transform: uppercase; + font-family: League Spartan, 'Roboto', sans-serif; + color: #2C2C2C; letter-spacing: 0.625rem; + margin-left: 3.75rem; + } .partnersGrid { @@ -33,32 +76,47 @@ gap: 1.25rem; justify-items: center; list-style-type: none; + } .partner { text-align: center; margin-top: 1.25rem; - margin-bottom: 1.25rem; + margin-bottom: 2rem; + z-index: 1; + } .partner img { - max-width: 9.375rem; - height: auto; + width: 31.38rem; + height: 19.25rem; + border: 0.125rem solid #000; transition: transform 0.3s ease-in-out; + object-fit: cover; + z-index: 1; } .partner img:hover { - transform: scale(1.1); + transform: scale(1.05); } .partnerName { margin-top: 0.625rem; font-size: 1rem; font-weight: 600; + z-index: 1; } .partnerStatus { margin-top: 0.375rem; font-size: 0.75rem; color: #1271FF; + z-index: 1; +} + + +@media(max-width: 768px){ + .partnersGrid { + grid-template-columns: repeat(1, 1fr); + } } \ No newline at end of file diff --git a/src/components/pages/landing/partnersCompanies/partnersCompanies.tsx b/src/components/pages/landing/partnersCompanies/partnersCompanies.tsx index c448642..33a4682 100644 --- a/src/components/pages/landing/partnersCompanies/partnersCompanies.tsx +++ b/src/components/pages/landing/partnersCompanies/partnersCompanies.tsx @@ -2,22 +2,22 @@ import React from 'react'; import { Company } from "@/@types/API"; import styles from './partnersCompanies.module.css'; import naTeraz from '@/assets/img/temp.png'; +import temporaryCompaniesLogo from '@/assets/img/PSRP_logo.png'; import { PartnersPageProps } from './partnersCompanies.type'; -import { t } from '@/18n'; +import { t } from '@/i18n/i18n'; const PartnersCompanies: React.FC = ({ companies, title }) => { return (
-

{title}:

+

{title}

    {companies.map((company) => (
  • - {company.name} - -

    {company.name}

    -

    {t("Honorary Status")}

    {/* tymczosowo poki nie ma w bazie tego statusu hardcodem jest */} + {company.name} + + {/*

    {t("partners.honoraryStatus")}

    */}
  • ))} diff --git a/src/components/pages/landing/workshops/WorkshopsList/WorkshopsList.tsx b/src/components/pages/landing/workshops/WorkshopsList/WorkshopsList.tsx index 2338ff0..b6e0b01 100644 --- a/src/components/pages/landing/workshops/WorkshopsList/WorkshopsList.tsx +++ b/src/components/pages/landing/workshops/WorkshopsList/WorkshopsList.tsx @@ -1,24 +1,23 @@ -import { WORKSHOPS_MOCKS } from "@/mocks/workshops" -import { Link } from "react-router-dom" +import { WORKSHOPS_MOCKS } from "@/mocks/workshops"; +import { Link } from "react-router-dom"; import { useState } from "react"; -import s from "./WorkshopsList.module.css" +import s from "./WorkshopsList.module.css"; +import { t } from "@/i18n/i18n"; const WorkshopsList = () => { const [selectedUniversity, setSelectedUniversity] = useState(""); const [selectedField, setSelectedField] = useState(""); - // Pobieranie unikalnych uczelni const universities = [ - ...new Set(WORKSHOPS_MOCKS.map((workshop) => workshop.university.name)), + ...new Set(WORKSHOPS_MOCKS.map((workshop) => workshop.university.name)) ]; - // Pobieranie unikalnych kierunków studiów const fields = [ ...new Set( WORKSHOPS_MOCKS.flatMap((workshop) => workshop.preferableFieldsOfStudy.map((field) => field.name) ) - ), + ) ]; const filteredWorkshops = WORKSHOPS_MOCKS.filter((workshop) => { @@ -32,79 +31,87 @@ const WorkshopsList = () => { return matchesUniversity && matchesField; }); - + return (
    -

    Warsztaty:

    +

    {t("workshopsList.title")}

    -
  • - - -
  • - -
  • - - -
  • -
    +
  • + + +
  • + +
  • + + +
  • +
      - {filteredWorkshops.map((workshop) => ( //outputs every workshop that fits in filters -
    • -
      - Workshop -

      {workshop.company.name}

      -
      -
      - -

      {workshop.title}

      - -

      {workshop.shortDescription}

      - -
        -
      • 📅 Data i godzina: {workshop.startsAt}
      • -
      • ⏱ Czas trwania: {workshop.durationMinutes}
      • -
      • 🏫 Uczelnia: {workshop.university.name}
      • -
      -
      -
    • - ))} + {filteredWorkshops.map((workshop) => ( +
    • +
      + Workshop +

      {workshop.company.name}

      +
      +
      + +

      {workshop.title}

      + +

      {workshop.shortDescription}

      + +
        +
      • + 📅 {t("workshopsList.dateLabel")} {workshop.startsAt} +
      • +
      • + ⏱ {t("workshopsList.durationLabel")} {workshop.durationMinutes} +
      • +
      • + 🏫 {t("workshopsList.universityColonLabel")} {workshop.university.name} +
      • +
      +
      +
    • + ))}
    ); - }; -export default WorkshopsList +export default WorkshopsList; \ No newline at end of file diff --git a/src/components/templates/sections/caseweekOverview.tsx b/src/components/templates/sections/caseweekOverview.tsx index b4d94b2..71f0991 100644 --- a/src/components/templates/sections/caseweekOverview.tsx +++ b/src/components/templates/sections/caseweekOverview.tsx @@ -1,11 +1,12 @@ -import { Box, Stack } from "@mui/material" -import { BaseSection } from "./baseSection" -import icw_logotype from "@/assets/img/icw_logotype.svg" -import overview_1 from "@/assets/img/overview_1.png" -import overview_2 from "@/assets/img/overview_2.png" -import cogwheel_light_icon from "@/assets/icons/cogwheel_light_icon.svg" -import AnimatedNumbers from "react-animated-numbers" -import React from "react" +import React from "react"; +import { Box, Stack } from "@mui/material"; +import { BaseSection } from "./baseSection"; +import icw_logotype from "@/assets/img/icw_logotype.svg"; +import overview_1 from "@/assets/img/overview_1.png"; +import overview_2 from "@/assets/img/overview_2.png"; +import cogwheel_light_icon from "@/assets/icons/cogwheel_light_icon.svg"; +import AnimatedNumbers from "react-animated-numbers"; +import { t } from "@/i18n/i18n"; const AN_STYLE: React.CSSProperties = { fontFamily: "Inter, sans-serif", @@ -13,15 +14,14 @@ const AN_STYLE: React.CSSProperties = { fontWeight: "bold", color: "#5A4C32", width: "1.2ch", -} +}; -// Statistics on the main page, that are animated const STATISTICS = { workshops: 160, universities: 10, companies: 60, cities: 9, -} +}; export function CaseWeekOverview() { return ( @@ -40,8 +40,7 @@ export function CaseWeekOverview() { IAESTE CASEWEEK logotype

    - Największy cykl warsztatów inżynierskich w Polsce. Założeniem projektu jest zbliżenie do siebie środowiska akademickiego i biznesowego. Praktyczna forma case study umożliwia - studentom zapoznanie się z realnymi problemami występującymi w codziennej pracy oraz doskonalenie swoich umiejętności zarówno zawodowych jak i miękkich. + {t("homepage.introText1")} {/* "test1" */}

    @@ -55,7 +54,7 @@ export function CaseWeekOverview() { }} > - Warsztatów + {t("homepage.workshopsCounterLabel")} @@ -63,29 +62,30 @@ export function CaseWeekOverview() { - Uczelni + {t("homepage.universitiesCounterLabel")}

    - Projekt umożliwia studentom i pracodawcy wspólną pracę nad przygotowanymi zagadnieniami. Podczas cyklu warsztatów wiodące marki z rynku polskiego i światowego przeprowadzają - warsztaty na najlepszych uczelniach technicznych w kraju. Studenci stają przed możliwością zmierzenia się z realnymi problemami spotykanymi na co dzień w pracy zawodowej. - Pracodawcy podczas casów mają okazję poznać zachowania studentów w atmosferze pracy, wyłonić talenty i nawiązać współpracę z potencjalnymi kandydatami. Dzięki udziale w - projekcie IAESTE CaseWeek tysiące polskich studentów zdobyło wymarzoną pracę. + {t("homepage.introText2")}

    - Firm + {t("homepage.companiesCounterLabel")} - Miast + {t("homepage.citiesCounterLabel")} - + cogwheel - ) -} + ); +} \ No newline at end of file diff --git a/src/i18n/homepage/en.json b/src/i18n/homepage/en.json new file mode 100644 index 0000000..05a8ae9 --- /dev/null +++ b/src/i18n/homepage/en.json @@ -0,0 +1,10 @@ +{ + "homepage": { + "introText1": "The largest cycle of engineering workshops in Poland. The goal of the project is to bring the academic and business environment closer together. The practical case-study form allows students to get acquainted with real-world problems encountered in everyday work and to improve both their professional and soft skills.", + "introText2": "The project enables students and employers to work together on prepared topics. During a series of workshops, leading Polish and global brands conduct sessions at top technical universities in the country. Students have the opportunity to face real problems that occur daily in professional work. Employers can discover talents and establish cooperation with potential candidates. Thanks to IAESTE CaseWeek, thousands of Polish students have gained their dream jobs.", + "workshopsCounterLabel": "Workshops", + "universitiesCounterLabel": "Universities", + "companiesCounterLabel": "Companies", + "citiesCounterLabel": "Cities" + } +} \ No newline at end of file diff --git a/src/i18n/homepage/pl.json b/src/i18n/homepage/pl.json new file mode 100644 index 0000000..e90a4a8 --- /dev/null +++ b/src/i18n/homepage/pl.json @@ -0,0 +1,10 @@ +{ + "homepage": { + "introText1": "Największy cykl warsztatów inżynierskich w Polsce. Założeniem projektu jest zbliżenie do siebie środowiska akademickiego i biznesowego. Praktyczna forma case study umożliwia studentom zapoznanie się z realnymi problemami występującymi w codziennej pracy oraz doskonalenie swoich umiejętności zarówno zawodowych jak i miękkich.", + "introText2": "Projekt umożliwia studentom i pracodawcom wspólną pracę nad przygotowanymi zagadnieniami. Podczas cyklu warsztatów wiodące marki z rynku polskiego i światowego przeprowadzają warsztaty na najlepszych uczelniach technicznych w kraju. Studenci stają przed możliwością zmierzenia się z realnymi problemami spotykanymi na co dzień w pracy zawodowej. Pracodawcy mają okazję wyłonić talenty i nawiązać współpracę z potencjalnymi kandydatami. Dzięki udziale w projekcie IAESTE CaseWeek tysiące polskich studentów zdobyło wymarzoną pracę.", + "workshopsCounterLabel": "Warsztatów", + "universitiesCounterLabel": "Uczelni", + "companiesCounterLabel": "Firm", + "citiesCounterLabel": "Miast" + } +} \ No newline at end of file diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts new file mode 100644 index 0000000..282507f --- /dev/null +++ b/src/i18n/i18n.ts @@ -0,0 +1,51 @@ +import plNavbar from './navbar/pl.json'; +import enNavbar from './navbar/en.json'; +import plPartners from './partners/pl.json'; +import enPartners from './partners/en.json'; +import plHomepage from './homepage/pl.json'; +import enHomepage from './homepage/en.json'; +import plWorkshopsList from './workshopsList/pl.json'; +import enWorkshopsList from './workshopsList/en.json'; + +type Translations = { + [key: string]: any; +}; + +type Locale = { + [key: string]: Translations; +}; + +const translations: Locale = { + pl: { + ...plNavbar, + ...plPartners, + ...plHomepage, + ...plWorkshopsList + }, + en: { + ...enNavbar, + ...enPartners, + ...enHomepage, + ...enWorkshopsList + } +}; + +let currentLanguage: 'pl' | 'en' = 'pl'; + +export const setLanguage = (language: 'pl' | 'en') => { + currentLanguage = language; +}; + +export const t = (key: string) => { + const keys = key.split('.'); + let result: any = translations[currentLanguage]; + + for (const k of keys) { + result = result[k]; + if (result === undefined) { + return key; + } + } + + return result; +}; \ No newline at end of file diff --git a/src/i18n/navbar/en.json b/src/i18n/navbar/en.json new file mode 100644 index 0000000..8f8bd95 --- /dev/null +++ b/src/i18n/navbar/en.json @@ -0,0 +1,18 @@ +{ + "menuOptions": { + "aboutProject": "About the Project", + "aboutIaeste": "About IAESTE", + "workshops": "Workshops", + "partners": "Partners", + "companies": "Companies", + "contact": "Contact" + }, + "accountOptions": { + "myAccount": "My Account", + "myWorkshops": "My Workshops", + "adminPanel": "Admin Panel", + "logOut": "Log Out", + "logIn": "Log In" + }, + "menu": "Menu" +} \ No newline at end of file diff --git a/src/i18n/navbar/pl.json b/src/i18n/navbar/pl.json new file mode 100644 index 0000000..7cfc5f2 --- /dev/null +++ b/src/i18n/navbar/pl.json @@ -0,0 +1,18 @@ +{ + "menuOptions": { + "aboutProject": "O Projekcie", + "aboutIaeste": "O IAESTE", + "workshops": "Warsztaty", + "partners": "Partnerzy", + "companies": "Firmy", + "contact": "Kontakt" + }, + "accountOptions": { + "myAccount": "Moje konto", + "myWorkshops": "Moje warsztaty", + "adminPanel": "Panel administracyjny", + "logOut": "Wyloguj się", + "logIn": "Zaloguj się" + }, + "menu": "Menu" +} \ No newline at end of file diff --git a/src/i18n/partners/en.json b/src/i18n/partners/en.json new file mode 100644 index 0000000..54177d2 --- /dev/null +++ b/src/i18n/partners/en.json @@ -0,0 +1,5 @@ +{ + "partners": { + "honoraryStatus": "Honorary Status" + } +} \ No newline at end of file diff --git a/src/i18n/partners/pl.json b/src/i18n/partners/pl.json new file mode 100644 index 0000000..9e79530 --- /dev/null +++ b/src/i18n/partners/pl.json @@ -0,0 +1,5 @@ +{ + "partners": { + "honoraryStatus": "Status Honorowy" + } +} \ No newline at end of file diff --git a/src/i18n/workshopsList/en.json b/src/i18n/workshopsList/en.json new file mode 100644 index 0000000..ee86515 --- /dev/null +++ b/src/i18n/workshopsList/en.json @@ -0,0 +1,11 @@ +{ + "workshopsList": { + "title": "Workshops:", + "universityLabel": "University:", + "allLabel": "All", + "fieldLabel": "Field of study:", + "dateLabel": "Date & time:", + "durationLabel": "Duration:", + "universityColonLabel": "University:" + } +} \ No newline at end of file diff --git a/src/i18n/workshopsList/pl.json b/src/i18n/workshopsList/pl.json new file mode 100644 index 0000000..825cc1a --- /dev/null +++ b/src/i18n/workshopsList/pl.json @@ -0,0 +1,11 @@ +{ + "workshopsList": { + "title": "Warsztaty:", + "universityLabel": "Uczelnia:", + "allLabel": "Wszystkie", + "fieldLabel": "Kierunek studiów:", + "dateLabel": "Data i godzina:", + "durationLabel": "Czas trwania:", + "universityColonLabel": "Uczelnia:" + } +} \ No newline at end of file diff --git a/src/mocks/companies.ts b/src/mocks/companies.ts index 3069b99..3a62418 100644 --- a/src/mocks/companies.ts +++ b/src/mocks/companies.ts @@ -44,5 +44,54 @@ export const MOCK_COMPANIES: Company[] = [ "displayPriority": 4, - } + }, + + + { + "id": "c5", + "name": "5", + "logoUrl": "https://example.com/logo5.png", + "websiteUrl": "https://google.com", + "shortDescription": "Idaasd.", + "longDescription": "Hasdg innasd.", + "displayPriority": 5, + + + }, + + { + "id": "c6", + "name": "6", + "logoUrl": "https://example.com/logo5.png", + "websiteUrl": "https://google.com", + "shortDescription": "Idaasd.", + "longDescription": "Hasdg innasd.", + "displayPriority": 6, + + + }, + { + "id": "c7", + "name": "7", + "logoUrl": "https://example.com/logo5.png", + "websiteUrl": "https://google.com", + "shortDescription": "Idaasd.", + "longDescription": "Hasdg innasd.", + "displayPriority": 7, + + + }, + + { + "id": "c8", + "name": "8", + "logoUrl": "https://example.com/logo5.png", + "websiteUrl": "https://google.com", + "shortDescription": "Idaasd.", + "longDescription": "Hasdg innasd.", + "displayPriority": 8, + + + }, + ]; \ No newline at end of file diff --git a/src/pages/companiesPage.tsx b/src/pages/companiesPage.tsx index cda4645..9347c60 100644 --- a/src/pages/companiesPage.tsx +++ b/src/pages/companiesPage.tsx @@ -5,7 +5,7 @@ import PartnersCompanies from '@/components/pages/landing/partnersCompanies/part const companiesPage = () => { return ( - + ) } diff --git a/src/pages/partnersPage.tsx b/src/pages/partnersPage.tsx index 4033786..4fd49cd 100644 --- a/src/pages/partnersPage.tsx +++ b/src/pages/partnersPage.tsx @@ -4,7 +4,7 @@ import PartnersCompanies from '@/components/pages/landing/partnersCompanies/part const partnersPage = () => { return ( - + ) }