[website] a small collection of upgrades (#7162)

* update deps, fix logo styles on mobile, preload css and fonts
* update product downloader
This commit is contained in:
Jeff Escalante 2020-02-18 13:33:09 -05:00 committed by GitHub
parent ef36b66b9a
commit 6a1764edb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 93 additions and 85 deletions

View file

@ -6,7 +6,8 @@ export default function DefaultHeadTags() {
<title key="title">Nomad by HashiCorp</title>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
{/* ref: https://www.phpied.com/minimum-viable-sharing-meta-tags/ */}
{/* Metadata, ref: https://www.phpied.com/minimum-viable-sharing-meta-tags/ */}
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<meta
@ -32,6 +33,30 @@ export default function DefaultHeadTags() {
key="image"
/>
<link type="image/png" rel="icon" href="/favicon.ico" />
{/* Preload */}
<link rel="preload" href="/css/nprogress.css" as="style"></link>
<link rel="preload" href="/css/nprogress.css" as="style"></link>
<link rel="preload" href="/fonts/klavika/medium.woff2" as="font"></link>
<link rel="preload" href="/fonts/gilmer/light.woff2" as="font"></link>
<link rel="preload" href="/fonts/gilmer/regular.woff2" as="font"></link>
<link rel="preload" href="/fonts/gilmer/medium.woff2" as="font"></link>
<link rel="preload" href="/fonts/gilmer/bold.woff2" as="font"></link>
<link rel="preload" href="/fonts/metro-sans/book.woff2" as="font"></link>
<link
rel="preload"
href="/fonts/metro-sans/regular.woff2"
as="font"
></link>
<link
rel="preload"
href="/fonts/metro-sans/semi-bold.woff2"
as="font"
></link>
<link rel="preload" href="/fonts/metro-sans/bold.woff2" as="font"></link>
<link rel="preload" href="/fonts/dejavu/mono.woff2" as="font"></link>
{/* Styles */}
<link rel="stylesheet" href="/css/nprogress.css"></link>
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap"

View file

@ -1,10 +0,0 @@
// If you run into issues with features missing in IE11, you likely need to
// make additions to this file for those features.
// See https://github.com/zloirock/core-js
import 'core-js/fn/array'
import 'core-js/fn/object/assign'
import 'core-js/fn/string/ends-with'
import 'core-js/fn/string/includes'
import 'core-js/fn/string/repeat'
import 'core-js/fn/string/starts-with'
import 'core-js/fn/symbol'

View file

@ -8,7 +8,8 @@ module.exports = withHashicorp({
})({
experimental: {
css: true,
granularChunks: true,
modern: true,
polyfillsOptimization: true,
rewrites: () => [
{
source: '/api/:path*',
@ -17,23 +18,6 @@ module.exports = withHashicorp({
]
},
exportTrailingSlash: true,
webpack(config) {
// Add polyfills
const originalEntry = config.entry
config.entry = async () => {
const entries = await originalEntry()
let polyEntry = entries['static/runtime/polyfills.js']
if (polyEntry && !polyEntry.includes('./lib/polyfills.js')) {
if (!Array.isArray(polyEntry)) {
entries['static/runtime/polyfills.js'] = [polyEntry]
}
entries['static/runtime/polyfills.js'].unshift('./lib/polyfills.js')
}
return entries
}
return config
},
env: {
HASHI_ENV: process.env.HASHI_ENV
}

View file

@ -2844,20 +2844,21 @@
"integrity": "sha512-9CvkSJ2Onvy+1sXg0n0E3V4X0tl4u9wmp10ISQ4Wh55tstVeBBj/WhqBg8+MZlm9Ib9K903J2A3aDSWBo6k44w=="
},
"@hashicorp/react-button": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@hashicorp/react-button/-/react-button-2.1.4.tgz",
"integrity": "sha512-wcQprFILI/lTOCi5CV4xegoHsSo/7D6HfjU/fzvSTvFirU3mLLlnR3yNE4hFBlL+M7zmQq4wN5lTtSls8l337A==",
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@hashicorp/react-button/-/react-button-2.1.5.tgz",
"integrity": "sha512-eE99jDgJMmK8B5z2VcC3qs4rBH+7OJi+vdCR1fdsCqFJOb3jw3mv1FsOT/Jd95q542usvGEOT9jeQqod9kVeVw==",
"requires": {
"@hashicorp/react-global-styles": "^4.0.9",
"@hashicorp/react-inline-svg": "^1.0.0"
"@hashicorp/react-inline-svg": "^1.0.0",
"slugify": "^1.3.6"
}
},
"@hashicorp/react-case-study-slider": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@hashicorp/react-case-study-slider/-/react-case-study-slider-2.0.5.tgz",
"integrity": "sha512-9PKMAI8/iO3kddWiyL+r81QwLkwZKDgh8PhqxqHqS5TJtbVPt+U6l20DusG9rDpRj8jCX+L9K2RSUPc5Rc7spw==",
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@hashicorp/react-case-study-slider/-/react-case-study-slider-2.0.6.tgz",
"integrity": "sha512-BZnHmhjdWzPiBNuYk995ZQNT/5T3B16aJllPnBhMFU1Rh7AYEFn9pH9e+LpE1wP+TlPQVMnXnVAE34B/bhby5g==",
"requires": {
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-image": "^2.0.1",
"marked": "^0.7.0"
}
@ -2880,11 +2881,11 @@
}
},
"@hashicorp/react-consent-manager": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@hashicorp/react-consent-manager/-/react-consent-manager-2.0.4.tgz",
"integrity": "sha512-P0wz45m5q0Y4tHOPWCvvPr5tiWsObvxL/s1gheKOxrk/DbP1AoAueZAeSpp/99b9negqoAGEFNxgWY9FxvH3PA==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@hashicorp/react-consent-manager/-/react-consent-manager-2.0.5.tgz",
"integrity": "sha512-LAQNeMSaZR7m9QSMJkWSQDH0cdM5tU5JwaX95dTIq5lwC66Fv4D7iNod4XItsSlTMNuFvpE12CD4wDy4vP74OA==",
"requires": {
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-toggle": "^1.0.1",
"@segment/in-eu": "^0.2.1",
"js-cookie": "^2.2.0",
@ -2912,11 +2913,11 @@
"integrity": "sha512-hMmGfwNUBJjZE/hW6+dfCDwwfqqye+BIIcQgpoiHTrv6y9bPprPAQ6k5NRhBGtpkP1My4C5MQVQKBwHt+jIa/Q=="
},
"@hashicorp/react-footer": {
"version": "3.1.7",
"resolved": "https://registry.npmjs.org/@hashicorp/react-footer/-/react-footer-3.1.7.tgz",
"integrity": "sha512-CTeQw2pGBySyfiN39oNfbtWzdw7+8IXKzP+yoE4AT4GFn4vb2UXVJQTmZoTSivEtnmomXNTpaYo6vl04AzTevQ==",
"version": "3.1.8",
"resolved": "https://registry.npmjs.org/@hashicorp/react-footer/-/react-footer-3.1.8.tgz",
"integrity": "sha512-7WSl0ueDuhVQmsJtyK97P1e70kMQjL5t1POylx+hbzs5ZKeym03oVzV2xLx4LoDBO1UkJxc5j5X36R7qP/9Q/g==",
"requires": {
"@hashicorp/react-newsletter-signup-form": "^2.0.4"
"@hashicorp/react-newsletter-signup-form": "^2.0.5"
}
},
"@hashicorp/react-global-styles": {
@ -2925,14 +2926,14 @@
"integrity": "sha512-2I5cgGrn34rBsmcoku4Wbu9qq/WramrYn8r9brMVNfHqvnJojORfIr0uMBEheh3ic9fZiN7XtnbovYcqt4Oy2g=="
},
"@hashicorp/react-hero": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@hashicorp/react-hero/-/react-hero-3.0.1.tgz",
"integrity": "sha512-fSD2iDTzh1XThKhyeDBaazcs0OK+aXnG/janj1/R+teY9vOLRcy34k2fHNLY0X1dPjJETo5dHyYc2lyBxUf/cQ==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@hashicorp/react-hero/-/react-hero-3.0.2.tgz",
"integrity": "sha512-X6rJiVQqlgjt/PMPo54VQEzAtyfv4LR4kbyOneuLPEedNJ+nz5i3Rx3l8lv+RqXkLQHwysv4N9py1XIGNHGhLg==",
"requires": {
"@hashicorp/js-utils": "^1.0.8-alpha.0",
"@hashicorp/localstorage-polyfill": "^1.0.12",
"@hashicorp/react-alert": "^2.0.0",
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-image": "^2.0.1",
"@hashicorp/react-text-input": "^2.0.0",
"formik": "^1.5.8",
@ -2964,11 +2965,11 @@
}
},
"@hashicorp/react-logo-grid": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@hashicorp/react-logo-grid/-/react-logo-grid-2.0.6.tgz",
"integrity": "sha512-UyZsmFtOaOJjZM7us7P7315dGnzKWYWZczGlBIkESnpmNMEqp11ixGpHTaohZ/XB2TwP1hbp1DOwZuuv0VyneQ==",
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/@hashicorp/react-logo-grid/-/react-logo-grid-2.0.7.tgz",
"integrity": "sha512-idtXomowEvk6ddTM4juq7BkDeubw0RES5nfH5Jq9I293KB9RfTCQ4Wg/1Dqq6XmfEl0dxrAVZEfwqXNofdDDzg==",
"requires": {
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-image": "^2.0.1",
"@tippy.js/react": "^2.1.2"
}
@ -2982,12 +2983,12 @@
}
},
"@hashicorp/react-newsletter-signup-form": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@hashicorp/react-newsletter-signup-form/-/react-newsletter-signup-form-2.0.4.tgz",
"integrity": "sha512-fHI77gU3QsFkrEPyuc1D8JBfX0k/RoKMX5RIg34f7WPGpU69D31RldLOWw735eI26MJV4VcsattE1sX2QwsgKg==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@hashicorp/react-newsletter-signup-form/-/react-newsletter-signup-form-2.0.5.tgz",
"integrity": "sha512-aQd8rqeF4hp4uxrlNlr/ZE1MwDBSzdjVq2fXoa5aYawx2tTEwNSZADCZNfmRGud3esQHoqzwXQaQ424WGbyjLg==",
"requires": {
"@hashicorp/localstorage-polyfill": "^1.0.12",
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-checkbox-input": "^2.0.0",
"@hashicorp/react-text-input": "^2.0.0",
"formik": "^1.5.8",
@ -2998,11 +2999,11 @@
}
},
"@hashicorp/react-product-downloader": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@hashicorp/react-product-downloader/-/react-product-downloader-2.4.0.tgz",
"integrity": "sha512-AzUbfO4kIx/WwNlI2JZRBzmOZPg2sTVOIrmZB5YWuBs9fNjcacg6XjoKsKGcKAG6rnNbN2AEirXa1/Qw11g+3w==",
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@hashicorp/react-product-downloader/-/react-product-downloader-2.5.1.tgz",
"integrity": "sha512-4dRSWvWNQQ8AZP3SEkp8pziVZKe+41DUrHBqdTQhXZwwbysVsKL/z0M27FMkYJG3iGcNuRhV3bfgESmVvuW4wQ==",
"requires": {
"@hashicorp/react-button": "^2.1.4"
"@hashicorp/react-button": "^2.1.5"
}
},
"@hashicorp/react-section-header": {
@ -3022,14 +3023,14 @@
}
},
"@hashicorp/react-text-and-content": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@hashicorp/react-text-and-content/-/react-text-and-content-4.0.2.tgz",
"integrity": "sha512-3ePnqXo60o/ClhdbiMZ6emq04QMTp5qLocbHAGhL05JeIHP3htNLjhkBaSiHI1QdUlt4RUfeFd35inyWZWXbKg==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/@hashicorp/react-text-and-content/-/react-text-and-content-4.0.3.tgz",
"integrity": "sha512-I8kbMM7Shi7s+xjofyFCyfjb9zyVqB6zKDUJ5IkNCdaUyz/yefVKWRdd+LPrkBvJqWC/GQ5GrA3773VHbW2MsA==",
"requires": {
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-code-block": "^1.2.4",
"@hashicorp/react-image": "^2.0.1",
"@hashicorp/react-logo-grid": "^2.0.6",
"@hashicorp/react-logo-grid": "^2.0.7",
"marked": "^0.7.0"
}
},
@ -3047,9 +3048,9 @@
"integrity": "sha512-KW7HBPKHdzk+R34pAFuqkcdKRCe04Qvv6xJw8FCeieuq/mBMd4dI+ZNSEbm68+STUKoiq5OAp2dWzAF/iwmKqg=="
},
"@hashicorp/react-use-cases": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@hashicorp/react-use-cases/-/react-use-cases-1.0.3.tgz",
"integrity": "sha512-x969ggH+8DRxs/YrR+UzsVhnvPKpXwovfnfyVv8Pbr5wSu5h3sUhRJgjHEuYOd/xoolR57QsUu4V95lYk848LA==",
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@hashicorp/react-use-cases/-/react-use-cases-1.0.4.tgz",
"integrity": "sha512-IB+HcC5X54vPMW+JOPkqxsrgN+NmqIXytsL1qOsP5yJ1PeEbS8Sy1YCrOjx06ZkVCv/qXM49VTvHqj/B006lFQ==",
"requires": {
"@hashicorp/react-image": "^2.0.1",
"marked": "^0.7.0"
@ -5833,9 +5834,9 @@
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"compare-versions": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.5.1.tgz",
"integrity": "sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==",
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
"integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
"dev": true
},
"component-emitter": {
@ -8888,9 +8889,9 @@
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
},
"husky": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/husky/-/husky-4.2.1.tgz",
"integrity": "sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz",
"integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==",
"dev": true,
"requires": {
"chalk": "^3.0.0",

View file

@ -8,22 +8,22 @@
"@bugsnag/plugin-react": "^6.5.0",
"@hashicorp/nextjs-scripts": "^6.0.0-2",
"@hashicorp/react-alert": "^2.0.0",
"@hashicorp/react-button": "^2.1.4",
"@hashicorp/react-case-study-slider": "^2.0.5",
"@hashicorp/react-consent-manager": "^2.0.4",
"@hashicorp/react-button": "^2.1.5",
"@hashicorp/react-case-study-slider": "^2.0.6",
"@hashicorp/react-consent-manager": "^2.0.5",
"@hashicorp/react-content": "^2.2.0",
"@hashicorp/react-docs-sidenav": "^3.0.2",
"@hashicorp/react-docs-sitemap": "^1.0.0",
"@hashicorp/react-footer": "^3.1.7",
"@hashicorp/react-footer": "^3.1.8",
"@hashicorp/react-global-styles": "^4.0.9",
"@hashicorp/react-hero": "^3.0.1",
"@hashicorp/react-hero": "^3.0.2",
"@hashicorp/react-image": "^2.0.1",
"@hashicorp/react-inline-svg": "^1.0.0",
"@hashicorp/react-mega-nav": "^4.0.1-2",
"@hashicorp/react-product-downloader": "^2.4.0",
"@hashicorp/react-product-downloader": "^2.5.1",
"@hashicorp/react-section-header": "^2.0.0",
"@hashicorp/react-text-and-content": "^4.0.2",
"@hashicorp/react-use-cases": "^1.0.3",
"@hashicorp/react-text-and-content": "^4.0.3",
"@hashicorp/react-use-cases": "^1.0.4",
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
"babel-plugin-import-glob-array": "^0.2.0",
"highlight.js": "^9.18.1",
@ -42,7 +42,7 @@
"devDependencies": {
"dart-linkcheck": "^2.0.12",
"glob": "^7.1.6",
"husky": "^4.2.1",
"husky": "^4.2.3",
"inquirer": "^7.0.4",
"prettier": "^1.19.1"
},

View file

@ -14,7 +14,11 @@ export default function Homepage() {
textColor="dark"
/>
<img src={require('./img/logo.svg')} alt="HashiCorp Nomad Logo" />
<img
className="logo"
src={require('./img/logo.svg')}
alt="HashiCorp Nomad Logo"
/>
<h1 className="g-type-display-3">
Deploy and Manage Any Containerized, Legacy, or Batch Application

View file

@ -166,6 +166,10 @@
margin: 32px 0;
}
& .logo {
max-width: 100%;
}
& .g-alert {
margin-bottom: 32px;
}