Adds AlertBanner to promote HashiConf EU

This commit is contained in:
Brandon Romano 2021-05-17 15:07:18 -07:00
parent cb09e62fac
commit 5a290aabef
5 changed files with 64 additions and 19636 deletions

View File

@ -0,0 +1,13 @@
export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'June 8-11',
url: 'https://hashiconf.com/europe/?utm_source=DocsBanner',
text:
'The countdown to HashiConf Europe is on, and the full schedule is now live.',
linkText: 'View Schedule',
// Set the `expirationDate prop with a datetime string (e.g. `2020-01-31T12:00:00-07:00`)
// if you'd like the component to stop showing at or after a certain date
expirationDate: null,
}

19680
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@
"@hashicorp/mktg-global-styles": "3.0.1", "@hashicorp/mktg-global-styles": "3.0.1",
"@hashicorp/mktg-logos": "1.0.2", "@hashicorp/mktg-logos": "1.0.2",
"@hashicorp/nextjs-scripts": "18.2.0", "@hashicorp/nextjs-scripts": "18.2.0",
"@hashicorp/react-alert-banner": "^6.1.1",
"@hashicorp/react-button": "5.0.0", "@hashicorp/react-button": "5.0.0",
"@hashicorp/react-docs-page": "13.2.0", "@hashicorp/react-docs-page": "13.2.0",
"@hashicorp/react-hashi-stack-menu": "2.0.3", "@hashicorp/react-hashi-stack-menu": "2.0.3",

View File

@ -12,6 +12,8 @@ import NProgress from '@hashicorp/nextjs-scripts/lib/nprogress'
import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager' import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager'
import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag' import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag'
import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics' import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics'
import AlertBanner from '@hashicorp/react-alert-banner'
import alertBannerData, { ALERT_BANNER_ACTIVE } from 'data/alert-banner'
NProgress({ Router }) NProgress({ Router })
const { ConsentManager, openConsentManager } = createConsentManager({ const { ConsentManager, openConsentManager } = createConsentManager({
@ -32,6 +34,9 @@ export default function App({ Component, pageProps }) {
image="https://www.packer.io/img/og-image.png" image="https://www.packer.io/img/og-image.png"
icon={[{ href: '/favicon.ico' }]} icon={[{ href: '/favicon.ico' }]}
/> />
{ALERT_BANNER_ACTIVE && (
<AlertBanner {...alertBannerData} product="packer" />
)}
<HashiStackMenu /> <HashiStackMenu />
<ProductSubnav /> <ProductSubnav />
<div className="content"> <div className="content">

View File

@ -8,6 +8,7 @@
--highlight-color: var(--packer-link); --highlight-color: var(--packer-link);
} }
@import '~@hashicorp/react-alert-banner/style.css';
@import '~@hashicorp/react-button/styles/index.css'; @import '~@hashicorp/react-button/styles/index.css';
@import '~@hashicorp/react-consent-manager/style.css'; @import '~@hashicorp/react-consent-manager/style.css';
@import '~@hashicorp/react-content/style.css'; @import '~@hashicorp/react-content/style.css';