-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract job card and event card to create NonProjectCard co…
…mponent
- Loading branch information
Showing
3 changed files
with
51 additions
and
100 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,39 @@ | ||
import Image from 'next/image'; | ||
import { ParseMarkdownAndHtml } from '../parseMarkdownAndHtml'; | ||
|
||
const NonProjectCard = ({ card }) => ( | ||
<div className="col-md-4 mb-3" id={card.data.id}> | ||
<div | ||
className="section-main" | ||
style={{ | ||
minHeight: '20rem', | ||
backgroundColor: `${card.data.color.background}`, | ||
color: 'white', | ||
border: `1rem solid ${card.data.color.border}`, | ||
}} | ||
> | ||
<h3>{card.data.title}</h3> | ||
<div> | ||
<div | ||
className="avatar" | ||
style={{ backgroundColor: card.data.color.avatar }} | ||
> | ||
<div className="image-container"> | ||
<Image | ||
src={card.data.image} | ||
alt={card.data.title} | ||
fill | ||
className="image" | ||
/> | ||
</div> | ||
</div> | ||
<strong>{card.data.description}</strong> | ||
<ParseMarkdownAndHtml markdown={true}> | ||
{card.content} | ||
</ParseMarkdownAndHtml> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default NonProjectCard; |