-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,793 additions
and
117 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...app/[locale]/locations/[place]/layout.tsx → ...p/[locale]/locations/[...slug]/layout.tsx
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 |
---|---|---|
@@ -1,17 +1,11 @@ | ||
export default function LocationsLayout({ | ||
children, | ||
selected, | ||
program, | ||
}: { | ||
children: React.ReactNode; | ||
selected: React.ReactNode; | ||
program: React.ReactNode; | ||
}) { | ||
return ( | ||
<div className="grid h-content grid-cols-1 p-0 xs:grid-cols-5"> | ||
{children} | ||
{program} | ||
{selected} | ||
</div> | ||
); | ||
} |
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,23 @@ | ||
import Place from './place.server'; | ||
import ProgramPage from './program.server'; | ||
import Project from './project.server'; | ||
|
||
type LocationsPageProps = { | ||
params: { slug: string[] }; | ||
}; | ||
|
||
export default async function LocationsPage(props: LocationsPageProps) { | ||
const place = props.params.slug[0]; | ||
const projectId = props.params.slug[1]; | ||
|
||
return ( | ||
<> | ||
<Place place={place} /> | ||
{projectId ? ( | ||
<Project projectId={projectId} /> | ||
) : ( | ||
<ProgramPage place={place} /> | ||
)} | ||
</> | ||
); | ||
} |
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,15 @@ | ||
import { getParsedItem } from '@/api/rest/item'; | ||
import Project from '@/app/project/[id]/components/project.server'; | ||
|
||
export type ProjectPageProps = { | ||
projectId: string; | ||
}; | ||
|
||
export default async function ProjectPage({ projectId }: ProjectPageProps) { | ||
const item = await getParsedItem(projectId); | ||
return ( | ||
<div className="z-50 col-span-2 h-content overflow-y-scroll"> | ||
<Project item={item} withCloseOption /> | ||
</div> | ||
); | ||
} |
15 changes: 0 additions & 15 deletions
15
src/app/[locale]/locations/[place]/@selected/(..)project/[id]/page.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import { ProjectCardProps } from '@/components/project/card.server'; | ||
import {Link} from "@/navigation"; | ||
import { Link } from '@/navigation'; | ||
|
||
export default function ProjectCardAuthors({ item }: ProjectCardProps) { | ||
export default function ProjectCardAuthors({ | ||
item, | ||
linkPathname = '/project', | ||
}: ProjectCardProps) { | ||
if (item.authors.length === 0) { | ||
return <></>; | ||
} | ||
|
||
return ( | ||
<Link | ||
href={{ | ||
pathname: `/project/[id]`, | ||
params: { id: item.id }, | ||
}} | ||
className="w-full max-w-full" | ||
> | ||
<div className="pb-gutter-md text-right text-xs"> | ||
{item.authors?.join(' ')} | ||
</div> | ||
</Link> | ||
<Link href={`${linkPathname}/${item.id}`} className="w-full max-w-full"> | ||
<div className="pb-gutter-md text-right text-xs"> | ||
{item.authors?.join(' ')} | ||
</div> | ||
</Link> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import Image from '@/components/image'; | ||
import { ProjectCardProps } from '@/components/project/card.server'; | ||
import SaveButton from '@/components/saveButton.client'; | ||
import {Link} from "@/navigation"; | ||
import { Link } from '@/navigation'; | ||
|
||
export default function ProjectCardImage({ item }: ProjectCardProps) { | ||
export default function ProjectCardImage({ | ||
item, | ||
linkPathname = '/project', | ||
}: ProjectCardProps) { | ||
return ( | ||
<div className="relative w-full overflow-hidden"> | ||
<Link | ||
href={{ | ||
pathname: `/project/[id]`, | ||
params: { id: item.id }, | ||
}} | ||
> | ||
<Image | ||
className="rounded-md bg-primary" | ||
src={item.thumbnail != '' ? item.thumbnail : '/assets/placeholder.png'} | ||
/> | ||
</Link> | ||
<SaveButton itemId={item.id} /> | ||
<Link href={`${linkPathname}/${item.id}`}> | ||
<Image | ||
className="rounded-md bg-primary" | ||
src={ | ||
item.thumbnail != '' ? item.thumbnail : '/assets/placeholder.png' | ||
} | ||
alt="thumbnail" | ||
/> | ||
</Link> | ||
<SaveButton itemId={item.id} /> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,16 +1,13 @@ | ||
import { ProjectCardProps } from '@/components/project/card.server'; | ||
import {Link} from "@/navigation"; | ||
import { Link } from '@/navigation'; | ||
|
||
export default function ProjectCardName({ item }: ProjectCardProps) { | ||
export default function ProjectCardName({ | ||
item, | ||
linkPathname = '/project', | ||
}: ProjectCardProps) { | ||
return ( | ||
<Link | ||
href={{ | ||
pathname: `/project/[id]`, | ||
params: { id: item.id }, | ||
}} | ||
className="w-full max-w-full" | ||
> | ||
<div className="py-gutter-md text-sm">{item.name}</div> | ||
</Link> | ||
<Link href={`${linkPathname}/${item.id}`} className="w-full max-w-full"> | ||
<div className="py-gutter-md text-sm">{item.name}</div> | ||
</Link> | ||
); | ||
} |