-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/acmucsd/membership-portal-u…
…i-v2 into nikhil/filter-pickup-events merging from main
- Loading branch information
Showing
21 changed files
with
480 additions
and
62 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,46 @@ | ||
import { GifSafeImage, Typography } from '@/components/common'; | ||
import { config } from '@/lib'; | ||
import { PublicResume } from '@/lib/types/apiResponses'; | ||
import { getFileName, getProfilePicture } from '@/lib/utils'; | ||
import Link from 'next/link'; | ||
import { BsDownload } from 'react-icons/bs'; | ||
import styles from './style.module.scss'; | ||
|
||
interface ResumeProps { | ||
resume: PublicResume; | ||
} | ||
|
||
const Resume = ({ resume }: ResumeProps) => { | ||
const fileName = getFileName(resume.url, 'resume.pdf'); | ||
|
||
return ( | ||
<div className={styles.wrapper}> | ||
{resume.user ? ( | ||
<Link href={`${config.userProfileRoute}${resume.user.handle}`} className={styles.user}> | ||
<GifSafeImage | ||
src={getProfilePicture(resume.user)} | ||
width={48} | ||
height={48} | ||
alt={`Profile picture for ${resume.user.firstName} ${resume.user.lastName}`} | ||
className={styles.image} | ||
/> | ||
<Typography variant="label/large" className={styles.name}> | ||
{resume.user.firstName} {resume.user.lastName} | ||
</Typography> | ||
<p className={styles.info}> | ||
{resume.user.major} ({resume.user.graduationYear}) | ||
</p> | ||
</Link> | ||
) : null} | ||
<Link href={resume.url} className={styles.resume}> | ||
<BsDownload className={styles.image} /> | ||
<p className={styles.name}>{fileName}</p> | ||
<p className={styles.info}> | ||
Uploaded {new Date(resume.lastUpdated).toLocaleDateString('en-US', { dateStyle: 'full' })} | ||
</p> | ||
</Link> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Resume; |
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,73 @@ | ||
@use 'src/styles/vars.scss' as vars; | ||
|
||
.wrapper { | ||
background-color: var(--theme-elevated-background); | ||
border: 1px solid var(--theme-elevated-stroke); | ||
border-radius: 0.5rem; | ||
display: flex; | ||
gap: 1rem; | ||
padding: 1rem; | ||
word-break: break-word; | ||
|
||
@media (max-width: vars.$breakpoint-md) { | ||
flex-direction: column; | ||
gap: 2rem; | ||
} | ||
|
||
.user, | ||
.resume { | ||
align-items: center; | ||
display: grid; | ||
gap: 0.5rem 1rem; | ||
grid-template-areas: | ||
'image name' | ||
'image info'; | ||
grid-template-columns: auto 1fr; | ||
|
||
.image { | ||
grid-area: image; | ||
} | ||
|
||
.name { | ||
grid-area: name; | ||
} | ||
|
||
&:hover .name { | ||
text-decoration: underline; | ||
} | ||
|
||
.info { | ||
grid-area: info; | ||
} | ||
} | ||
|
||
.user { | ||
flex: 1 0 0; | ||
|
||
.image { | ||
border-radius: 5rem; | ||
object-fit: contain; | ||
} | ||
} | ||
|
||
.resume { | ||
flex: 1.5 0 0; | ||
|
||
.image { | ||
height: 1.5rem; | ||
width: 1.5rem; | ||
|
||
@media (max-width: vars.$breakpoint-md) { | ||
width: 3rem; | ||
} | ||
} | ||
|
||
.name { | ||
color: var(--theme-blue-text-button); | ||
} | ||
|
||
.info { | ||
color: var(--theme-text-on-background-2); | ||
} | ||
} | ||
} |
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,14 @@ | ||
export type Styles = { | ||
image: string; | ||
info: string; | ||
name: string; | ||
resume: string; | ||
user: string; | ||
wrapper: string; | ||
}; | ||
|
||
export type ClassNames = keyof Styles; | ||
|
||
declare const styles: Styles; | ||
|
||
export default styles; |
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
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
Oops, something went wrong.