{{if .IsRepo}}{{template "repo/header" .}}{{end}}
-

404

+

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" .}}
-

Internal Server Error

+
+

500

+

Internal Server Error

+
{{if .ErrorMsg}} 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); From a748ba70a8654f7b4260438182cff6c404557519 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sun, 25 Feb 2024 18:13:59 +0500 Subject: [PATCH 2/2] 10-year old images are gone --- public/assets/img/404.png | Bin 4516 -> 0 bytes public/assets/img/500.png | Bin 5230 -> 0 bytes tests/integration/compare_test.go | 2 +- tests/integration/links_test.go | 2 -- 4 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 public/assets/img/404.png delete mode 100644 public/assets/img/500.png diff --git a/public/assets/img/404.png b/public/assets/img/404.png deleted file mode 100644 index 8b66c971f462dcc37c6b3f33d4a9c35c68a8979d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4516 zcmZ`+c{r4B_kYGP$k<25lCcbi5)(*&`hd+9D z$aWGE61MO^2pjwd@^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PPL&#cACY1Bm-jNOp`g7*ojR6nX?7 z-iU0ny_+EfH>wcPc&O9@+&CH+C>v0)mQD8hk|!rvb|^Hzp0=2EamT8AhofHXV~GG4 zoyE;mTuKD(;-sQ952g@Iegc^^P>a3%5ZMG}2RcKZNAn`FBP{M=UYeGB_V)x7HS~gNSQkt05vnJ$p~BLMN(IHUFT^Z& z-Y(cnRALrAqTd4pK>1g*T&oN5dORmsYMDn%j<)Aa;!m{ThHf*{i$53$4X4vN*~$!@ z>oONe!adhkwco~|$|cp-SsIu}mB7RQ zVp&6lB=Fi5q2+H)qP$Lbt2RE()9}l!O^r-};PGX@`ztrb)ILvb5 s>_QDa{W}6ZFhLZ_!?)Rg|0+4VA{B)=>#4m7qNg5JMXj3!@^=IO2RKy6S^xk5 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", }