|
| 1 | +import React, {type ReactNode} from 'react'; |
| 2 | +import clsx from 'clsx'; |
| 3 | +import type {Props} from '@theme/NotFound/Content'; |
| 4 | + |
| 5 | +export default function NotFoundContent({className}: Props): ReactNode { |
| 6 | + return ( |
| 7 | + <main className={clsx('container margin-vert--xl', className)}> |
| 8 | + <style> |
| 9 | + {` |
| 10 | + html { |
| 11 | + font-family: system-ui,-apple-system,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; |
| 12 | + font-display: swap; |
| 13 | + text-align: center; |
| 14 | + color: #555; |
| 15 | + fill: currentColor; |
| 16 | + } |
| 17 | +
|
| 18 | + p { |
| 19 | + margin: 0; |
| 20 | + } |
| 21 | +
|
| 22 | + h1 { |
| 23 | + font-size: 32px; |
| 24 | + line-height: 1.125; |
| 25 | + font-weight: 600; |
| 26 | + letter-spacing: 0.004em; |
| 27 | + margin: 0 0 1em 0; |
| 28 | + width: 420px; |
| 29 | + display: flex; |
| 30 | + align-items: center; |
| 31 | + justify-content: center; |
| 32 | + } |
| 33 | +
|
| 34 | + h2 { |
| 35 | + font-size: 112px; |
| 36 | + font-weight: 600; |
| 37 | + line-height: .7; |
| 38 | + } |
| 39 | + h3 { |
| 40 | + font-size: 100px; |
| 41 | + font-weight: 600; |
| 42 | + line-height: .7; |
| 43 | + } |
| 44 | + h2, h3 { |
| 45 | + color: hsl(210, 50%, 20%); |
| 46 | + margin: 0; |
| 47 | + } |
| 48 | + /* h2, h3 { |
| 49 | + background: linear-gradient(#eee, #333); |
| 50 | + -webkit-background-clip: text; |
| 51 | + background-clip: text; |
| 52 | + -webkit-text-fill-color: transparent; |
| 53 | + } */ |
| 54 | + .card404 { |
| 55 | + display: flex; |
| 56 | + align-items: center; |
| 57 | + justify-content: center; |
| 58 | + flex-flow: column wrap; |
| 59 | + } |
| 60 | +
|
| 61 | + .cols { |
| 62 | + display: flex; |
| 63 | + width: min-content; |
| 64 | + flex-flow: row; |
| 65 | + } |
| 66 | +
|
| 67 | + .rows { |
| 68 | + display: flex; |
| 69 | + flex-flow: row wrap; |
| 70 | + width: min-content; |
| 71 | + } |
| 72 | +
|
| 73 | + .rows * { |
| 74 | + width: 100%; |
| 75 | + } |
| 76 | +
|
| 77 | + .fa-w-8 { |
| 78 | + width: 8px; |
| 79 | + vertical-align: -5px; |
| 80 | + } |
| 81 | +
|
| 82 | + svg[data-icon='compass'] { |
| 83 | + width: 188px; |
| 84 | + padding: 32px; |
| 85 | + fill: url(#gradient) #447799; |
| 86 | + animation: 3s infinite alternate cubic-bezier(0.5, 0, 0.32, 0.67) wiggle |
| 87 | + } |
| 88 | +
|
| 89 | + @keyframes wiggle { |
| 90 | + from { transform: rotate(0); } |
| 91 | + 20% { transform: rotate(5deg); } |
| 92 | + 45% { transform: rotate(-10deg); } |
| 93 | + 70% { transform: rotate(15deg); } |
| 94 | + to { transform: rotate(0); } |
| 95 | + } |
| 96 | +
|
| 97 | + a, a:visited, a:active { |
| 98 | + font-size: 24px; |
| 99 | + text-decoration: none; |
| 100 | + color: #0066ce; |
| 101 | + } |
| 102 | +
|
| 103 | + a:hover { |
| 104 | + text-decoration: underline; |
| 105 | + } |
| 106 | +
|
| 107 | + @media only screen and (max-width: 600px) { |
| 108 | +
|
| 109 | + h1 { |
| 110 | + max-width: 320px; |
| 111 | + width: auto; |
| 112 | + } |
| 113 | + h2 { |
| 114 | + font-size: 64px; |
| 115 | + } |
| 116 | + h3 { |
| 117 | + font-size: 50px; |
| 118 | + } |
| 119 | + svg[data-icon='compass'] { |
| 120 | + width: 94px; |
| 121 | + } |
| 122 | + } |
| 123 | +
|
| 124 | + @media (prefers-color-scheme: dark) { |
| 125 | + body { |
| 126 | + background-color: hsl(210, 50%, 16%); |
| 127 | + color: #fffff0; |
| 128 | + } |
| 129 | + h2, h3 { |
| 130 | + color: hsl(210, 50%, 90%); |
| 131 | + } |
| 132 | + svg[data-icon='compass'] { |
| 133 | + fill: url(#gradient-dark) #447799; |
| 134 | + } |
| 135 | + } |
| 136 | +
|
| 137 | + `} |
| 138 | + </style> |
| 139 | + <svg style={{width:0,height:0,position:"absolute"}} aria-hidden="true" focusable="false"> |
| 140 | + <linearGradient id="gradient" x2="1" y2="1"> |
| 141 | + <stop offset="0%" stop-color="hsl(210, 60%, 40%)" /> |
| 142 | + <stop offset="50%" stop-color="hsl(210, 50%, 30%)" /> |
| 143 | + <stop offset="100%" stop-color="hsl(210, 50%, 20%)" /> |
| 144 | + </linearGradient> |
| 145 | + <linearGradient id="gradient-dark" x2="1" y2="1"> |
| 146 | + <stop offset="0%" stop-color="hsl(210, 60%, 60%)" /> |
| 147 | + <stop offset="50%" stop-color="hsl(210, 50%, 40%)" /> |
| 148 | + <stop offset="100%" stop-color="hsl(210, 50%, 35%)" /> |
| 149 | + </linearGradient> |
| 150 | + </svg> |
| 151 | + <div className="card404"> |
| 152 | + <div className="cols"> |
| 153 | + <div className="rows"> |
| 154 | + <h2>404</h2> |
| 155 | + <h3>error</h3> |
| 156 | + </div> |
| 157 | + <p><svg aria-hidden="true" data-prefix="fal" data-icon="compass" className="svg-inline--fa fa-compass fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M264.97 272.97c9.38-9.37 9.38-24.57 0-33.94-9.37-9.37-24.57-9.37-33.94 0-9.38 9.37-9.38 24.57 0 33.94 9.37 9.37 24.57 9.37 33.94 0zM351.44 125c-2.26 0-4.51.37-6.71 1.16l-154.9 55.85c-7.49 2.7-13.1 8.31-15.8 15.8l-55.85 154.91c-5.65 15.67 10.33 34.27 26.4 34.27 2.26 0 4.51-.37 6.71-1.16l154.9-55.85c7.49-2.7 13.1-8.31 15.8-15.8l55.85-154.9c5.64-15.67-10.33-34.28-26.4-34.28zm-58.65 175.79l-140.1 50.51 50.51-140.11 140.11-50.51-50.52 140.11zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 464c-119.1 0-216-96.9-216-216S128.9 40 248 40s216 96.9 216 216-96.9 216-216 216z"></path></svg> |
| 158 | + </p> |
| 159 | + </div> |
| 160 | + <h1>The page you’re looking for can’t be found</h1> |
| 161 | + </div> |
| 162 | + </main> |
| 163 | + ); |
| 164 | +} |
0 commit comments