-
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(homepage): migrate hard coded cards component to cms cards l…
…ayout component
- Loading branch information
Showing
6 changed files
with
77 additions
and
107 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ParseMarkdownAndHtml } from './parseMarkdownAndHtml'; | ||
|
||
const Cards = ({ id, title, cards }) => { | ||
return ( | ||
<div className="section" id={id}> | ||
<div className="container"> | ||
<div className="section-head"> | ||
<h2>{title}</h2> | ||
</div> | ||
<div className="row"> | ||
{cards.map((card) => ( | ||
<Card key={card.data.title} card={card} /> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
const Card = ({ card }) => ( | ||
<div className="col-md-4 mb-3"> | ||
<div className="section-main"> | ||
<h3>{card.data.title}</h3> | ||
<div> | ||
<img src={card.data.image} alt={card.data.title} /> | ||
<strong>{card.data.description}</strong> | ||
<ParseMarkdownAndHtml markdown={true}> | ||
{card.content} | ||
</ParseMarkdownAndHtml> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default Cards; |
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