diff --git a/website/pages/downloads/img/vault-logo.svg b/website/components/downloads-props/img/vault-logo.svg similarity index 100% rename from website/pages/downloads/img/vault-logo.svg rename to website/components/downloads-props/img/vault-logo.svg diff --git a/website/components/downloads-props/index.jsx b/website/components/downloads-props/index.jsx new file mode 100644 index 000000000000..0670332d0fba --- /dev/null +++ b/website/components/downloads-props/index.jsx @@ -0,0 +1,76 @@ +import Link from 'next/link' +import Button from '@hashicorp/react-button' +import { VERSION, CHANGELOG_URL } from 'data/version' +import s from '../../pages/downloads/style.module.css' + +const changelogUrl = CHANGELOG_URL.length + ? CHANGELOG_URL + : `https://github.com/hashicorp/vault/blob/v${VERSION}/CHANGELOG.md` + +export default function DownloadsProps(preMerchandisingSlot) { + return { + changelog: changelogUrl, + getStartedDescription: + 'Follow step-by-step tutorials on the essentials of Vault.', + getStartedLinks: [ + { + label: 'Getting Started with the CLI', + href: 'http://learn.hashicorp.com/collections/vault/getting-started', + }, + { + label: 'Getting Started with Vault UI', + href: 'http://learn.hashicorp.com/collections/vault/getting-started-ui', + }, + { + label: 'Vault on HCP', + href: 'http://learn.hashicorp.com/collections/vault/getting-started-ui', + }, + { + label: 'View all Vault tutorials', + href: 'https://learn.hashicorp.com/vault', + }, + ], + logo: ( + Vault + ), + tutorialLink: { + href: 'https://learn.hashicorp.com/vault', + label: 'View Tutorials at HashiCorp Learn', + }, + merchandisingSlot: ( + <> + {preMerchandisingSlot && preMerchandisingSlot} + +
+
+

+ Want all of the power and security of Vault, without the + complexity and overhead of managing it yourself? +

+
+
+ +

+ Release notes are available in our{' '} + + documentation + + . +

+ + ), + } +} diff --git a/website/pages/downloads/enterprise.jsx b/website/pages/downloads/enterprise.jsx new file mode 100644 index 000000000000..0ceed5de712d --- /dev/null +++ b/website/pages/downloads/enterprise.jsx @@ -0,0 +1,38 @@ +import { VERSION } from 'data/version' +import { productSlug } from 'data/metadata' +import ProductDownloadsPage from '@hashicorp/react-product-downloads-page' +import { generateStaticProps } from '@hashicorp/react-product-downloads-page/server' +import baseProps from 'components/downloads-props' +import s from './style.module.css' + +export default function DownloadsPage(staticProps) { + return ( + <> + + + The following shall apply unless your organization has a + separately signed Enterprise License Agreement or Evaluation + Agreement governing your use of the package: Enterprise packages + in this repository are subject to the license terms located in the + package. Please read the license terms prior to using the package. + Your installation and use of the package constitutes your + acceptance of these terms. If you do not accept the terms, do not + use the package. + +

+ )} + {...staticProps} + /> + + ) +} + +export async function getStaticProps() { + return generateStaticProps({ + product: productSlug, + latestVersion: VERSION, + }) +} diff --git a/website/pages/downloads/index.jsx b/website/pages/downloads/index.jsx index 962b61fc541a..843069964afd 100644 --- a/website/pages/downloads/index.jsx +++ b/website/pages/downloads/index.jsx @@ -1,64 +1,11 @@ -import Link from 'next/link' -import Button from '@hashicorp/react-button' import ProductDownloadsPage from '@hashicorp/react-product-downloads-page' import { generateStaticProps } from '@hashicorp/react-product-downloads-page/server' -import { VERSION, CHANGELOG_URL } from 'data/version' +import { VERSION } from 'data/version' import { productSlug } from 'data/metadata' -import s from './style.module.css' +import baseProps from 'components/downloads-props' export default function DownloadsPage(staticProps) { - const changelogUrl = CHANGELOG_URL.length - ? CHANGELOG_URL - : `https://github.com/hashicorp/vault/blob/v${VERSION}/CHANGELOG.md` - - return ( - - } - tutorialLink={{ - href: 'https://learn.hashicorp.com/vault', - label: 'View Tutorials at HashiCorp Learn', - }} - merchandisingSlot={ - <> - -

- Release notes are available in our{' '} - - documentation - - . -

- - } - /> - ) + return } export function getStaticProps() { @@ -67,25 +14,3 @@ export function getStaticProps() { latestVersion: VERSION, }) } - -function MerchandisingSlot() { - return ( -
-
-

- Want all of the power and security of Vault, without the complexity - and overhead of managing it yourself? -

-
-
- ) -} diff --git a/website/pages/downloads/style.module.css b/website/pages/downloads/style.module.css index b3b0fec63c6a..e7be765a7213 100644 --- a/website/pages/downloads/style.module.css +++ b/website/pages/downloads/style.module.css @@ -39,3 +39,7 @@ } } } + +.legalNotice { + margin-bottom: 50px; +}