Skip to content

Commit cb3373d

Browse files
fix: missing doctype error on 404 page with htmltest scan (#554)
* Fix missing doctype error on 404 page with htmltest scan * format 404.html --------- Co-authored-by: Xin <[email protected]>
1 parent 56f28e6 commit cb3373d

File tree

1 file changed

+38
-26
lines changed

1 file changed

+38
-26
lines changed

layouts/404.html

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
1-
<div style='font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; height:100vh; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center'>
2-
<div>
3-
<style>
4-
body {
5-
color: #000;
6-
background: #fff;
7-
margin: 0;
8-
}
9-
.next-error-h1 {
10-
border-right: 1px solid rgba(0, 0, 0, 0.3);
11-
}
12-
@media (prefers-color-scheme: dark) {
13-
body {
14-
color: #fff;
15-
background: #000;
16-
}
17-
.next-error-h1 {
18-
border-right: 1px solid rgba(255, 255, 255, 0.3);
19-
}
20-
}
21-
</style>
22-
<h1 class="next-error-h1" style='display: inline-block; margin: 0 20px 0 0; padding-right: 23px; font-size: 24px; font-weight: 500; vertical-align: top; line-height: 49px; font-feature-settings: "rlig" 1,"calt" 1,"ss01" 1,"ss06" 1 !important;'>404</h1>
23-
<div style="display: inline-block; text-align: left">
24-
<h2 style="font-size: 14px; font-weight: 400; line-height: 49px; margin: 0">This page could not be found.</h2>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<body
5+
style='font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; height:100vh; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center'>
6+
<div>
7+
<style>
8+
body {
9+
color: #000;
10+
background: #fff;
11+
margin: 0;
12+
}
13+
14+
.next-error-h1 {
15+
border-right: 1px solid rgba(0, 0, 0, 0.3);
16+
}
17+
18+
@media (prefers-color-scheme: dark) {
19+
body {
20+
color: #fff;
21+
background: #000;
22+
}
23+
24+
.next-error-h1 {
25+
border-right: 1px solid rgba(255, 255, 255, 0.3);
26+
}
27+
}
28+
</style>
29+
<h1 class="next-error-h1"
30+
style='display: inline-block; margin: 0 20px 0 0; padding-right: 23px; font-size: 24px; font-weight: 500; vertical-align: top; line-height: 49px; font-feature-settings: "rlig" 1,"calt" 1,"ss01" 1,"ss06" 1 !important;'>
31+
404</h1>
32+
<div style="display: inline-block; text-align: left">
33+
<h2 style="font-size: 14px; font-weight: 400; line-height: 49px; margin: 0">This page could not be found.
34+
</h2>
35+
</div>
2536
</div>
26-
</div>
27-
</div>
37+
</body>
38+
39+
</html>

0 commit comments

Comments
 (0)