Skip to content

Commit 0f494bd

Browse files
chore(storybook): add 404 page (#3386)
* chore: adds custom 404.html page to .storybook/assets - styles for this 404 page mimic some of the styles found on the guides pages and the landing page. - this file is in the assets folder because it gets copied properly to the dist folder on build
1 parent 13bb022 commit 0f494bd

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

.storybook/assets/404.html

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Page not found</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
7+
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
8+
<style>
9+
body {
10+
--spectrum-background-layer-1-color: rgb(253, 253, 253);
11+
12+
margin: 0;
13+
padding: 0;
14+
block-size: 100vh;
15+
background-color: var(--spectrum-background-layer-1-color);
16+
}
17+
18+
header {
19+
max-width: 1000px;
20+
margin: auto;
21+
padding-block-start: 4rem;
22+
}
23+
24+
main {
25+
--spectrum-neutral-content-color-default: rgb(34, 34, 34);
26+
27+
color: var(--spectrum-neutral-content-color-default);
28+
display: flex;
29+
padding-inline: 20px;
30+
padding-block: 4rem;
31+
flex-direction: column;
32+
align-items: flex-start;
33+
gap: 60px;
34+
max-width: 1000px;
35+
margin: auto;
36+
}
37+
38+
img {
39+
max-inline-size: 100%;
40+
margin-block: -20px 20px;
41+
}
42+
43+
h1, h2, p {
44+
--spectrum-sans-font-family-stack: "Nunito Sans",-apple-system,".SFNSText-Regular","San Francisco",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif;
45+
46+
-webkit-font-smoothing: antialiased;
47+
font-family: var(--spectrum-sans-font-family-stack);
48+
}
49+
50+
h1 {
51+
font-weight: 700;
52+
font-size: 32px;
53+
margin-block: 20px 8px;
54+
}
55+
56+
h2 {
57+
font-size: 24px;
58+
margin-block: 20px 8px;
59+
padding-block-end: 4px;
60+
}
61+
62+
p {
63+
font-size: 14px;
64+
line-height: 24px;
65+
margin-block: 16px;
66+
}
67+
68+
.spectrum-logo {
69+
display: block;
70+
}
71+
72+
svg {
73+
block-size: auto;
74+
inline-size: 100%;
75+
max-inline-size: 150px;
76+
max-block-size: 100px;
77+
}
78+
79+
</style>
80+
</head>
81+
<body>
82+
<header>
83+
<a class="spectrum-logo" href="https://opensource.adobe.com/spectrum-css/" aria-label="Spectrum CSS">
84+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="spectrum-Site-logo spectrum-Icon spectrum-Icon--sizeXL" version="1.1" id="Layer_1" x="0" y="0" viewBox="0 0 190 26" focusable="false" aria-hidden="true" aria-label="Adobe logo" xml:space="preserve">
85+
<g style="fill:#FA0F00">
86+
<polygon points="19,0 30,0 30,26"/>
87+
<polygon points="11.1,0 0,0 0,26"/>
88+
<polygon points="15,9.6 22.1,26 17.5,26 15.4,20.8 10.2,20.8"/>
89+
</g>
90+
<text x="38" y="20" style="color: rgb(0,0,0);font-size: 22px;font-family: adobe-clean,'Source Sans Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Trebuchet MS','Lucida Grande',sans-serif; font-weight: 700; height: 28px; line-height: 28.6px;">
91+
Spectrum CSS
92+
</text>
93+
</svg>
94+
</a>
95+
</header>
96+
<main>
97+
<h1>404: Page not found</h1>
98+
<section>
99+
<img src="/spectrum_illustration_2x.png" alt="">
100+
<h2>It's not you. It's us.</h2>
101+
<p>We've made lots of changes to the Spectrum CSS documentation site, including consolidating all of the documentation and moving it to a single location within Storybook.</p>
102+
<p>If you're looking for information on Spectrum CSS components, let's get you back to <a href="https://opensource.adobe.com/spectrum-css/">our landing page</a>. From there, experiment with all of our components to your heart's content!
103+
</p>
104+
</section>
105+
</main>
106+
</body>
107+
</html>

0 commit comments

Comments
 (0)