diff --git a/website/package-lock.json b/website/package-lock.json index 70c4d752c..5045bb15f 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1344,13 +1344,13 @@ "integrity": "sha512-/Mgw6ufzjsysw5U0v7c0tCXMQeE4BSbGeasDaTuh1r6jQ+2Cokl1XhPqKqXn4+xkcx3CIVdyoUYOSLmgzutn3Q==" }, "@hashicorp/nextjs-scripts": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@hashicorp/nextjs-scripts/-/nextjs-scripts-10.0.1.tgz", - "integrity": "sha512-IwKr0HQvt6NZoJ9SlTBXqgDHYi4ticfcLM3mH3WH8b0Mr2B+Y5I/VzOOHiLxVcWmJmOECuV9EY+TaxlE5h2YQQ==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@hashicorp/nextjs-scripts/-/nextjs-scripts-10.0.2.tgz", + "integrity": "sha512-s18LHSyrWcgNbsFEnyMLUa7jaLBz2/UXu984UrxVoapHTq5eL4HEk1dJZ3yHcRCJjG7TEYvaXzgkL4IHc1UR5w==", "requires": { "@bugsnag/js": "7.1.1", "@bugsnag/plugin-react": "7.1.1", - "@hashicorp/react-consent-manager": "2.1.1", + "@hashicorp/react-consent-manager": "2.1.2", "@hashicorp/react-enterprise-alert": "^2.1.0", "@hashicorp/react-tabs": "^0.4.0", "@hashicorp/remark-plugins": "3.0.0", @@ -1436,9 +1436,9 @@ } }, "@hashicorp/react-consent-manager": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@hashicorp/react-consent-manager/-/react-consent-manager-2.1.1.tgz", - "integrity": "sha512-tIVR3LhDnwcHAxa+lrfrjJmthynCzpVrn9MYHcqKBVrCozV3SCC9zeRjPSlvxU9/GfAYAefull2hH/kg/duyOw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hashicorp/react-consent-manager/-/react-consent-manager-2.1.2.tgz", + "integrity": "sha512-AjCFIEZPa6K9UFr3Nvjy8cLHuGDa2qpQat/QVFHKp0t/acflC8z7xIDh8Yo9RBCp+YF+gF+g50ll/hhzX0pEeQ==", "requires": { "@hashicorp/react-button": "^2.2.0", "@hashicorp/react-toggle": "^1.0.1", @@ -8814,9 +8814,9 @@ "integrity": "sha512-8hfl5RD6P7rEeIbzStBz3h4f+BQHfq/ABtoU6gXKQv5OcZhnmrIpG7e1pYaZ8hS9e0mp+bxUj08fnDUbKctYyA==" }, "jsx-ast-utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.3.0.tgz", - "integrity": "sha512-3HNoc7nZ1hpZIKB3hJ7BlFRkzCx2BynRtfSwbkqZdpRdvAPsGMnzclPwrvDBS7/lalHTj21NwIeaEpysHBOudg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz", + "integrity": "sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w==", "requires": { "array-includes": "^3.1.1", "object.assign": "^4.1.0" diff --git a/website/package.json b/website/package.json index 99dfb2b2e..588cbdcbc 100644 --- a/website/package.json +++ b/website/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "author": "HashiCorp", "dependencies": { - "@hashicorp/nextjs-scripts": "^10.0.1", + "@hashicorp/nextjs-scripts": "^10.0.2", "@hashicorp/react-button": "^2.2.0", "@hashicorp/react-code-block": "^1.2.7", "@hashicorp/react-content": "3.0.0-0", diff --git a/website/pages/404.jsx b/website/pages/404.jsx index 7e4b985cf..66f42b934 100644 --- a/website/pages/404.jsx +++ b/website/pages/404.jsx @@ -1,32 +1,2 @@ -import Link from 'next/link' -import { useEffect } from 'react' - -export default function NotFound() { - useEffect(() => { - if ( - typeof window !== 'undefined' && - typeof window?.analytics?.track === 'function' && - typeof window?.document?.referrer === 'string' && - typeof window?.location?.href === 'string' - ) - window.analytics.track(window.location.href, { - category: '404 Response', - label: window.document.referrer || 'No Referrer', - }) - }, []) - - return ( -
-

Page Not Found

-

- We‘re sorry but we can‘t find the page you‘re looking - for. -

-

- - Back to Home - -

-
- ) -} +import NotFound from './not-found' +export default NotFound diff --git a/website/pages/not-found/index.jsx b/website/pages/not-found/index.jsx new file mode 100644 index 000000000..92933a397 --- /dev/null +++ b/website/pages/not-found/index.jsx @@ -0,0 +1,33 @@ +import s from './style.module.css' +import Link from 'next/link' +import { useEffect } from 'react' + +export default function NotFound() { + useEffect(() => { + if ( + typeof window !== 'undefined' && + typeof window?.analytics?.track === 'function' && + typeof window?.document?.referrer === 'string' && + typeof window?.location?.href === 'string' + ) + window.analytics.track(window.location.href, { + category: '404 Response', + label: window.document.referrer || 'No Referrer', + }) + }, []) + + return ( +
+

Page Not Found

+

+ We‘re sorry but we can‘t find the page you‘re looking + for. +

+

+ + Back to Home + +

+
+ ) +} diff --git a/website/pages/not-found/style.module.css b/website/pages/not-found/style.module.css new file mode 100644 index 000000000..3a5dfec90 --- /dev/null +++ b/website/pages/not-found/style.module.css @@ -0,0 +1,36 @@ +.root { + composes: .g-grid-container from global; + display: flex; + flex-direction: column; + justify-content: center; + margin: 64px auto; /* this is being overridden at the request of the learn team */ + max-width: 784px; + min-height: 50vh; + padding-inline: 32px; + text-align: center; + + @media (--large) { + padding-inline: 24px; + } + + & h1 { + font-size: 1.5rem; + letter-spacing: -0.004em; + line-height: 1.375em; + + @media (--medium-up) { + font-size: 1.75rem; + line-height: 1.321em; + } + + @media (--large) { + font-size: 2rem; + letter-spacing: -0.006em; + line-height: 1.313em; + } + } + + & a { + color: var(--highlight-color); + } +}