mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Simplify 404/500 page (#31409)
This commit is contained in:
@ -1,10 +1,16 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content {{if .IsRepo}}repository{{end}}">
|
||||
{{if .IsRepo}}{{template "repo/header" .}}{{end}}
|
||||
<div class="ui container tw-text-center">
|
||||
<img class="tw-max-w-[80vw] tw-py-16" src="{{AssetUrlPrefix}}/img/404.png" alt="404">
|
||||
<p>{{if .NotFoundPrompt}}{{.NotFoundPrompt}}{{else}}{{ctx.Locale.Tr "error404"}}{{end}}</p>
|
||||
{{if .NotFoundGoBackURL}}<a class="ui button" href="{{.NotFoundGoBackURL}}">{{ctx.Locale.Tr "go_back"}}</a>{{end}}
|
||||
<div class="ui container">
|
||||
<div class="status-page-error">
|
||||
<div class="status-page-error-title">404 Not Found</div>
|
||||
<div class="tw-text-center">
|
||||
<div class="tw-my-4">{{if .NotFoundPrompt}}{{.NotFoundPrompt}}{{else}}{{ctx.Locale.Tr "error404"}}{{end}}</div>
|
||||
{{if .NotFoundGoBackURL}}
|
||||
<a class="tw-block tw-my-4" href="{{.NotFoundGoBackURL}}">{{ctx.Locale.Tr "go_back"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
@ -33,17 +33,18 @@
|
||||
<div class="ui container" >
|
||||
<style> .ui.message.flash-message { text-align: left; } </style>
|
||||
{{template "base/alert" .}}
|
||||
</div>
|
||||
<p class="tw-mt-8 center"><img src="{{AssetUrlPrefix}}/img/500.png" alt="Internal Server Error"></p>
|
||||
<div class="divider"></div>
|
||||
<div class="ui container tw-my-8">
|
||||
{{if .ErrorMsg}}
|
||||
<p>{{ctx.Locale.Tr "error.occurred"}}:</p>
|
||||
<pre class="tw-whitespace-pre-wrap tw-break-all">{{.ErrorMsg}}</pre>
|
||||
{{end}}
|
||||
<div class="center tw-mt-8">
|
||||
{{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
|
||||
{{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message"}}</p>{{end}}
|
||||
<div class="status-page-error">
|
||||
<div class="status-page-error-title">500 Internal Server Error</div>
|
||||
{{if .ErrorMsg}}
|
||||
<div class="tw-mt-8">
|
||||
<p>{{ctx.Locale.Tr "error.occurred"}}:</p>
|
||||
<pre class="tw-whitespace-pre-wrap tw-break-all">{{.ErrorMsg}}</pre>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="tw-mt-8 tw-text-center">
|
||||
{{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
|
||||
{{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message"}}</p>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user