forked from NaicheD/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add homepage ctas (datahub-project#8866)
Co-authored-by: Harshal Sheth <[email protected]>
- Loading branch information
1 parent
aef49b8
commit aff1e7a
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
docs-website/src/pages/_components/CardCTAs/cardCTAs.module.scss
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,24 @@ | ||
.flexCol { | ||
display: flex; | ||
} | ||
|
||
.ctaCard { | ||
flex-direction: row; | ||
align-items: flex-start; | ||
justify-content: space-between; | ||
row-gap: 1rem; | ||
padding: 1rem; | ||
&:hover { | ||
text-decoration: none; | ||
border: 1px solid var(--ifm-color-primary); | ||
background-color: var(--ifm-background-surface-color); | ||
} | ||
margin-bottom: 1rem; | ||
flex: 1; | ||
} | ||
|
||
.ctaHeading { | ||
margin-bottom: 0; | ||
display: flex; | ||
align-items: center; | ||
} |
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 React from "react"; | ||
import clsx from "clsx"; | ||
import styles from "./cardCTAs.module.scss"; | ||
import useBaseUrl from "@docusaurus/useBaseUrl"; | ||
import { ArrowRightOutlined } from "@ant-design/icons"; | ||
|
||
const cardsContent = [ | ||
{ | ||
label: "Data Mesh", | ||
title: "Data Products, Delivered", | ||
url: "https://www.acryldata.io/blog/data-products-in-datahub-everything-you-need-to-know", | ||
}, | ||
{ | ||
label: "Data Contracts", | ||
title: "End-to-end Reliability in Data", | ||
url: "https://www.acryldata.io/blog/data-contracts-in-datahub-combining-verifiability-with-holistic-data-management", | ||
}, | ||
{ | ||
label: "Shift Left", | ||
title: "Developer-friendly Data Governance", | ||
url: "https://www.acryldata.io/blog/the-3-must-haves-of-metadata-management-part-2", | ||
}, | ||
]; | ||
|
||
const Card = ({ label, title, url }) => { | ||
return ( | ||
<div className={clsx("col col--4 flex", styles.flexCol)}> | ||
<a href={url} target="_blank" className={clsx("card", styles.ctaCard)}> | ||
<div> | ||
<strong>{label}</strong> | ||
<h3 className={styles.ctaHeading}>{title} </h3> | ||
</div> | ||
<ArrowRightOutlined /> | ||
</a> | ||
</div> | ||
); | ||
}; | ||
|
||
const CardCTAs = () => | ||
cardsContent?.length > 0 ? ( | ||
<div style={{ padding: "2vh 0" }}> | ||
<div className="container"> | ||
<div className="row"> | ||
{cardsContent.map((props, idx) => ( | ||
<Card key={idx} {...props} /> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
) : null; | ||
|
||
export default CardCTAs; |
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