Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Homepage] <IoHomeCallToAction /> component #13164

Merged
merged 2 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions website/components/io-home-call-to-action/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import ReactCallToAction from '@hashicorp/react-call-to-action'
import s from './style.module.css'

interface IoHomeCallToActionProps {
brand: string
heading: string
content: string
links: Array<{
text: string
url: string
type?: 'inbound'
}>
}

export default function IoHomeCallToAction({
brand,
heading,
content,
links,
}: IoHomeCallToActionProps) {
return (
<div className={s.callToAction}>
<ReactCallToAction
variant="compact"
heading={heading}
content={content}
product={brand}
theme="dark"
links={links}
/>
</div>
)
}
7 changes: 7 additions & 0 deletions website/components/io-home-call-to-action/style.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.callToAction {
background-image: linear-gradient(52.3deg, #2c2d2f 39.83%, #626264 96.92%);

& > * {
background-color: transparent;
}
}
21 changes: 21 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@hashicorp/platform-util": "^0.1.0",
"@hashicorp/react-alert-banner": "^7.0.1",
"@hashicorp/react-button": "^6.0.1",
"@hashicorp/react-call-to-action": "^4.1.1",
"@hashicorp/react-consent-manager": "^7.0.1",
"@hashicorp/react-docs-page": "^14.4.2",
"@hashicorp/react-featured-slider": "^5.0.1",
Expand Down
19 changes: 15 additions & 4 deletions website/pages/home/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import IoHomeHero from 'components/io-home-hero'
import IoHomeCallToAction from 'components/io-home-call-to-action'
import IoHomePreFooter from 'components/io-home-pre-footer'

export async function getStaticProps() {
return { props: {} }
}

export default function Homepage({ content }) {
return (
<>
Expand Down Expand Up @@ -46,6 +43,20 @@ export default function Homepage({ content }) {
]}
/>

<IoHomeCallToAction
brand="vault"
heading="Get HashiCorp Certified"
content="Level up your concepts, skills, and use cases associated with open source HashiCorp Vault."
links={[
{ text: 'Prepare & get certified', url: '#TODO' },
{
text: 'Learn more about Vault Ops Pro',
url: '#TODO',
type: 'inbound',
},
]}
/>

<IoHomePreFooter
brand="vault"
heading="Next steps"
Expand Down
3 changes: 1 addition & 2 deletions website/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import Homepage, { getStaticProps } from './home'
export { getStaticProps }
import Homepage from './home'
export default Homepage