diff --git a/src/app/components/header.tsx b/src/app/components/header.tsx index ce0af63c0..3ee55b941 100644 --- a/src/app/components/header.tsx +++ b/src/app/components/header.tsx @@ -14,7 +14,7 @@ export default async function Header({title = 'Valintojen toteuttaminen', isHome const headerStyle: CSSProperties = { borderBottom: '1px solid rgba(0, 0, 0, 0.15)', backgroundColor: 'white', - padding: '0.5rem 5vw', + padding: '0.5rem 3vw', width: '100svw', left: 0, position: 'absolute', diff --git a/src/app/globals.css b/src/app/globals.css index b58e469ff..384125417 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -3,7 +3,7 @@ body { color: '#666'; text-align: center; min-height: 100svh; - max-width: 90vw; + max-width: 94vw; font-size: 1rem; font-family: "'Roboto', sans-serif"; background-color: rgb(245, 245, 245); diff --git a/src/app/haku/[oid]/hakukohde-list.tsx b/src/app/haku/[oid]/hakukohde-list.tsx new file mode 100644 index 000000000..5dc8c62b8 --- /dev/null +++ b/src/app/haku/[oid]/hakukohde-list.tsx @@ -0,0 +1,36 @@ +'use client' + +import { getTranslation } from "@/app/lib/common"; +import { Hakukohde } from "@/app/lib/kouta"; +import { styled } from "@mui/material"; + +const StyledList = styled('div')({ + maxWidth: '20vw', + textAlign: 'left' +}); + +const StyledItem = styled('div')({ + '.organizationLabel': { + fontWeight: 500 + }, + + '&:nth-child(even)': { + backgroundColor: '#f5f5f5' + }, + '&:hover': { + backgroundColor: '#e0f2fd' + } +}); + +export const HakukohdeList = ({hakukohteet}: {hakukohteet : Hakukohde[]}) =>{ + + return ( + + {hakukohteet.map((hk: Hakukohde) => + +

{getTranslation(hk.organisaatioNimi)}

+

{getTranslation(hk.nimi)}

+
)} +
+ ); +} diff --git a/src/app/haku/[oid]/page.tsx b/src/app/haku/[oid]/page.tsx index 43c102430..f34b43cbc 100644 --- a/src/app/haku/[oid]/page.tsx +++ b/src/app/haku/[oid]/page.tsx @@ -3,6 +3,7 @@ import { getTranslation } from "@/app/lib/common"; import { Hakukohde, getHaku, getHakukohteet } from "../../lib/kouta"; import Header from "@/app/components/header"; +import { HakukohdeList } from "./hakukohde-list"; export default async function HakuPage({ params @@ -16,12 +17,12 @@ export default async function HakuPage({ return (
-
- {hakukohteet.map((hk: Hakukohde) => -
-

{getTranslation(hk.organisaatioNimi)}

-

{getTranslation(hk.nimi)}

-
)} +
+ +
+

Valitse hakukohde

+

Kesken...

+
);