-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Début de l'infra pour l'annuaire des lieux
- Loading branch information
Showing
7 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import QuickFeatureSearch from '@/app/QuickFeatureSearch' | ||
import { PresentationWrapper } from '@/app/presentation/UI' | ||
import StaticPageHeader from '@/components/StaticPageHeader' | ||
import { buildPlaceMap } from '@/components/buildPlaceMap' | ||
import { capitalise0 } from '@/components/utils/utils' | ||
import { styled } from 'next-yak' | ||
import Image from 'next/image' | ||
|
||
const description = '' | ||
export default function Page({ ville, searchParams }) { | ||
return ( | ||
<PresentationWrapper> | ||
<StaticPageHeader small={true} /> | ||
<header> | ||
<h1>Annuaire des lieux de {capitalise0(ville)}</h1> | ||
<p>{description}</p> | ||
<PlaceImage | ||
src={buildPlaceMap(48.1113404, -1.6793235)} | ||
width="200" | ||
height="200" | ||
alt={'Miniature de la carte de ' + ville} | ||
/> | ||
</header> | ||
<QuickFeatureSearch | ||
{...{ quickSearchFeaturesMap: {}, searchParams, noPhotos: true }} | ||
/> | ||
</PresentationWrapper> | ||
) | ||
} | ||
|
||
const PlaceImage = styled(Image)` | ||
width: 14rem; | ||
height: 8rem; | ||
object-fit: cover; | ||
border-radius: 2rem; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Annuaire from './Annuaire' | ||
|
||
export const metadata: Metadata = { | ||
title: '', | ||
description: '', | ||
} | ||
|
||
export default async function (props) { | ||
const { ville } = await props.params | ||
const searchParams = await props.searchParams | ||
return <Annuaire ville={ville} searchParams={searchParams} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { gtfsServerUrl } from '@/app/serverUrls' | ||
|
||
export function buildPlaceMap(lat, lon) { | ||
return ( | ||
lat && lon && `${gtfsServerUrl}/placeMap/?lat=${lat}&lon=${lon}&zoom=13` | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters