Skip to content

Commit c542faf

Browse files
committed
added 404 page
1 parent 1cbeaa5 commit c542faf

File tree

2 files changed

+195
-0
lines changed

2 files changed

+195
-0
lines changed

src/pages/404.astro

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
import Navigation from "../components/base/Navigation.astro";
3+
import ProductLayout from "../layouts/ProductLayout.astro";
4+
import FlexibleSection from "../components/FlexibleSection.astro";
5+
6+
const title = "Page Not Found - defguard";
7+
const featuredImage =
8+
"github.com/DefGuard/defguard.github.io/raw/main/public/images/product/core/hero-image.png";
9+
const imageWidth = "1920";
10+
const imageHeight = "1080";
11+
const url = "https://defguard.net/404/";
12+
const tags = [
13+
"defguard",
14+
"404",
15+
"page not found",
16+
"error",
17+
];
18+
---
19+
20+
<ProductLayout
21+
title={title}
22+
featuredImage={featuredImage}
23+
imageWidth={imageWidth}
24+
imageHeight={imageHeight}
25+
url={url}
26+
tags={tags}
27+
>
28+
<Navigation />
29+
30+
<main id="error-page">
31+
<FlexibleSection
32+
title="Page Not Found"
33+
titleTag="h1"
34+
id="blog-header"
35+
variant="white"
36+
theme="light"
37+
>
38+
<div slot="left">
39+
<div class="error-number">404</div>
40+
<p>
41+
Looks like you've hit a dead end. The page you're looking for might have been moved, deleted, or never existed.
42+
</p>
43+
<div class="error-actions">
44+
<a href="/" class="learn-more-link">Go Home</a>
45+
<a href="/blog" class="secondary-link">Visit Blog</a>
46+
</div>
47+
</div>
48+
49+
<div slot="right">
50+
<h2>Other things you can do:</h2>
51+
<ul>
52+
<li>Check the URL for typos or spelling errors</li>
53+
<li><a href="/download">Download defguard</a></li>
54+
<li>Check out our <a href="/faq">frequently asked questions</a></li>
55+
</ul>
56+
</div>
57+
</FlexibleSection>
58+
</main>
59+
</ProductLayout>
60+
61+
<style lang="scss" is:global>
62+
#error-page {
63+
--page-spacing-factor: 0.5;
64+
@include break-up(lg) {
65+
--page-spacing-factor: 1;
66+
}
67+
68+
.flexible-content {
69+
padding-top: page-spacing(80px);
70+
padding-bottom: page-spacing(80px);
71+
min-height: 60vh;
72+
display: flex;
73+
align-items: center;
74+
75+
.section-title {
76+
@include typography(section);
77+
border-bottom: 1px solid var(--text-body-primary);
78+
padding-bottom: 1rem;
79+
margin-bottom: 2rem;
80+
//color: var(--error-color, #d32f2f);
81+
}
82+
83+
.error-number {
84+
@include typography(title);
85+
font-size: 8rem;
86+
font-weight: 900;
87+
color: var(--text-body-primary);
88+
margin-bottom: 1rem;
89+
line-height: 1;
90+
//text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
91+
92+
@media (max-width: 768px) {
93+
font-size: 6rem;
94+
}
95+
}
96+
97+
h3 {
98+
@include typography(h3);
99+
margin-top: 0;
100+
margin-bottom: 1rem;
101+
}
102+
103+
p {
104+
@include typography(paragraph);
105+
margin-bottom: 1.5rem;
106+
}
107+
108+
.error-actions {
109+
display: flex;
110+
gap: 1rem;
111+
margin: 2rem 0;
112+
flex-wrap: wrap;
113+
114+
@media (max-width: 768px) {
115+
flex-direction: column;
116+
align-items: flex-start;
117+
}
118+
}
119+
120+
.learn-more-link {
121+
@include typography(paragraph);
122+
display: inline-block;
123+
padding: 0.75rem 1.5rem;
124+
background-color: var(--primary-button-bg, #0c8ce0);
125+
color: var(--primary-button-text, white);
126+
border-radius: 50px;
127+
font-weight: 300;
128+
font-size: calc(1rem * var(--font-scale-factor));
129+
text-decoration: none;
130+
transition: background-color 0.2s ease-in-out;
131+
132+
&:hover {
133+
background-color: var(--primary-button-hover, #0a7bc5);
134+
}
135+
}
136+
137+
.secondary-link {
138+
@include typography(paragraph);
139+
display: inline-block;
140+
padding: 0.75rem 1.5rem;
141+
background-color: transparent;
142+
color: var(--primary-button-bg, #0c8ce0);
143+
border: 2px solid var(--primary-button-bg, #0c8ce0);
144+
border-radius: 50px;
145+
font-weight: 300;
146+
font-size: calc(1rem * var(--font-scale-factor));
147+
text-decoration: none;
148+
transition: all 0.2s ease-in-out;
149+
150+
&:hover {
151+
background-color: var(--primary-button-bg, #0c8ce0);
152+
color: var(--primary-button-text, white);
153+
}
154+
}
155+
156+
ul {
157+
margin: 0 0 1.5rem 0;
158+
padding-left: 20px;
159+
160+
li {
161+
@include typography(paragraph);
162+
margin-bottom: 0.5rem;
163+
164+
a {
165+
color: var(--primary-button-bg, #0c8ce0);
166+
text-decoration: none;
167+
font-weight: 500;
168+
169+
&:hover {
170+
text-decoration: underline;
171+
}
172+
}
173+
}
174+
}
175+
176+
.column {
177+
@media (max-width: 768px) {
178+
&.right-column {
179+
margin-top: 2rem;
180+
}
181+
}
182+
}
183+
}
184+
}
185+
</style>

src/pages/server.astro

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,16 @@ const sections = [
274274

275275
<div slot="right">
276276
<ImageURL src="/images/features/Secure architecture.png" alt="Secure architecture with no data exposed" />
277+
<p>
278+
<div class="learn-more">
279+
<a
280+
href="https://docs.defguard.net/in-depth/architecture"
281+
class="learn-more-link"
282+
>
283+
Learn about Defguard Architecture
284+
</a>
285+
</div>
286+
</p>
277287
</div>
278288
</FlexibleSection>
279289

0 commit comments

Comments
 (0)