-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve 404 screen on mobile #28710
Improve 404 screen on mobile #28710
Conversation
- Remove `container` to remove unnecessary margins being added to the whole page. - Specify max width for the 404 image to avoid overflow of the image. Refs: https://codeberg.org/forgejo/forgejo/pulls/2101 (cherry picked from commit 2235c227402c7b1b6e2d4c77215fa15d636f25c7)
@@ -1,8 +1,8 @@ | |||
{{template "base/head" .}} | |||
<div role="main" aria-label="{{.Title}}" class="page-content ui container center gt-w-screen {{if .IsRepo}}repository{{end}}"> | |||
<div role="main" aria-label="{{.Title}}" class="page-content ui center gt-w-screen {{if .IsRepo}}repository{{end}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does ui
or center
make sense here? The gt-w-screen
seems a no-op here too.
Maybe it should be: class="page-content {{if .IsRepo}}repository{{end}}"
{{if .IsRepo}}{{template "repo/header" .}}{{end}} | ||
<div class="ui container center"> | ||
<p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p> | ||
<p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404" style="max-width: 100%"></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that there are already some good-enough helpers for this case.
Maybe it should be: <img class="gt-mt-5 gt-max-w-full" src="{{AssetUrlPrefix}}/img/404.png" alt="404">
(maybe it needs a new helper class max-w-full
as tailwind style)
(Although "avoiding inline styles as much as possible" hasn't been written into guideline yet, it has been a consensus for long time during reviewing.)
Could you provide a screenshot of what this looks like on mobile? |
-> Fix some pending problems #29985 |
These changes are quite independent and trivial, so I don't want to open too many PRs. * #29882 (comment) * the `f.Close` should be called properly * the error message could be more meaningful (#29882 (review)) * #29859 (review) * the new translation strings don't take arguments * #28710 (comment) * stale for long time * #28140 * a form was forgotten to be changed to work with backend code
These changes are quite independent and trivial, so I don't want to open too many PRs. * go-gitea/gitea#29882 (comment) * the `f.Close` should be called properly * the error message could be more meaningful (go-gitea/gitea#29882 (review)) * go-gitea/gitea#29859 (review) * the new translation strings don't take arguments * go-gitea/gitea#28710 (comment) * stale for long time * #28140 * a form was forgotten to be changed to work with backend code (cherry picked from commit 226231ea27d4f2b0f09fa4efb39501507613b284) Conflicts: templates/repo/issue/view_content/pull.tmpl discarded because unexplained templates/status/404.tmpl implemented differently in Forgejo
container
to remove unnecessary margins being added to the whole page.Refs: https://codeberg.org/forgejo/forgejo/pulls/2101
(cherry picked from commit 2235c227402c7b1b6e2d4c77215fa15d636f25c7)