Upgrade global styles (#10692)

* website: upgrade global-styles packages

* website: move community page to CSS modules

* website: replace g-container with g-grid-container

* website: hide alert-banner on mobile

* website: backfill missing global type styles

* website: fix code font-size in download custom content

* website: bump to latest patched dependencies
This commit is contained in:
Zachary Shilton 2021-08-20 12:20:01 -04:00 committed by GitHub
parent ac41e30614
commit c42ea82883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 653 additions and 640 deletions

View File

@ -7,7 +7,7 @@ export default function CalloutBlade({ title, callouts }) {
return ( return (
<div className={styles.calloutBlade}> <div className={styles.calloutBlade}>
<div className={styles.contentWrapper}> <div className={styles.contentWrapper}>
<h3>{title}</h3> <h3 className="g-type-display-3">{title}</h3>
<ul <ul
className={classNames(styles.callouts, { className={classNames(styles.callouts, {
[styles.twoUp]: callouts.length % 3 !== 0, [styles.twoUp]: callouts.length % 3 !== 0,
@ -21,7 +21,9 @@ export default function CalloutBlade({ title, callouts }) {
<InlineSvg src={callout.icon} className={styles.icon} /> <InlineSvg src={callout.icon} className={styles.icon} />
<div className={styles.flexWrapper}> <div className={styles.flexWrapper}>
<div className={styles.infoWrapper}> <div className={styles.infoWrapper}>
{callout.title && <h5>{callout.title}</h5>} {callout.title && (
<h5 className="g-type-display-5">{callout.title}</h5>
)}
<p>{callout.description}</p> <p>{callout.description}</p>
</div> </div>
<div className={styles.linkWrapper}> <div className={styles.linkWrapper}>

View File

@ -12,7 +12,7 @@ export default function CloudOfferingsList({ offerings }) {
> >
<img src={offering.image} alt={offering.title} /> <img src={offering.image} alt={offering.title} />
<span className="g-type-label-strong">{offering.eyebrow}</span> <span className="g-type-label-strong">{offering.eyebrow}</span>
<h4>{offering.title}</h4> <h4 className="g-type-display-4">{offering.title}</h4>
<p>{offering.description}</p> <p>{offering.description}</p>
<Button <Button
title={offering.link.text} title={offering.link.text}

View File

@ -24,7 +24,7 @@ function CTA({ title, description, link }) {
return ( return (
<div className={s.cta}> <div className={s.cta}>
<InlineSvg className={s.stackIcon} src={ConsulStack} /> <InlineSvg className={s.stackIcon} src={ConsulStack} />
<h3>{title}</h3> <h3 className="g-type-display-3">{title}</h3>
<p className={s.description}>{description}</p> <p className={s.description}>{description}</p>
<Button <Button
title={link.text} title={link.text}

View File

@ -3,7 +3,7 @@ import Link from 'next/link'
export default function Footer({ openConsentManager }) { export default function Footer({ openConsentManager }) {
return ( return (
<footer className="g-footer"> <footer className="g-footer">
<div className="g-container"> <div className="g-grid-container">
<div className="left"> <div className="left">
<Link href="/intro"> <Link href="/intro">
<a>Intro</a> <a>Intro</a>

View File

@ -4,7 +4,7 @@
display: flex; display: flex;
border-top: 1px solid var(--gray-5); border-top: 1px solid var(--gray-5);
& .g-container { & .g-grid-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -13,12 +13,12 @@ export default function HcpCalloutSection({
return ( return (
<div className={styles.hcpCalloutSection} id={id}> <div className={styles.hcpCalloutSection} id={id}>
<div className={styles.header}> <div className={styles.header}>
<h2>{header}</h2> <h2 className="g-type-display-2">{header}</h2>
</div> </div>
<div className={styles.content}> <div className={styles.content}>
<div className={styles.info}> <div className={styles.info}>
<h1>{title}</h1> <h1 className="g-type-display-1">{title}</h1>
<span className={styles.chin}>{chin}</span> <span className={styles.chin}>{chin}</span>
<p className={styles.description}>{description}</p> <p className={styles.description}>{description}</p>
<div className={styles.links}> <div className={styles.links}>

View File

@ -14,5 +14,6 @@
color: var(--gray-2); color: var(--gray-2);
} }
.heading { .heading {
composes: g-type-display-2 from global;
margin: 0; margin: 0;
} }

1225
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,30 +4,30 @@
"version": "0.0.1", "version": "0.0.1",
"author": "HashiCorp", "author": "HashiCorp",
"dependencies": { "dependencies": {
"@hashicorp/mktg-global-styles": "^3.1.0", "@hashicorp/mktg-global-styles": "4.0.0",
"@hashicorp/mktg-logos": "^1.2.0", "@hashicorp/mktg-logos": "^1.2.0",
"@hashicorp/platform-code-highlighting": "^0.1.1", "@hashicorp/platform-code-highlighting": "^0.1.1",
"@hashicorp/platform-runtime-error-monitoring": "^0.1.0", "@hashicorp/platform-runtime-error-monitoring": "^0.1.0",
"@hashicorp/platform-util": "^0.1.0", "@hashicorp/platform-util": "^0.1.0",
"@hashicorp/react-alert": "^5.0.1", "@hashicorp/react-alert": "^5.0.1",
"@hashicorp/react-alert-banner": "^6.1.2", "@hashicorp/react-alert-banner": "6.2.0",
"@hashicorp/react-button": "^5.2.1", "@hashicorp/react-button": "^5.2.1",
"@hashicorp/react-call-to-action": "^3.1.2", "@hashicorp/react-call-to-action": "^3.1.2",
"@hashicorp/react-callouts": "^7.1.2", "@hashicorp/react-callouts": "^7.1.2",
"@hashicorp/react-code-block": "^4.1.4", "@hashicorp/react-code-block": "^4.1.4",
"@hashicorp/react-consent-manager": "6.0.0", "@hashicorp/react-consent-manager": "6.0.0",
"@hashicorp/react-content": "^7.0.2", "@hashicorp/react-content": "8.0.1",
"@hashicorp/react-docs-page": "^13.5.1", "@hashicorp/react-docs-page": "14.0.1",
"@hashicorp/react-enterprise-alert": "^5.0.1", "@hashicorp/react-enterprise-alert": "^5.0.1",
"@hashicorp/react-featured-slider": "^4.1.2", "@hashicorp/react-featured-slider": "^4.1.2",
"@hashicorp/react-hashi-stack-menu": "^2.0.6", "@hashicorp/react-hashi-stack-menu": "^2.0.6",
"@hashicorp/react-head": "^3.1.1", "@hashicorp/react-head": "^3.1.1",
"@hashicorp/react-hero": "^7.3.2", "@hashicorp/react-hero": "7.3.3",
"@hashicorp/react-image": "^4.0.2", "@hashicorp/react-image": "^4.0.2",
"@hashicorp/react-inline-svg": "^6.0.2", "@hashicorp/react-inline-svg": "^6.0.2",
"@hashicorp/react-learn-callout": "^1.1.2", "@hashicorp/react-learn-callout": "^1.1.2",
"@hashicorp/react-markdown-page": "^1.3.1", "@hashicorp/react-markdown-page": "1.4.2",
"@hashicorp/react-product-downloads-page": "^2.3.1", "@hashicorp/react-product-downloads-page": "2.4.0",
"@hashicorp/react-product-features-list": "^4.1.2", "@hashicorp/react-product-features-list": "^4.1.2",
"@hashicorp/react-section-header": "^5.0.3", "@hashicorp/react-section-header": "^5.0.3",
"@hashicorp/react-stepped-feature-list": "^4.0.2", "@hashicorp/react-stepped-feature-list": "^4.0.2",

View File

@ -17,7 +17,7 @@ export default function NotFound() {
return ( return (
<div id="p-404"> <div id="p-404">
<h1>Page Not Found</h1> <h1 className="g-type-display-1">Page Not Found</h1>
<p> <p>
We&lsquo;re sorry but we can&lsquo;t find the page you&lsquo;re looking We&lsquo;re sorry but we can&lsquo;t find the page you&lsquo;re looking
for. for.

View File

@ -39,7 +39,7 @@ export default function App({ Component, pageProps }) {
/> />
</HashiHead> </HashiHead>
{ALERT_BANNER_ACTIVE && ( {ALERT_BANNER_ACTIVE && (
<AlertBanner {...alertBannerData} product="consul" /> <AlertBanner {...alertBannerData} product="consul" hideOnMobile />
)} )}
<HashiStackMenu /> <HashiStackMenu />
<ProductSubnav /> <ProductSubnav />

View File

@ -2,10 +2,11 @@ import VerticalTextBlockList from '@hashicorp/react-vertical-text-block-list'
import SectionHeader from '@hashicorp/react-section-header' import SectionHeader from '@hashicorp/react-section-header'
import Head from 'next/head' import Head from 'next/head'
import { productSlug } from 'data/metadata' import { productSlug } from 'data/metadata'
import s from './style.module.css'
export default function CommunityPage() { export default function CommunityPage() {
return ( return (
<div id="p-community"> <div className={s.root}>
<Head> <Head>
<title key="title">Community | Consul by HashiCorp</title> <title key="title">Community | Consul by HashiCorp</title>
</Head> </Head>

View File

@ -1,8 +0,0 @@
#p-community {
max-width: var(--site-max-width);
margin: 72px auto;
& .g-section-header {
margin-bottom: 100px;
}
}

View File

@ -0,0 +1,9 @@
.root {
composes: g-grid-container from global;
margin-top: 72px;
margin-bottom: 72px;
& :global(.g-section-header) {
margin-bottom: 100px;
}
}

View File

@ -8,6 +8,10 @@
border-radius: 3px; border-radius: 3px;
margin: 24px 0; margin: 24px 0;
& code {
font-size: 0.8125rem;
}
& :first-child { & :first-child {
margin-top: 0; margin-top: 0;
} }

View File

@ -70,7 +70,7 @@
@media print { @media print {
/* @todo: remove alongside @hashicorp/react-global-styles/_temporary-to-remove/layout.css */ /* @todo: remove alongside @hashicorp/react-global-styles/_temporary-to-remove/layout.css */
.g-container { .g-grid-container {
/* /*
* A measure is the number of characters in a line of text. * A measure is the number of characters in a line of text.
* Long lines fatique readers as they find the start of a new line of text. * Long lines fatique readers as they find the start of a new line of text.

View File

@ -1,7 +1,5 @@
/* Global Component Styles */ /* Global Component Styles */
@import '~@hashicorp/mktg-global-styles/style.css'; @import '~@hashicorp/mktg-global-styles/style.css';
@import '~@hashicorp/mktg-global-styles/_temporary-to-remove/layout.css';
@import '~@hashicorp/mktg-global-styles/_temporary-to-remove/tables.css';
:root { :root {
--highlight-color: var(--consul-link); --highlight-color: var(--consul-link);
@ -15,8 +13,6 @@
@import '~@hashicorp/react-callouts/style.css'; @import '~@hashicorp/react-callouts/style.css';
@import '~@hashicorp/react-call-to-action/style.css'; @import '~@hashicorp/react-call-to-action/style.css';
@import '~@hashicorp/react-consent-manager/style.css'; @import '~@hashicorp/react-consent-manager/style.css';
@import '~@hashicorp/react-content/style.css';
@import '~@hashicorp/react-docs-page/style.css';
@import '~@hashicorp/react-enterprise-alert/style.css'; @import '~@hashicorp/react-enterprise-alert/style.css';
@import '~@hashicorp/react-featured-slider/style.css'; @import '~@hashicorp/react-featured-slider/style.css';
@import '~@hashicorp/react-learn-callout/style.css'; @import '~@hashicorp/react-learn-callout/style.css';
@ -39,7 +35,6 @@
@import '../components/use-cases-layout/style.css'; @import '../components/use-cases-layout/style.css';
/* Local Pages */ /* Local Pages */
@import './community/style.css';
@import './home/style.css'; @import './home/style.css';
/* Print Styles */ /* Print Styles */