Skip to content

Commit bdbed43

Browse files
📖🔧:fix error 404 page design #1518
PR URL: #1518 Reviewed-by: OpenINF-bot <[email protected]>
1 parent 2171ee4 commit bdbed43

File tree

2 files changed

+53
-24
lines changed

2 files changed

+53
-24
lines changed

_assets/styles/_error.scss

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,55 @@
11
/* Additional error page styling */
22

3-
.error h1,
4-
.error h2 {
5-
font-weight: 400;
6-
text-align: center;
7-
text-transform: uppercase;
8-
}
3+
.error {
4+
h1 {
5+
position: absolute;
6+
top: 50%;
7+
left: 0;
8+
display: inherit;
9+
width: 100%;
10+
font-size: 10rem;
11+
font-weight: 800;
12+
color: shade-color($body-bg, 10%);
13+
transform: translateY(-50%);
14+
}
915

10-
.error h1 {
11-
display: inherit;
12-
margin: 1.5em;
13-
font-size: 4.2rem;
14-
}
16+
h1::after {
17+
display: none;
18+
margin-inline-start: 0;
19+
}
1520

16-
.error h1::after {
17-
display: none;
18-
margin-inline-start: 0;
19-
}
21+
@include media-breakpoint-up(sm) {
22+
h1 {
23+
font-size: 14rem;
24+
}
25+
}
2026

21-
.error h2 {
22-
font-size: 1.8rem;
23-
}
27+
@include media-breakpoint-up(md) {
28+
h1 {
29+
font-size: 18rem;
30+
}
31+
}
32+
33+
h2 {
34+
font-size: 1.8rem;
35+
font-weight: 400;
36+
}
37+
38+
.wrapper {
39+
position: absolute;
40+
top: 50%;
41+
left: 0;
42+
display: flex;
43+
flex-direction: column;
44+
width: 100%;
45+
font-size: 10rem;
46+
transform: translateY(-50%);
2447

25-
.error .container {
26-
padding-top: 20vh;
48+
.btn {
49+
width: fit-content;
50+
margin: 0 auto;
51+
color: $secondary;
52+
text-transform: uppercase;
53+
}
54+
}
2755
}

collections/_pages/404.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
body_classes:
66
- error
77
---
8-
<main class="flex-shrink-0">
9-
<div class="container">
10-
<h1>404</h1>
11-
<h2>Page Not Found</h2>
8+
<main class="text-center">
9+
<h1>404</h1>
10+
<div class="wrapper">
11+
<h2 class="mb-4">Page Not Found</h2>
12+
<a class="btn btn-primary" href="/" role="button">Back to Home</a>
1213
</div>
1314
</main>

0 commit comments

Comments
 (0)