add venue map and style tables and make a placeholder image gallery
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import { ImageSliderBlock } from "@/components/blocks/ImageSliderBlock";
|
||||
import Image from "@/components/general/Image";
|
||||
import { NeufMap } from "@/components/venues/NeufMap";
|
||||
import { VenueInfo } from "@/components/venues/VenueInfo";
|
||||
import { graphql } from "@/gql";
|
||||
import { VenueFragment } from "@/gql/graphql";
|
||||
import { notFound } from "next/navigation";
|
||||
@ -47,11 +50,60 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
const venue = (data?.venue ?? {}) as VenueFragment;
|
||||
const featuredImage: any = venue.featuredImage;
|
||||
|
||||
// remove when real content is ready
|
||||
const placeholderBlock = {
|
||||
id: "d3971f38-32f9-46aa-9d56-9e69d2765cdc",
|
||||
blockType: "ImageSliderBlock",
|
||||
field: "image_slider",
|
||||
images: [
|
||||
{
|
||||
image: {
|
||||
id: "7",
|
||||
url: "https://cms.neuf.kult.444.no/media/original_images/22-06-02a_Storsalen_BR55620_FotoHelgeBrekke_SauXqU1.jpg",
|
||||
width: 1024,
|
||||
height: 683,
|
||||
alt: "",
|
||||
attribution: "Helge Brekke",
|
||||
__typename: "CustomImage",
|
||||
},
|
||||
text: "",
|
||||
__typename: "ImageSliderItemBlock",
|
||||
},
|
||||
{
|
||||
image: {
|
||||
id: "6",
|
||||
url: "https://cms.neuf.kult.444.no/media/original_images/biblioteket_zPrxTfl.jpg",
|
||||
width: 1200,
|
||||
height: 800,
|
||||
alt: "Biblioteket, inkl. boksamlingen og griseportretter",
|
||||
attribution: "",
|
||||
__typename: "CustomImage",
|
||||
},
|
||||
text: "For et fint bilde! Dette er bildetekst i et bildegalleri.",
|
||||
__typename: "ImageSliderItemBlock",
|
||||
},
|
||||
{
|
||||
image: {
|
||||
id: "3",
|
||||
url: "https://cms.neuf.kult.444.no/media/original_images/ABBAfever-22_websize-e1714644654899_kTNzMdU.jpg",
|
||||
width: 1200,
|
||||
height: 904,
|
||||
alt: "",
|
||||
attribution: "",
|
||||
__typename: "CustomImage",
|
||||
},
|
||||
text: "For et fint bilde! Dette er bildetekst i et bildegalleri. Jeg lurer også på hvordan det ser ut når bildeteksten går over flere linjer, så her er muligens en test av det. Det kommer sikkert litt an på skjermstørrelsen, men når jeg skriver såpass langt som dette er jeg garantert minst to linjer tror jeg!",
|
||||
__typename: "ImageSliderItemBlock",
|
||||
},
|
||||
],
|
||||
__typename: "ImageSliderBlock",
|
||||
};
|
||||
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<section className="page-header">
|
||||
<h1>{venue.title}</h1>
|
||||
{featuredImage && (
|
||||
<ImageSliderBlock block={placeholderBlock} hero />
|
||||
<h1 className="page-title">{venue.title}</h1>
|
||||
{/*featuredImage && (
|
||||
<Image
|
||||
src={featuredImage.url}
|
||||
alt={featuredImage.alt}
|
||||
@ -59,51 +111,10 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
height={featuredImage.height}
|
||||
sizes="100vw"
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
<section className="pageContent">
|
||||
<Blocks blocks={venue.body} />
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Etasje</th>
|
||||
<td>{venue.floor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Branntillatelse for</th>
|
||||
<td>{venue.capacityLegal}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Stående</th>
|
||||
<td>{venue.capacityStanding}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Sittende</th>
|
||||
<td>{venue.capacitySitting}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bruk</th>
|
||||
<td>TODO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bar</th>
|
||||
<td>{venue.capabilityBar}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Lyd</th>
|
||||
<td>{venue.capabilityLighting}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Lys</th>
|
||||
<td>{venue.capabilityLighting}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>A/V</th>
|
||||
<td>{venue.capabilityAudioVideo}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
)*/}
|
||||
<Blocks blocks={venue.body} />
|
||||
<VenueInfo venue={venue} />
|
||||
<NeufMap venueSlug={venue.slug} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user