diff --git a/src/components/PageLayout/PageLayout.tsx b/src/components/PageLayout/PageLayout.tsx index 58900e72..0173c82c 100644 --- a/src/components/PageLayout/PageLayout.tsx +++ b/src/components/PageLayout/PageLayout.tsx @@ -1,8 +1,10 @@ import clsx from 'clsx' +import Head from 'next/head' import {FC, ReactNode} from 'react' import {BannerContainer} from '@/utils/BannerContainer' import {PageTitleContainer} from '@/utils/PageTitleContainer' +import {Seminar, useSeminarInfo} from '@/utils/useSeminarInfo' import {Footer} from './Footer/Footer' import {MenuMain} from './MenuMain/MenuMain' @@ -16,31 +18,46 @@ type PageLayoutProps = { children: ReactNode } +const seminarTitle: Record = { + strom: 'STROM', + matik: 'Matik', + malynar: 'Malynár', +} + // pre pouzitie len na seminarovych strankach a podstrankach - `/matik(/*)` // ked budeme potrebovat top-level stranky ako `/ina-stranka`, budeme musiet upravit, ako sa pracuje s `useSeminarInfo` export const PageLayout: FC = ({contentWidth = 2, title = '', children}) => { + const {seminar} = useSeminarInfo() return ( - - -
- - -
- -
- {children} + <> + + + {title && `${title} | `} + {seminarTitle[seminar]} + + + + +
+ + +
+ +
+ {children} +
+
-
-
- - + + + ) } diff --git a/src/pages/malynar/index.tsx b/src/pages/malynar/index.tsx index e99819c7..286b5f7e 100644 --- a/src/pages/malynar/index.tsx +++ b/src/pages/malynar/index.tsx @@ -4,7 +4,7 @@ import {PageLayout} from '@/components/PageLayout/PageLayout' import {Posts} from '@/components/Posts/Posts' const Malynar: NextPage = () => ( - + ) diff --git a/src/pages/matik/index.tsx b/src/pages/matik/index.tsx index 22cf6497..7715ecc2 100644 --- a/src/pages/matik/index.tsx +++ b/src/pages/matik/index.tsx @@ -4,7 +4,7 @@ import {PageLayout} from '@/components/PageLayout/PageLayout' import {Posts} from '@/components/Posts/Posts' const Matik: NextPage = () => ( - + ) diff --git a/src/pages/strom/index.tsx b/src/pages/strom/index.tsx index b89e4982..52345e36 100644 --- a/src/pages/strom/index.tsx +++ b/src/pages/strom/index.tsx @@ -4,7 +4,7 @@ import {PageLayout} from '@/components/PageLayout/PageLayout' import {Posts} from '@/components/Posts/Posts' const Strom: NextPage = () => ( - + ) diff --git a/src/pages/strom/vysledky/[[...params]].tsx b/src/pages/strom/vysledky/[[...params]].tsx index b5552fe4..5208be76 100644 --- a/src/pages/strom/vysledky/[[...params]].tsx +++ b/src/pages/strom/vysledky/[[...params]].tsx @@ -5,7 +5,7 @@ import {Results} from '@/components/Results/Results' const Vysledky: NextPage = () => { return ( - + ) diff --git a/src/pages/strom/zadania/[[...params]].tsx b/src/pages/strom/zadania/[[...params]].tsx index ab0bd57c..cd3a049d 100644 --- a/src/pages/strom/zadania/[[...params]].tsx +++ b/src/pages/strom/zadania/[[...params]].tsx @@ -5,7 +5,7 @@ import {Problems} from '@/components/Problems/Problems' const Zadania: NextPage = () => { return ( - + )