From 6a1764edb3aafcd4415c987056aa6bed0815dc33 Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Tue, 18 Feb 2020 13:33:09 -0500 Subject: [PATCH] [website] a small collection of upgrades (#7162) * update deps, fix logo styles on mobile, preload css and fonts * update product downloader --- .../components/default-head-tags/index.jsx | 27 +++++- website/lib/polyfills.js | 10 -- website/next.config.js | 20 +--- website/package-lock.json | 93 ++++++++++--------- website/package.json | 18 ++-- website/pages/home/index.jsx | 6 +- website/pages/home/style.css | 4 + 7 files changed, 93 insertions(+), 85 deletions(-) delete mode 100644 website/lib/polyfills.js diff --git a/website/components/default-head-tags/index.jsx b/website/components/default-head-tags/index.jsx index 13d4874fd..0e04b6f83 100644 --- a/website/components/default-head-tags/index.jsx +++ b/website/components/default-head-tags/index.jsx @@ -6,7 +6,8 @@ export default function DefaultHeadTags() { Nomad by HashiCorp - {/* ref: https://www.phpied.com/minimum-viable-sharing-meta-tags/ */} + + {/* Metadata, ref: https://www.phpied.com/minimum-viable-sharing-meta-tags/ */} + + {/* Preload */} + + + + + + + + + + + + + + {/* Styles */} [ { 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 } diff --git a/website/package-lock.json b/website/package-lock.json index f17ad7608..fd6946b0e 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -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", diff --git a/website/package.json b/website/package.json index 2dff7e108..8d721291b 100644 --- a/website/package.json +++ b/website/package.json @@ -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" }, diff --git a/website/pages/home/index.jsx b/website/pages/home/index.jsx index a1f4c3a61..919924aef 100644 --- a/website/pages/home/index.jsx +++ b/website/pages/home/index.jsx @@ -14,7 +14,11 @@ export default function Homepage() { textColor="dark" /> - HashiCorp Nomad Logo + HashiCorp Nomad Logo

Deploy and Manage Any Containerized, Legacy, or Batch Application diff --git a/website/pages/home/style.css b/website/pages/home/style.css index 637c499bb..7b1856f0d 100644 --- a/website/pages/home/style.css +++ b/website/pages/home/style.css @@ -166,6 +166,10 @@ margin: 32px 0; } + & .logo { + max-width: 100%; + } + & .g-alert { margin-bottom: 32px; }