diff --git a/locales/de.json b/locales/de.json index f1a43aa..c773233 100644 --- a/locales/de.json +++ b/locales/de.json @@ -31,7 +31,9 @@ "description": "Die Universität der Künste Berlin lädt vom 19. bis 21. Juli zum Rundgang – Tage der offenen Tür. Werkstätten, Ateliers, Studios und Probenräume der Fakultäten Bildende Kunst, Architektur, Gestaltung, Musik und Darstellende Kunst sowie das Hochschulübergreifende Zentrum Tanz Berlin, das Jazz-Institut Berlin und das Berlin Career College öffnen zum Ende des akademischen Jahres ihre Türen. Von Malerei, Skulptur und Performance über Designentwürfe, Modenschau und Filmscreenings bis hin zu Konzerten, Tanz und Soundinstallationen zeigen Studierende Ergebnisse und Prozesse ihrer künstlerischen Arbeit." }, "Saved": { + "title": "Gemerkte Projekte", "saved_items": "Gemerkte Projekte", + "description": "Hier können Projekte oder Veranstaltung gespeichert werden", "remove": "entfernen", "save": "merken", "remove_all": "Alle entfernen" @@ -55,7 +57,7 @@ "title": "UdK Rundgang 2024", "studentproject": "Projekt", "event": "Veranstaltung", - "meta_description": "{type}: {name}" + "meta_description": "{template, select, studentproject {Projekt zum UdK Rundgang 2024 - Autor*innen: {name}} event {Veranstaltung zum UdK Rundgang 2024 - Autor*innen: {name}} other {Autor*innen: {name}}}" }, "format": "{count, plural, =1 {Format} other {Formate}}", "faculty": "{count, plural, =1 {Fakultät/Zentrum} other {Fakultäten/Zentren}}", diff --git a/locales/en.json b/locales/en.json index 5bf8b4c..738e597 100644 --- a/locales/en.json +++ b/locales/en.json @@ -33,6 +33,7 @@ "Saved": { "title": "Saved Projects", "saved_items": "Saved Projects", + "description": "Projects or events can be saved here.", "remove": "remove", "save": "save", "remove_all": "Remove All" @@ -56,7 +57,7 @@ "title": "UdK Rundgang 2024", "studentproject": "Project", "event": "Event", - "meta_description": "{type}: {name}" + "meta_description": "{template, select, studentproject {Project at the UdK Rundgang 2024 - Authors: {name}} event {Event at the UdK Rundgang 2024 - Authors: {name}} other {Authors: {name}}}" }, "format": "{count, plural, =1 {Format} other {Formats}}", "faculty": "{count, plural, =1 {Faculty/Centre} other {Faculties/Centres}}", diff --git a/public/assets/ogimages/image-0.png b/public/assets/ogimages/image-0.png new file mode 100644 index 0000000..80baf11 Binary files /dev/null and b/public/assets/ogimages/image-0.png differ diff --git a/public/assets/ogimages/image-1.png b/public/assets/ogimages/image-1.png new file mode 100644 index 0000000..7e09bdb Binary files /dev/null and b/public/assets/ogimages/image-1.png differ diff --git a/public/assets/ogimages/image-10.png b/public/assets/ogimages/image-10.png new file mode 100644 index 0000000..2605912 Binary files /dev/null and b/public/assets/ogimages/image-10.png differ diff --git a/public/assets/ogimages/image-11.png b/public/assets/ogimages/image-11.png new file mode 100644 index 0000000..d1fa100 Binary files /dev/null and b/public/assets/ogimages/image-11.png differ diff --git a/public/assets/ogimages/image-12.png b/public/assets/ogimages/image-12.png new file mode 100644 index 0000000..9b88cec Binary files /dev/null and b/public/assets/ogimages/image-12.png differ diff --git a/public/assets/ogimages/image-13.png b/public/assets/ogimages/image-13.png new file mode 100644 index 0000000..e55da3c Binary files /dev/null and b/public/assets/ogimages/image-13.png differ diff --git a/public/assets/ogimages/image-2.png b/public/assets/ogimages/image-2.png new file mode 100644 index 0000000..bf14ad1 Binary files /dev/null and b/public/assets/ogimages/image-2.png differ diff --git a/public/assets/ogimages/image-3.png b/public/assets/ogimages/image-3.png new file mode 100644 index 0000000..09086e9 Binary files /dev/null and b/public/assets/ogimages/image-3.png differ diff --git a/public/assets/ogimages/image-4.png b/public/assets/ogimages/image-4.png new file mode 100644 index 0000000..af0634d Binary files /dev/null and b/public/assets/ogimages/image-4.png differ diff --git a/public/assets/ogimages/image-5.png b/public/assets/ogimages/image-5.png new file mode 100644 index 0000000..140618e Binary files /dev/null and b/public/assets/ogimages/image-5.png differ diff --git a/public/assets/ogimages/image-6.png b/public/assets/ogimages/image-6.png new file mode 100644 index 0000000..8906eaa Binary files /dev/null and b/public/assets/ogimages/image-6.png differ diff --git a/public/assets/ogimages/image-7.png b/public/assets/ogimages/image-7.png new file mode 100644 index 0000000..0ef5f48 Binary files /dev/null and b/public/assets/ogimages/image-7.png differ diff --git a/public/assets/ogimages/image-8.png b/public/assets/ogimages/image-8.png new file mode 100644 index 0000000..5144a53 Binary files /dev/null and b/public/assets/ogimages/image-8.png differ diff --git a/public/assets/ogimages/image-9.png b/public/assets/ogimages/image-9.png new file mode 100644 index 0000000..38d4c99 Binary files /dev/null and b/public/assets/ogimages/image-9.png differ diff --git a/src/api/constants.ts b/src/api/constants.ts index 00b0901..d1c1c28 100644 --- a/src/api/constants.ts +++ b/src/api/constants.ts @@ -6,6 +6,7 @@ export const LOCATION_INFO = { maxZoom: 15.25, labelPosition: 'bottom-0 right-16', name: 'Fasanenstraße 1B', + popupMargin: '-mt-20', }, '!RuJBwEwOQcFrQabJnn:content.udk-berlin.de': { lng: 13.3299, @@ -14,6 +15,7 @@ export const LOCATION_INFO = { maxZoom: 14.1, labelPosition: 'bottom-0 right-8', name: 'Bundesallee 1-12', + popupMargin: '-mt-32', }, '!YIwQSiHDpoiNHDMWmC:content.udk-berlin.de': { lng: 13.32215, @@ -22,6 +24,7 @@ export const LOCATION_INFO = { maxZoom: 14.7, labelPosition: 'bottom-8 right-8', name: 'Einsteinufer 43', + popupMargin: '-mt-20', }, '!XGSFQYZUnFtQNzOBnD:content.udk-berlin.de': { lng: 13.327300406397331, @@ -30,6 +33,7 @@ export const LOCATION_INFO = { maxZoom: 13.7, labelPosition: 'bottom-8 right-8', name: 'Hardenbergstraße 33', + popupMargin: '-mt-10', }, '!GFauydmVRlpqvDETXH:content.udk-berlin.de': { lng: 13.3588243, @@ -38,6 +42,7 @@ export const LOCATION_INFO = { maxZoom: 14.66, labelPosition: 'bottom-8 left-8', name: 'Grunewaldstraße 2-5', + popupMargin: '-mt-20', }, '!eVjUBtkIgDQkQSKVxm:content.udk-berlin.de': { lng: 13.329011660461106, @@ -46,6 +51,7 @@ export const LOCATION_INFO = { maxZoom: 15.45, labelPosition: 'bottom-8 left-8', name: 'Straße des 17. Juni 118', + popupMargin: '-mt-20', }, '!OkEblSLtaWAObRcCHm:content.udk-berlin.de': { lng: 13.332849698118526, @@ -54,6 +60,7 @@ export const LOCATION_INFO = { maxZoom: 15.6, labelPosition: 'bottom-8 left-8', name: 'Lietzenburger Straße 45', + popupMargin: '-mt-32', }, '!fPuAzLpetwUYPJZwCF:content.udk-berlin.de': { lng: 13.30389, @@ -62,6 +69,7 @@ export const LOCATION_INFO = { maxZoom: 15.89, labelPosition: 'bottom-8 left-8', name: 'Mierendorffstraße 28-30', + popupMargin: '-mt-20', }, '!HXlOLrPXYbIQdkqryj:content.udk-berlin.de': { lng: 13.32345, @@ -70,6 +78,7 @@ export const LOCATION_INFO = { maxZoom: 16.8, labelPosition: 'top-8 right-8', name: 'Hardenbergstraße 41', + popupMargin: '-mt-40', }, '!RpTarLRqYYIdDCBLyV:content.udk-berlin.de': { lng: 13.3281, @@ -78,6 +87,7 @@ export const LOCATION_INFO = { maxZoom: 15.2, labelPosition: 'top-[40px] left-8', name: 'UNI.T - Theater der UdK Berlin', + popupMargin: '-mt-20', }, '!YOMEVNrNhhIBxSAhNQ:content.udk-berlin.de': { lng: 13.374843, @@ -86,6 +96,7 @@ export const LOCATION_INFO = { maxZoom: 16.1, labelPosition: 'bottom-8 left-8', name: 'Campus Uferstudios', + popupMargin: '-mb-20', }, '!CmGOTOZlDoWMcJFHkZ:content.udk-berlin.de': { lng: 13.321916506276636, @@ -94,6 +105,7 @@ export const LOCATION_INFO = { maxZoom: 15.2, labelPosition: 'bottom-8 right-8', name: 'Ernst Reuter-Platz ', + popupMargin: '-mt-20', }, '!IKWVNtgTydTHMgpUwQ:content.udk-berlin.de': { lng: 13.36031847972046, @@ -102,6 +114,7 @@ export const LOCATION_INFO = { maxZoom: 15.2, labelPosition: 'bottom-8 left-8', name: 'Kurfürstenstr. 145', + popupMargin: '-mt-20', }, '!KzIsljbqAmULTkxsCU:content.udk-berlin.de': { lng: 13.3286, @@ -110,6 +123,7 @@ export const LOCATION_INFO = { maxZoom: 14.8, labelPosition: 'bottom-8 left-8', name: 'Fasanenstraße 1B', + popupMargin: '-mt-20', }, '!BwOubkPoQLppzIHegK:content.udk-berlin.de': { lng: 13.3299, @@ -118,6 +132,7 @@ export const LOCATION_INFO = { maxZoom: 13.5, labelPosition: 'bottom-0 right-8', name: 'Bundesallee 1-12', + popupMargin: '-mt-32', }, '!sJUtqUiNvdoxXDNxCG:content.udk-berlin.de': { lng: 13.32215, @@ -126,6 +141,7 @@ export const LOCATION_INFO = { maxZoom: 14.1, labelPosition: 'bottom-8 right-8', name: 'Einsteinufer 43', + popupMargin: '-mt-20', }, '!GdQiRUtkgoGlNOxTLD:content.udk-berlin.de': { lng: 13.32731, @@ -134,6 +150,7 @@ export const LOCATION_INFO = { maxZoom: 13.2, labelPosition: 'bottom-8 right-8', name: 'Hardenbergstraße 33', + popupMargin: '-mt-10', }, '!nfZcJbplQdHUXtATXR:content.udk-berlin.de': { lng: 13.35885, @@ -142,6 +159,7 @@ export const LOCATION_INFO = { maxZoom: 14.2, labelPosition: 'bottom-8 left-8', name: 'Grunewaldstraße 2-5', + popupMargin: '-mt-20', }, '!HILXSleVJzHEpzINsZ:content.udk-berlin.de': { lng: 13.329011660461106, @@ -150,6 +168,7 @@ export const LOCATION_INFO = { maxZoom: 14.8, labelPosition: 'bottom-8 left-8', name: 'Straße des 17. Juni 118', + popupMargin: '-mt-20', }, '!CSXYmlMoZpDBByZfqj:content.udk-berlin.de': { lng: 13.33283, @@ -158,6 +177,7 @@ export const LOCATION_INFO = { maxZoom: 15.0, labelPosition: 'bottom-8 left-8', name: 'Lietzenburger Straße 45', + popupMargin: '-mt-32', }, '!oVBzAqSwRRNhoaUgMg:content.udk-berlin.de': { lng: 13.30389, @@ -166,6 +186,7 @@ export const LOCATION_INFO = { maxZoom: 15.3, labelPosition: 'bottom-8 left-8', name: 'Mierendorffstraße 28-30', + popupMargin: '-mt-20', }, '!MvJOJtvpfocMzxUHrQ:content.udk-berlin.de': { lng: 13.32345, @@ -174,6 +195,7 @@ export const LOCATION_INFO = { maxZoom: 16.4, labelPosition: 'top-8 right-8', name: 'Hardenbergstraße 41', + popupMargin: '-mt-40', }, '!CTmDtbjUTOOsurMDPc:content.udk-berlin.de': { lng: 13.374843, @@ -182,6 +204,7 @@ export const LOCATION_INFO = { maxZoom: 15.6, labelPosition: 'bottom-8 left-8', name: 'Uferstraße 23', + popupMargin: 'mt-20', }, '!YRPlAmtcyMajlqsecM:content.udk-berlin.de': { lat: 52.43893183717061, @@ -190,8 +213,9 @@ export const LOCATION_INFO = { image: 'simple', name: 'Galerie Alte Schule Adlershof', labelPosition: 'bottom-8 left-8', + popupMargin: '-mt-20', }, -}; +} as const; export const FLOORPLANS = { '!PsyURUpKAbSPistHpQ:content.udk-berlin.de': 7, diff --git a/src/api/graphql/items.ts b/src/api/graphql/items.ts index d09e918..99d6cf4 100644 --- a/src/api/graphql/items.ts +++ b/src/api/graphql/items.ts @@ -98,10 +98,6 @@ export const getFilteredGraphQLItems = cache( export const getFilteredGraphQLLocationItems = cache(async (place: string) => { const locationItems = await getLocationItems(place); const allItems = await getGraphQLItems(); - console.log( - allItems.map((i) => i.id), - locationItems, - ); return allItems.filter((item) => locationItems.includes(item.id)); }); diff --git a/src/api/rest/location.ts b/src/api/rest/location.ts index b9a8c87..d1082aa 100644 --- a/src/api/rest/location.ts +++ b/src/api/rest/location.ts @@ -5,6 +5,7 @@ import { restApiLocationsRoot, FLOORPLANS, FLOORPLAN_MARGINS, + LOCATION_INFO, } from '../constants'; import { getTreeById } from '@/api/rest/tree'; import { getPathListById } from '@/api/rest/pathlist'; @@ -76,9 +77,9 @@ export const getLocation = cache(async (id: string): Promise => { level: level, levels: levels, margin: - level && level?.id in FLOORPLAN_MARGINS - ? FLOORPLAN_MARGINS[level?.id] - : 'm-0', + building && building.id in LOCATION_INFO + ? LOCATION_INFO[building.id].popupMargin + : '-mt-20', rooms: rooms, }; }); diff --git a/src/app/[locale]/contact/page.tsx b/src/app/[locale]/contact/page.tsx index 31c92f1..f8a986f 100644 --- a/src/app/[locale]/contact/page.tsx +++ b/src/app/[locale]/contact/page.tsx @@ -8,6 +8,9 @@ export async function generateMetadata(): Promise { return { title: t('title'), description: t('description'), + openGraph: { + images: ['/assets/projects/ja/writing.png'], + }, }; } export default async function Page(props: any) { diff --git a/src/app/[locale]/imprint/page.tsx b/src/app/[locale]/imprint/page.tsx index 24b1327..e24f6a2 100644 --- a/src/app/[locale]/imprint/page.tsx +++ b/src/app/[locale]/imprint/page.tsx @@ -7,6 +7,9 @@ export async function generateMetadata(): Promise { return { title: t('title'), description: t('description'), + openGraph: { + images: ['/assets/projects/hi/writing.png'], + }, }; } diff --git a/src/app/[locale]/info/page.tsx b/src/app/[locale]/info/page.tsx index 9d0e34a..8fa3abf 100644 --- a/src/app/[locale]/info/page.tsx +++ b/src/app/[locale]/info/page.tsx @@ -7,6 +7,9 @@ export async function generateMetadata(): Promise { return { title: t('title'), description: t('description'), + openGraph: { + images: ['/assets/projects/de/writing.png'], + }, }; } export default function InfoPage() { diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 40e7add..5858483 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -11,6 +11,8 @@ import { getGraphQLFilters } from '@/api/graphql/filters'; import { AppStoreProvider } from '@/lib/useAppContext'; import { defaultInitState } from '@/lib/appStore'; import { ReactNode } from 'react'; +import { extractProjectLanguageSearchParam } from '@/app/(landing)/components/desktop/landing.server'; +import { ProjectLanguages } from '@/projects'; type RootLayoutProps = { children: ReactNode; @@ -20,15 +22,22 @@ type RootLayoutProps = { export async function generateMetadata({ params: { locale }, + searchParams, }: { params: { locale: string }; + searchParams?: { lang: ProjectLanguages }; }) { const t = await getTranslations({ locale, namespace: 'RootLayout' }); + const lang = extractProjectLanguageSearchParam(searchParams); + return { title: t('title'), description: t('description'), - metadataBase: new URL('https://localhost:3000'), + metadataBase: + process.env.NODE_ENV == 'development' + ? new URL('http://localhost:3000') + : new URL('http://rundgang-frontend-24.dev.medienhaus.udk-berlin.de'), alternates: { canonical: '/', languages: { @@ -36,6 +45,9 @@ export async function generateMetadata({ de: '/de', }, }, + openGraph: { + images: [`/assets/projects/${lang}/writing.png`], + }, }; } diff --git a/src/app/[locale]/locations/[[...slug]]/components/floorplan/index.server.tsx b/src/app/[locale]/locations/[[...slug]]/components/floorplan/index.server.tsx index b681fda..2243ab7 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/floorplan/index.server.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/floorplan/index.server.tsx @@ -1,14 +1,20 @@ import Image from 'next/image'; +import cx from 'classnames'; import Rooms from './rooms'; import { LocationItem } from '@/types/types'; export default function Floorplan({ location }: { location: LocationItem }) { return ( -
+
building background diff --git a/src/app/[locale]/locations/[[...slug]]/components/floorplan/rooms.tsx b/src/app/[locale]/locations/[[...slug]]/components/floorplan/rooms.tsx index 3b88a2c..48e8468 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/floorplan/rooms.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/floorplan/rooms.tsx @@ -30,6 +30,7 @@ export default function Rooms({ location }: any) { 'fill-white', 'stroke-black', 'stroke-[10px]', + 'pointer-events-auto ', ); } else if (location.rooms?.find((r) => r.id == room.id)) { roomRect.classList.add( @@ -38,6 +39,7 @@ export default function Rooms({ location }: any) { 'hover:fill-white', 'stroke-white', 'stroke-[10px]', + 'pointer-events-auto ', ); } else { roomRect.classList.add('fill-highlight', 'pointer-events-none'); diff --git a/src/app/[locale]/locations/[[...slug]]/components/map/map.tsx b/src/app/[locale]/locations/[[...slug]]/components/map/map.tsx index 75457bd..6fec715 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/map/map.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/map/map.tsx @@ -36,107 +36,101 @@ const MapComponent = ({ buildings, location }: MapComponentProps) => { const { markers, onClick, onMouseMove, onMouseLeave, onZoom, onLoad } = useMapFunctions(selectedBuilding, buildings, size); return ( -
-
- - {buildings && ( - <> - - - - - {buildings.features.map( - (building) => - building?.id in markers && ( - - ), - )} - - )} - - -
+
+ + {buildings && ( + <> + + + + + {buildings.features.map( + (building) => + building?.id in markers && ( + + ), + )} + + )} + +
); }; diff --git a/src/app/[locale]/locations/[[...slug]]/components/place.server.tsx b/src/app/[locale]/locations/[[...slug]]/components/place.server.tsx index 569b908..600f6d3 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/place.server.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/place.server.tsx @@ -4,6 +4,7 @@ import Subnavigation from './subnavigation/index.server'; import Cross from '@/components/icons/cross'; import SmoothButton from '@/components/smoothButton'; import { getLocation } from '@/api/rest/location'; +import { Suspense } from 'react'; type PlaceProps = { place: string; @@ -14,19 +15,21 @@ export default async function Place({ place }: PlaceProps) { return (
-
- - {location.levels?.length > 0 && } - - - - - -
+ +
+ + {location.image != 'simple' && } + + + + + +
+
); } diff --git a/src/app/[locale]/locations/[[...slug]]/components/program.server.tsx b/src/app/[locale]/locations/[[...slug]]/components/program.server.tsx index 5ddc7e0..30e9338 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/program.server.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/program.server.tsx @@ -3,6 +3,7 @@ import { ReactNodeProps } from '@/types/types'; import { Item } from '@/types/item'; import JumpToTop from '@/components/jumpToTop'; import ProjectCard from '@/components/project/card/card.server'; +import { Suspense } from 'react'; export type ProgramPageProps = { place: string; @@ -34,9 +35,11 @@ export type ProgramProps = { function ProgramContainer({ children }: ReactNodeProps) { return (
-
- {children} -
+ +
+ {children} +
+
); diff --git a/src/app/[locale]/locations/[[...slug]]/components/project.server.tsx b/src/app/[locale]/locations/[[...slug]]/components/project.server.tsx index 42b4d22..183ea1c 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/project.server.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/project.server.tsx @@ -1,5 +1,6 @@ import { getParsedItem } from '@/api/rest/item'; import SelectedProject from '@/components/project/detail/selectedProject'; +import { Suspense } from 'react'; export type ProjectPageProps = { projectId: string; @@ -10,7 +11,9 @@ export default async function ProjectPage({ projectId }: ProjectPageProps) { return (
- + + +
); } diff --git a/src/app/[locale]/locations/[[...slug]]/components/subnavigation/index.server.tsx b/src/app/[locale]/locations/[[...slug]]/components/subnavigation/index.server.tsx index c9d44ea..02fb555 100644 --- a/src/app/[locale]/locations/[[...slug]]/components/subnavigation/index.server.tsx +++ b/src/app/[locale]/locations/[[...slug]]/components/subnavigation/index.server.tsx @@ -5,7 +5,7 @@ import BuildingTitle from './title.server'; export default async function Subnavigation({ location }: any) { const t = await getTranslations('Locations'); return ( -
+
+
{children}
); diff --git a/src/app/[locale]/locations/[[...slug]]/page.tsx b/src/app/[locale]/locations/[[...slug]]/page.tsx index 6c66660..09b2ac0 100644 --- a/src/app/[locale]/locations/[[...slug]]/page.tsx +++ b/src/app/[locale]/locations/[[...slug]]/page.tsx @@ -30,9 +30,7 @@ export async function generateMetadata({ }), description: t('description'), openGraph: { - images: [ - `/assets/svg/map/ground_plan/popup/${location?.image ?? 'simple'}.svg`, - ], + images: [`/assets/ogimages/image-${location?.image ?? '9'}.png`], }, }; } @@ -55,25 +53,13 @@ export default async function LocationsPage(props: LocationsPageProps) { return ( <> - - - -
- {place && ( - - - - )} + +
+ {place && } {projectId ? ( - - - + ) : ( - place && ( - - - - ) + place && )}
diff --git a/src/app/[locale]/program/page.tsx b/src/app/[locale]/program/page.tsx index 8b4c2d6..67294fa 100644 --- a/src/app/[locale]/program/page.tsx +++ b/src/app/[locale]/program/page.tsx @@ -5,11 +5,14 @@ import { getTranslations } from 'next-intl/server'; import ProgramFilters from '@/app/program/components/filters/filters'; export type ProgramPageProps = { + params: { locale: string }; searchParams: { [key: string]: string | string[] | undefined }; }; -export async function generateMetadata(): Promise { - const t = await getTranslations('Program'); +export async function generateMetadata({ + params: { locale }, +}: ProgramPageProps): Promise { + const t = await getTranslations({ locale, namespace: 'Program' }); return { title: t('title'), description: t('description'), diff --git a/src/app/[locale]/project/[id]/page.tsx b/src/app/[locale]/project/[id]/page.tsx index 72e8e6e..0e695e6 100644 --- a/src/app/[locale]/project/[id]/page.tsx +++ b/src/app/[locale]/project/[id]/page.tsx @@ -2,31 +2,33 @@ import type { Metadata } from 'next'; import Project from './components/project.server'; import { getParsedItem } from '@/api/rest/item'; import { getById } from '@/api/rest/api'; -import { ReactNodeProps } from '@/types/types'; import { getTranslations } from 'next-intl/server'; export type ProjectsPageProps = { - params: { id: string }; + params: { id: string; locale: 'en' | 'de' }; }; export async function generateMetadata({ - params, + params: { id, locale }, }: ProjectsPageProps): Promise { // read route params - const item = await getParsedItem(decodeURIComponent(params.id)); - const t = await getTranslations('Project'); + const item = await getById(decodeURIComponent(id)); + const t = await getTranslations({ locale, namespace: 'Project' }); return { title: item.name, - description: t('meta_description', t(item.template), item.name), + description: t('meta_description', { + template: item.template, + name: item.origin.authors.map((a) => a?.name).join(', '), + }), openGraph: { images: [ { url: item.thumbnail ?? 'https://www.udk-berlin.de/public/_processed_/c/a/csm_UdK_lang_4c_01b178ddaf.jpg', - width: 400, - height: 400, + width: 800, + height: 800, alt: 'project image', }, ], diff --git a/src/app/[locale]/saved/page.tsx b/src/app/[locale]/saved/page.tsx index 9d58ad2..84ceee5 100644 --- a/src/app/[locale]/saved/page.tsx +++ b/src/app/[locale]/saved/page.tsx @@ -1,6 +1,18 @@ import Saved from './saved.client'; import { getGraphQLItems } from '@/api/graphql/items'; +import { Metadata } from 'next'; +import { getTranslations } from 'next-intl/server'; +export async function generateMetadata(): Promise { + const t = await getTranslations('Saved'); + return { + title: t('title'), + description: t('description'), + openGraph: { + images: ['/assets/projects/ru/writing.png'], + }, + }; +} export type SavedPageProps = { searchParams: { [key: string]: string | string[] | undefined }; }; diff --git a/src/app/[locale]/timeline/[[...slug]]/components/container.tsx b/src/app/[locale]/timeline/[[...slug]]/components/container.tsx index c4e81f8..eeb8238 100644 --- a/src/app/[locale]/timeline/[[...slug]]/components/container.tsx +++ b/src/app/[locale]/timeline/[[...slug]]/components/container.tsx @@ -16,18 +16,22 @@ export default function EventContainer({ children, }: EventContainerProps) { const [isOpen, setIsOpen] = useState(false); + const [close, setClose] = useState(false); const handleClick = useCallback(() => { + if (isOpen) { + setClose(true); + } setIsOpen(!isOpen); }, [isOpen]); return ( -
-
-
+
+ +
+ {isOpen && {children}}
- {isOpen && {children}}
); } diff --git a/src/app/[locale]/timeline/[[...slug]]/components/eventLocation.server.tsx b/src/app/[locale]/timeline/[[...slug]]/components/eventLocation.server.tsx index 7f01cf3..a7e92a7 100644 --- a/src/app/[locale]/timeline/[[...slug]]/components/eventLocation.server.tsx +++ b/src/app/[locale]/timeline/[[...slug]]/components/eventLocation.server.tsx @@ -11,7 +11,7 @@ export default async function EventLocation({ location }: EventLocationProps) { const events = await getEventList(location.id); if (events?.length == 0) return; return ( -
+
{events.map((event) => ( diff --git a/src/app/[locale]/timeline/[[...slug]]/components/grid.tsx b/src/app/[locale]/timeline/[[...slug]]/components/grid.tsx index 15fde1c..8e6362c 100644 --- a/src/app/[locale]/timeline/[[...slug]]/components/grid.tsx +++ b/src/app/[locale]/timeline/[[...slug]]/components/grid.tsx @@ -2,7 +2,7 @@ import { TIMES } from '@/api/constants'; export default function TimeGrid() { return ( -
+
{TIMES.map((tick: (typeof TIMES)[number]) => ( ))} diff --git a/src/app/[locale]/timeline/[[...slug]]/components/scale.tsx b/src/app/[locale]/timeline/[[...slug]]/components/scale.tsx index 618e662..266dcd6 100644 --- a/src/app/[locale]/timeline/[[...slug]]/components/scale.tsx +++ b/src/app/[locale]/timeline/[[...slug]]/components/scale.tsx @@ -2,7 +2,7 @@ import { TIMES } from '@/api/constants'; export default function TimeScale() { return ( -
+
{TIMES.map((tick) => ( ))} @@ -13,7 +13,7 @@ export default function TimeScale() { function TimeTick({ tick }: { tick: (typeof TIMES)[number] }) { return (
diff --git a/src/app/[locale]/timeline/[[...slug]]/page.tsx b/src/app/[locale]/timeline/[[...slug]]/page.tsx index ea78ff0..d9cb6dd 100644 --- a/src/app/[locale]/timeline/[[...slug]]/page.tsx +++ b/src/app/[locale]/timeline/[[...slug]]/page.tsx @@ -2,6 +2,7 @@ import TimeTable from './components/timetable.server'; import Project from './components/project.server'; import { getTranslations } from 'next-intl/server'; import { Metadata } from 'next'; +import { extractProjectLanguageSearchParam } from '@/app/(landing)/components/desktop/landing.server'; type TimelinesPageProps = { params: { slug: string[] }; @@ -12,6 +13,9 @@ export async function generateMetadata(): Promise { return { title: t('title'), description: t('description'), + openGraph: { + images: ['/assets/projects/uk/writing.png'], + }, }; } diff --git a/src/components/header/navigation/rundgangLogo.tsx b/src/components/header/navigation/rundgangLogo.tsx index 631886f..34e3593 100644 --- a/src/components/header/navigation/rundgangLogo.tsx +++ b/src/components/header/navigation/rundgangLogo.tsx @@ -7,7 +7,7 @@ export default function RundgangLogo() { src="/assets/RNG.svg" fill alt="rng" - className="object-contain py-2 dark:invert" + className="object-contain py-2 dark:invert hover:dark:filter-none" />
); diff --git a/src/components/jumpToTop.tsx b/src/components/jumpToTop.tsx index d954834..2dcf4a3 100644 --- a/src/components/jumpToTop.tsx +++ b/src/components/jumpToTop.tsx @@ -46,7 +46,7 @@ export default function JumpToTop() { return (
, + document.getElementById('modal-root')!, + path, + ) ); } diff --git a/src/components/navigationLink.tsx b/src/components/navigationLink.tsx index a2e7551..e433c74 100644 --- a/src/components/navigationLink.tsx +++ b/src/components/navigationLink.tsx @@ -3,6 +3,8 @@ import cx from 'classnames'; import { Link, usePathname } from '@/navigation'; import { useIsActive } from '@/lib/useLinkActive'; +import { useCallback } from 'react'; +import { createPortal } from 'react-dom'; export type NavigationLinkProps = { href: any; @@ -31,7 +33,7 @@ export default function NavigationLink({ aria-current={isActive ? 'page' : undefined} scroll={true} className={cx( - 'border-x-xs border-y-border border-primary bg-secondary hover:bg-highlight hover:text-primary', + 'border-x-xs border-y-border border-primary bg-secondary hover:border-b-white hover:bg-highlight hover:text-black', isActive ? activeStyle : 'rounded-md', isFirst && 'ml-xs', isLast && 'mr-xs', diff --git a/tailwind.config.ts b/tailwind.config.ts index 7e4333c..9e4a706 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -185,11 +185,12 @@ const config: Config = { animation: { bounceLeft: `bounceLeft 1s infinite`, bounceRight: `bounceRight 1s infinite`, - showModal: `showModal 1s linear normal`, - hideModal: `hideModal 1s linear normal`, - showMenu: `showMenu 1s linear normal`, - closeMenu: `closeMenu 1s linear normal`, - openTimeline: `openTimeline 1s linear normal`, + showModal: `showModal 800ms linear normal`, + hideModal: `hideModal 800ms linear normal`, + showMenu: `showMenu 800ms ease normal`, + closeMenu: `closeMenu 800ms ease normal`, + openTimeline: `openTimeline 800ms ease normal`, + closeTimeline: `closeTimeline 500ms ease-out normal`, }, keyframes: { bounceLeft: { @@ -246,7 +247,7 @@ const config: Config = { borderWidth: '0px 6px', color: 'var(--secondary)', }, - '50%': { + '60%': { transform: 'translateY(0%) scaleX(33%)', borderWidth: '0px 6px', color: 'var(--secondary)', @@ -262,7 +263,7 @@ const config: Config = { transform: 'translateX(0%) scaleX(100%)', borderWidth: '0px 2px', }, - '50%': { + '40%': { transform: 'translateY(0%) scaleX(33%)', borderWidth: '0px 6px', }, @@ -272,13 +273,25 @@ const config: Config = { }, }, openTimeline: { - '0%': { - transform: 'scaleY(0%)', - borderWidth: '2px 2px', + from: { + maxHeight: 'var(--height-header)', + overflow: 'hidden', }, - '100%': { - transform: 'scaleY(100%)', - borderWidth: '6px 2px', + to: { + maxHeight: '500px', + }, + }, + closeTimeline: { + from: { + maxHeight: '500px', + minHeight: '120px', + height: '100%', + }, + to: { + minHeight: 'var(--height-header)', + maxHeight: 'var(--height-header)', + height: 'var(--height-header)', + overflow: 'hidden', }, }, },