-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Continue work on event detail page - Introduce fraunces font on h1 and h2 headings --------- Co-authored-by: henrikskog <[email protected]>
- Loading branch information
1 parent
48a67ee
commit 78be80a
Showing
9 changed files
with
109 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ node_modules/ | |
.next | ||
# environment variables | ||
.env | ||
.envrc | ||
.env.production | ||
.envrc | ||
!.env.example | ||
|
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,26 @@ | ||
import type { Event } from "@dotkomonline/types" | ||
import Image from "next/image" | ||
import type { FC } from "react" | ||
|
||
interface Props { | ||
event: Event | ||
} | ||
|
||
export const EventHeader: FC<Props> = ({ event }) => { | ||
const imageUrl = event.imageUrl || "https://via.placeholder.com/1920x1080" | ||
|
||
return ( | ||
<div className="flex flex-col gap-8"> | ||
<Image | ||
src={imageUrl} | ||
alt="Banner" | ||
width="0" | ||
height="0" | ||
sizes="100%" | ||
style={{ objectFit: "cover" }} | ||
className="h-[30rem] w-full rounded-2xl" | ||
/> | ||
<h1>{event.title}</h1> | ||
</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,15 +1,28 @@ | ||
import type { Event } from "@dotkomonline/types" | ||
import type { Committee, Company, Event } from "@dotkomonline/types" | ||
import Image from "next/image" | ||
import type { FC } from "react" | ||
|
||
interface Props { | ||
event: Event | ||
committees: Committee[] | ||
companies: Company[] | ||
} | ||
|
||
export const EventInfoBox: FC<Props> = ({ event }) => { | ||
const mapToImageAndName = (item: Committee | Company) => ( | ||
<div key={item.name} className="flex flex-row gap-2 items-center"> | ||
{item.image && <Image src={item.image} alt={item.name} width={25} height={25} />} | ||
<p>{item.name}</p> | ||
</div> | ||
) | ||
|
||
export const EventInfoBox: FC<Props> = ({ event, committees, companies }) => { | ||
const committeeList = committees.map(mapToImageAndName) | ||
const companyList = companies.map(mapToImageAndName) | ||
|
||
return ( | ||
<div className="mr-10 w-[60%]"> | ||
<h2>{event.title}</h2> | ||
<p>{event.description}</p> | ||
<div className="mr-10 w-full flex flex-col gap-8 md:w-[60%]"> | ||
<div className="flex flex-row gap-8">{[...committeeList, ...companyList]}</div> | ||
<p className="bg-slate-2 p-5 text-[18px] rounded-2xl">{event.description}</p> | ||
</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
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