Skip to content

Commit 3c8533f

Browse files
committed
fix
1 parent 17baf1a commit 3c8533f

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

public/assets/img/404.png

-4.41 KB
Binary file not shown.

public/assets/img/500.png

-5.11 KB
Binary file not shown.

templates/status/500.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434
<style> .ui.message.flash-message { text-align: left; } </style>
3535
{{template "base/alert" .}}
3636
</div>
37-
<p class="tw-mt-8 center"><img src="{{AssetUrlPrefix}}/img/500.png" alt="Internal Server Error"></p>
37+
<div class="status-page-error-code">500 Internal Server Error</div>
3838
<div class="divider"></div>
3939
<div class="ui container tw-my-8">
4040
{{if .ErrorMsg}}
4141
<p>{{ctx.Locale.Tr "error.occurred"}}:</p>
4242
<pre class="tw-whitespace-pre-wrap tw-break-all">{{.ErrorMsg}}</pre>
4343
{{end}}
44-
<div class="center tw-mt-8">
44+
<div class="tw-mt-8 tw-text-center">
4545
{{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
4646
{{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message"}}</p>{{end}}
4747
</div>

tests/integration/compare_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package integration
55

66
import (
7+
"code.gitea.io/gitea/modules/test"
78
"fmt"
89
"net/http"
910
"net/url"
@@ -32,7 +33,7 @@ func TestCompareTag(t *testing.T) {
3233

3334
req = NewRequest(t, "GET", "/user2/repo1/compare/invalid")
3435
resp = session.MakeRequest(t, req, http.StatusNotFound)
35-
assert.False(t, strings.Contains(resp.Body.String(), "/assets/img/500.png"), "expect 404 page not 500")
36+
assert.True(t, test.IsNormalPageCompleted(resp.Body.String()), "expect 404 page not 500")
3637
}
3738

3839
// Compare with inferred default branch (master)

tests/integration/links_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ func TestLinksNoLogin(t *testing.T) {
3737
"/user2/repo1/projects",
3838
"/user2/repo1/projects/1",
3939
"/user2/repo1/releases/tag/delete-tag", // It's the only one existing record on release.yml which has is_tag: true
40-
"/assets/img/404.png",
41-
"/assets/img/500.png",
4240
"/.well-known/security.txt",
4341
}
4442

web_src/css/base.css

+9
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,15 @@ img.ui.avatar,
477477
padding-bottom: 80px;
478478
}
479479

480+
.status-page-error-code {
481+
font-size: 3em;
482+
line-height: initial;
483+
text-align: center;
484+
padding: 2em 0;
485+
font-weight: var(--font-weight-bold);
486+
color: var(--color-text-light-3);
487+
}
488+
480489
/* add margin below .secondary nav when it is the first child */
481490
.page-content > :first-child.secondary-nav {
482491
margin-bottom: 14px;

0 commit comments

Comments
 (0)