Skip to content

Commit 9ec9ebb

Browse files
authored
Merge pull request #23753 from sftim/20200908_tidy_404_page
Tidy 404 Not Found error page
2 parents f53a4c7 + 928c038 commit 9ec9ebb

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

assets/scss/_custom.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ section {
5353
}
5454
}
5555

56+
body.td-404 main .error-details {
57+
max-width: 1100px;
58+
margin-left: auto;
59+
margin-right: auto;
60+
margin-top: 4em;
61+
margin-bottom: 0;
62+
}
63+
5664
/* HEADER */
5765

5866
.td-navbar {

i18n/en.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ other = "Latest version"
6363
[docs_version_other_heading]
6464
other = "Older versions"
6565

66+
[error_404_were_you_looking_for]
67+
other = "Were you looking for:"
68+
6669
[examples_heading]
6770
other = "Examples"
6871

layouts/404.html

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
11
{{ define "main" }}
22
{{ partial "handle-version-switch-404.html" . }}
3-
<div class="container-404">
4-
<h4>
5-
Perhaps you were looking for:
6-
</h4>
7-
8-
<br />
9-
<br />
10-
11-
<ul>
12-
<li>
13-
<a href="/docs">
14-
The Kubernetes documentation
15-
</a>
16-
</li>
17-
<li>
18-
<a href="/blog">
19-
The Kubernetes blog
20-
</a>
21-
</li>
22-
<li>
23-
<a href="/community">
24-
The Kubernetes community
25-
</a>
26-
</li>
3+
<section id="error-404" class="error-details">
4+
<p>
5+
{{ T "error_404_were_you_looking_for" }}
6+
</p>
7+
<ul id="error-sections">
8+
{{ $sections := slice "docs" "blog" "training" "partners" "community" "case-studies" }}
9+
{{ range $sections }}
10+
{{ with site.GetPage "section" . }}<li><a href="{{ .RelPermalink }}" data-proofer-ignore>{{ .Title }}</a></li>{{ end }}
11+
{{ end }}
2712
</ul>
28-
</div>
13+
</section>
2914
{{ end }}

0 commit comments

Comments
 (0)