-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Resource hub * Fix type errors & lint * Edit video cards * Capitalize tags * Fix responsive video cards * Move resource hub into its dedicated page * Fix arrow-back color
- Loading branch information
Showing
21 changed files
with
1,455 additions
and
53 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,80 @@ | ||
import { Typography, Chip, Box } from '@mui/material' | ||
|
||
import css from './styles.module.css' | ||
// import { ECOSYSTEM_DATA_URL } from '@/config/constants' | ||
import { type KnowledgeResource } from './Resources' | ||
import YouTubeEmbed from '../YouTube' | ||
// import clsx from 'clsx' | ||
|
||
export const ProjectCard = (resource: KnowledgeResource): JSX.Element => { | ||
const CardContent = ( | ||
<div style={{ width: '100%' }}> | ||
{resource.type === 'Video' && ( | ||
<YouTubeEmbed embedId={resource.url.slice(-11)} /> | ||
)} | ||
|
||
<Typography | ||
fontWeight='500' | ||
mt={resource.type === 'Video' ? 2 : 0} | ||
mb={0.5} | ||
> | ||
{resource.name} | ||
</Typography> | ||
|
||
{resource.type === 'Blog post' && ( | ||
<Typography | ||
variant='body2' | ||
color='text.secondary' | ||
className={css.description} | ||
> | ||
{resource.abstract} | ||
</Typography> | ||
)} | ||
|
||
<div className={css.categories}> | ||
<Chip | ||
sx={{ | ||
borderRadius: '4px', | ||
height: '23px', | ||
fontSize: '14px', | ||
cursor: 'pointer' | ||
}} | ||
className={css.chip} | ||
label={resource.type} | ||
/> | ||
{resource.tags.map(tag => ( | ||
<Chip | ||
key={tag} | ||
sx={{ | ||
borderRadius: '4px', | ||
height: '23px', | ||
fontSize: '14px', | ||
cursor: 'pointer' | ||
}} | ||
className={css.chip} | ||
label={tag} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
) | ||
|
||
return ( | ||
<Box | ||
sx={{ | ||
transition: 'all 0.2s ease-in-out', | ||
border: '1px solid', | ||
borderColor: 'transparent', | ||
'&:hover': { | ||
borderColor: 'secondary.light' | ||
}, | ||
width: '100%' | ||
}} | ||
className={css.card} | ||
> | ||
<a href={resource.url} target='_blank' rel='noreferrer' style={{ width: '100%' }}> | ||
{CardContent} | ||
</a> | ||
</Box> | ||
) | ||
} |
Oops, something went wrong.