-
+
-
+ 404
{{if .NotFoundPrompt}}{{.NotFoundPrompt}}{{else}}{{ctx.Locale.Tr "error404" | Safe}}{{end}}
{{if .NotFoundGoBackURL}}{{ctx.Locale.Tr "go_back"}}{{end}} diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index edcb90f9a4..30cb255643 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -33,7 +33,10 @@ {{template "base/alert" .}}
+
500
+Internal Server Error
+
{{if .ErrorMsg}}
diff --git a/tests/integration/compare_test.go b/tests/integration/compare_test.go
index cf0bac4c8a..5d5529c36e 100644
--- a/tests/integration/compare_test.go
+++ b/tests/integration/compare_test.go
@@ -33,7 +33,7 @@ func TestCompareTag(t *testing.T) {
req = NewRequest(t, "GET", "/user2/repo1/compare/invalid")
resp = session.MakeRequest(t, req, http.StatusNotFound)
- assert.False(t, strings.Contains(resp.Body.String(), "/assets/img/500.png"), "expect 404 page not 500")
+ assert.False(t, strings.Contains(resp.Body.String(), ">500<"), "expect 404 page not 500")
}
// Compare with inferred default branch (master)
diff --git a/tests/integration/links_test.go b/tests/integration/links_test.go
index 11e6146d07..6edcbbc71b 100644
--- a/tests/integration/links_test.go
+++ b/tests/integration/links_test.go
@@ -36,8 +36,6 @@ func TestLinksNoLogin(t *testing.T) {
"/user2/repo1/",
"/user2/repo1/projects",
"/user2/repo1/projects/1",
- "/assets/img/404.png",
- "/assets/img/500.png",
"/.well-known/security.txt",
}
diff --git a/web_src/css/base.css b/web_src/css/base.css
index 76ecfc9bf5..2620a41a34 100644
--- a/web_src/css/base.css
+++ b/web_src/css/base.css
@@ -96,6 +96,16 @@ progress::-moz-progress-bar {
background-color: var(--color-accent);
}
+h1.error-code {
+ font-size: 15em;
+ font-weight: 800;
+ color: transparent;
+ --error-code-color-1: #a2a2a2;
+ --error-code-color-2: #797979;
+ background: repeating-linear-gradient(45deg, var(--error-code-color-1), var(--error-code-color-1) 10px, var(--error-code-color-2) 10px, var(--error-code-color-2) 20px);
+ background-clip: text;
+}
+
* {
scrollbar-color: var(--color-primary) transparent;
caret-color: var(--color-caret);