-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(navigationManager): employees page reference field * feat(employees): employee subpage * docs(utils): clarify examples for domainFromHostname
- Loading branch information
Showing
12 changed files
with
355 additions
and
13 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
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,52 @@ | ||
import Image from "next/image"; | ||
|
||
import Text from "src/components/text/Text"; | ||
import { ChewbaccaEmployee } from "src/types/employees"; | ||
|
||
import styles from "./employeePage.module.css"; | ||
|
||
export interface EmployeePageProps { | ||
employee: ChewbaccaEmployee; | ||
} | ||
|
||
export default function EmployeePage({ employee }: EmployeePageProps) { | ||
const image = employee.imageUrl ?? employee.imageThumbUrl ?? null; | ||
return ( | ||
employee.name && ( | ||
<div className={styles.wrapper}> | ||
<div className={styles.content}> | ||
<div className={styles.employee}> | ||
{image != null && ( | ||
<div className={styles.employeeImage}> | ||
<Image | ||
src={image} | ||
alt={employee.name} | ||
objectFit="cover" | ||
fill={true} | ||
/> | ||
</div> | ||
)} | ||
<div className={styles.employeeInfo}> | ||
<Text type={"h2"}>{employee.name}</Text> | ||
{employee.email && ( | ||
<Text type={"bodyBig"} className={styles.employeeEmail}> | ||
{employee.email} | ||
</Text> | ||
)} | ||
{employee.telephone && ( | ||
<Text type={"bodyBig"} className={styles.employeeTelephone}> | ||
{employee.telephone} | ||
</Text> | ||
)} | ||
{employee.officeName && ( | ||
<Text type={"bodyNormal"} className={styles.employeeRole}> | ||
{employee.officeName} | ||
</Text> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
</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,68 @@ | ||
.wrapper { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.content { | ||
width: 100%; | ||
max-width: 1200px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 4rem 0 8rem 0; | ||
} | ||
|
||
.employee { | ||
display: flex; | ||
gap: 3rem; | ||
flex-direction: column; | ||
margin: 1rem; | ||
|
||
@media (min-width: 1024px) { | ||
flex-direction: row; | ||
align-items: center; | ||
} | ||
} | ||
|
||
.employeeImage { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
background-color: var(--primary-black); | ||
border-radius: 12px; | ||
width: 300px; | ||
height: 300px; | ||
padding: 1rem; | ||
position: relative; | ||
|
||
@media (max-width: 1024px) { | ||
flex-direction: column; | ||
width: 200px; | ||
height: 200px; | ||
} | ||
} | ||
|
||
.employeeInfo { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 6px; | ||
} | ||
|
||
.employeeName { | ||
color: var(--primary-black); | ||
font-size: 64px; | ||
font-weight: 600; | ||
} | ||
|
||
.employeeRole { | ||
color: var(--primary-black); | ||
font-weight: 300; | ||
} | ||
|
||
.employeeEmail, | ||
.employeeTelephone { | ||
color: var(--primary-black); | ||
font-weight: 300; | ||
} |
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
Oops, something went wrong.