Skip to content

Commit

Permalink
Adds archive page blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
YB-BigSwan committed Aug 31, 2024
1 parent 5f812d5 commit 02c1b69
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions hooks/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"en": "Satakunta Nation",
"sv": "Satakunta Nation"
},
"nav:archive": { "fi": "Arkisto", "en": "Archive", "sv": "Arkiv" },
"nav:calendar": { "fi": "Kalenteri", "en": "Calendar", "sv": "Kalender" },
"nav:events": { "fi": "Tapahtumat", "en": "Events", "sv": "Evenemang" },
"nav:forMembers": {
Expand Down
81 changes: 81 additions & 0 deletions pages/archive.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import HorizontalCard from "@/components/HorizontalCard";
import Navbar, { NavbarProps } from "@/components/Navbar";
import createClient from "@/lib/cmsClient";
import styles from "@/styles/archive.module.css";
import { readItems } from "@directus/sdk";
import { GetStaticProps } from "next";
import Head from "next/head";

export const getStaticProps: GetStaticProps<ArchivePageProps> = async () => {
const client = createClient();
const links = await client.request(readItems("NavigationLink"));
return {
props: {
navBar: {
links,
},
},
};
};

type ArchivePageProps = {
navBar: NavbarProps;
};

export default function Archive({ navBar }: ArchivePageProps) {
return (
<>
<Head>
<title>Satakuntalainen Osakunta</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</Head>
<Navbar links={navBar.links} />
<header className="header">
<div className="headerContainer">
<h1>Arkisto</h1>
<p className="headerText">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem odit
distinctio, ullam doloremque provident voluptas illo quaerat ex
saepe voluptate reiciendis rerum fuga obcaecati esse sit cum maxime,
dolorem facilis?
</p>
</div>
</header>
<main className="main">
<div className={styles.cardContainer}>
<HorizontalCard
variant="pink"
image="/Placeholder_5.png"
altText="Placeholder image"
title="Maila Talvo's collected works"
description="Fusce lacinia nisl ac sapien condimentum faucibus. Suspendisse non metus iaculis, lobortis augue vel, placerat odio. Mauris fermentum laoreet aliquam. "
btnText="Lue lisää"
href=""
/>

<HorizontalCard
variant="pink"
image="/Placeholder_5.png"
altText="Placeholder image"
title="Satakunta Series"
description="Fusce lacinia nisl ac sapien condimentum faucibus. Suspendisse non metus iaculis, lobortis augue vel, placerat odio. Mauris fermentum laoreet aliquam. "
btnText="Lue lisää"
href=""
/>

<HorizontalCard
variant="pink"
image="/Placeholder_5.png"
altText="Placeholder image"
title="Proceedings"
description="Minutes of official SatO meetings. Organization login required"
btnText="Go to proceedings"
href=""
/>
</div>
</main>
<footer className="footer" />
</>
);
}
9 changes: 9 additions & 0 deletions styles/archive.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.cardContainer {
width: 70%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
margin: 5rem 0;
gap: 2rem;
}

0 comments on commit 02c1b69

Please sign in to comment.