add alert banner to website

pull/7802/head
Jeff Escalante 2020-04-28 13:53:30 -04:00
parent 5105bf3d67
commit f0df674e07
5 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,8 @@
export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'Announcing',
url: 'https://www.hashicorp.com/products/consul/service-on-azure',
text: 'HashiCorp Consul Service on Azure Public Beta Available Now',
}

View File

@ -1179,6 +1179,28 @@
"resolved": "https://registry.npmjs.org/@hashicorp/react-alert/-/react-alert-2.0.0.tgz",
"integrity": "sha512-9CvkSJ2Onvy+1sXg0n0E3V4X0tl4u9wmp10ISQ4Wh55tstVeBBj/WhqBg8+MZlm9Ib9K903J2A3aDSWBo6k44w=="
},
"@hashicorp/react-alert-banner": {
"version": "3.0.13",
"resolved": "https://registry.npmjs.org/@hashicorp/react-alert-banner/-/react-alert-banner-3.0.13.tgz",
"integrity": "sha512-/xybDm/YKtisg+NS6aneWqCe/fn9UA/S16vnV2L9zeRWc0cluMSWajmbM7NyCSowkfJzEduuMNGOAjO23rY7yA==",
"requires": {
"@hashicorp/react-global-styles": "^4.2.0",
"js-cookie": "2.2.0",
"slugify": "1.3.4"
},
"dependencies": {
"js-cookie": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.0.tgz",
"integrity": "sha1-Gywnmm7s44ChIWi5JIUmWzWx7/s="
},
"slugify": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.4.tgz",
"integrity": "sha512-KP0ZYk5hJNBS8/eIjGkFDCzGQIoZ1mnfQRYS5WM3273z+fxGWXeN0fkwf2ebEweydv9tioZIHGZKoF21U07/nw=="
}
}
},
"@hashicorp/react-button": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/@hashicorp/react-button/-/react-button-2.1.9.tgz",

View File

@ -9,6 +9,7 @@
"@hashicorp/mktg-assets": "^1.0.0-alpha.7",
"@hashicorp/nextjs-scripts": "^6.1.0",
"@hashicorp/react-alert": "^2.0.0",
"@hashicorp/react-alert-banner": "^3.0.13",
"@hashicorp/react-button": "^2.1.9",
"@hashicorp/react-call-to-action": "^0.1.6",
"@hashicorp/react-case-study-slider": "^2.0.13",

View File

@ -5,13 +5,15 @@ import Router from 'next/router'
import ProductSubnav from '../components/subnav'
import MegaNav from '@hashicorp/react-mega-nav'
import Footer from '../components/footer'
import AlertBanner from '@hashicorp/react-alert-banner'
import { ConsentManager, open } from '@hashicorp/react-consent-manager'
import consentManagerConfig from '../lib/consent-manager-config'
import bugsnagClient from '../lib/bugsnag'
import anchorLinkAnalytics from '../lib/anchor-link-analytics'
import alertBannerData, { ALERT_BANNER_ACTIVE } from '../data/alert-banner'
import Error from './_error'
import Head from 'next/head'
import HashiHead from '@hashicorp/react-head'
import anchorLinkAnalytics from '../lib/anchor-link-analytics'
Router.events.on('routeChangeStart', NProgress.start)
Router.events.on('routeChangeError', NProgress.done)
@ -80,6 +82,9 @@ class NextApp extends App {
{ href: '/fonts/dejavu/mono.woff2', as: 'font' },
]}
/>
{ALERT_BANNER_ACTIVE && (
<AlertBanner {...alertBannerData} theme="consul" />
)}
<MegaNav product="Consul" />
<ProductSubnav />
<div className="content">

View File

@ -35,6 +35,7 @@
@import '~@hashicorp/react-call-to-action/dist/style.css';
@import '~@hashicorp/react-case-study-slider/dist/style.css';
@import '~@hashicorp/react-code-block/dist/style.css';
@import '~@hashicorp/react-alert-banner/dist/style.css';
/* Local Components */
@import '../components/footer/style.css';