news article template, association cleanup, footer email links to serif
This commit is contained in:
@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user