news article template, association cleanup, footer email links to serif

This commit is contained in:
elisejakob
2024-06-27 01:52:50 +02:00
parent d4399d03d3
commit 96f7d6ce91
12 changed files with 85 additions and 33 deletions

View File

@ -1,8 +1,10 @@
import { getClient } from "@/app/client";
import { Blocks } from "@/components/blocks/Blocks";
import Icon from "@/components/general/Icon";
import Image from "@/components/general/Image";
import { graphql } from "@/gql";
import { AssociationFragment } from "@/gql/graphql";
import Link from "next/link";
import { notFound } from "next/navigation";
export async function generateStaticParams() {
@ -51,8 +53,17 @@ export default async function Page({ params }: { params: { slug: string } }) {
return (
<main className="site-main" id="main">
<span className="suphead breadcrumb">
<Link href="/foreninger">{association.associationType}</Link>
</span>
<section className="page-header">
<h1>{association.title}</h1>
{association.websiteUrl && (
<a className="button" href={association.websiteUrl} target="_blank">
<span>Besøk nettside</span>
<Icon type="externalLink" />
</a>
)}
{association.logo && (
<Image
src={association.logo.url}
@ -65,20 +76,6 @@ export default async function Page({ params }: { params: { slug: string } }) {
</section>
<section className="pageContent">
<Blocks blocks={association.body} />
<table>
<tbody>
<tr>
<th>Type</th>
<td>{association.associationType}</td>
</tr>
{association.websiteUrl && (
<tr>
<th>Nettside</th>
<td>{association.websiteUrl}</td>
</tr>
)}
</tbody>
</table>
</section>
</main>
);