summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-05-16 16:45:12 +0000
committerGitHub <noreply@github.com>2022-05-16 18:45:12 +0200
commitbcf13b670baa6c0f12a9cc3b26d13374f9d9fc8b (patch)
treee942021ad0520023fb11e39f4d1931b51f0eccb0 /templates
parent71ca131582fff51da614291732ed43b2bf48d8a1 (diff)
downloadgitea-bcf13b670baa6c0f12a9cc3b26d13374f9d9fc8b.tar.gz
gitea-bcf13b670baa6c0f12a9cc3b26d13374f9d9fc8b.zip
Improve commit list/view on mobile (#19712)
- This is a continuation on [the work](https://github.com/go-gitea/gitea/pull/19546) I've done for improving mobile experience on Gitea. - The current behavior of going trough the commits list is horrible, each individual item gets it's own row and thereby isn't quite compact as it should be on mobile. The commit view's header is in a bit better state, it's quite only that content is overlapping each other. - This patch fixes those problems. Each row in the commit list table will actually take a row in the UI. The commit view's header has now a better organized way of placing the information.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/commit_page.tmpl25
-rw-r--r--templates/repo/commits_list.tmpl4
2 files changed, 14 insertions, 15 deletions
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl
index f43050ad0e..70cc7d02ea 100644
--- a/templates/repo/commit_page.tmpl
+++ b/templates/repo/commit_page.tmpl
@@ -17,8 +17,8 @@
{{$class = (printf "%s%s" $class " isWarning")}}
{{end}}
{{end}}
- <div class="ui top attached header clearing segment pr {{$class}}">
- <div class="df mb-4">
+ <div class="ui top attached header clearing segment pr commit-header {{$class}}">
+ <div class="df mb-4 fw">
<h3 class="mb-0 f1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}</h3>
{{if not $.PageIsWiki}}
<div class="ui">
@@ -143,8 +143,8 @@
<span class="text grey mr-3">{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}</span>
{{end}}
</div>
- <div class="ui attached segment df ac sb py-2 commit-header-row {{$class}}">
- <div class="df ac">
+ <div class="ui attached segment df ac sb py-2 commit-header-row fw {{$class}}">
+ <div class="df ac author">
{{if .Author}}
{{avatar .Author 28 "mr-3"}}
{{if .Author.FullName}}
@@ -171,9 +171,7 @@
<div class="ui horizontal list df ac">
{{if .Parents}}
<div class="item">
- {{.i18n.Tr "repo.diff.parent"}}
- </div>
- <div class="item">
+ <span>{{.i18n.Tr "repo.diff.parent"}}</span>
{{range .Parents}}
{{if $.PageIsWiki}}
<a class="ui blue sha label" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .}}">{{ShortSha .}}</a>
@@ -183,13 +181,14 @@
{{end}}
</div>
{{end}}
- <div class="mobile-only"></div>
- <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
- <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
+ <div class="item">
+ <span>{{.i18n.Tr "repo.diff.commit"}}</span>
+ <span class="ui blue sha label">{{ShortSha .CommitID}}</span>
+ </div>
</div>
</div>
{{if .Commit.Signature}}
- <div class="ui bottom attached message tl df ac sb commit-header-row {{$class}}">
+ <div class="ui bottom attached message tl df ac sb commit-header-row fw {{$class}}">
<div class="df ac">
{{if .Verification.Verified}}
{{if ne .Verification.SigningUser.ID 0}}
@@ -204,8 +203,8 @@
{{avatar .Verification.SigningUser 28}}
<a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.GetDisplayName}}</strong></a>
{{else}}
- <span title="{{.i18n.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
- <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span>
+ <span title="{{.i18n.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog" 16 "mr-3"}}</span>
+ <span class="ui text mr-3">{{.i18n.Tr "repo.commits.signed_by"}}:</span>
{{avatarByEmail .Verification.SigningEmail "" 28}}
<strong>{{.Verification.SigningUser.GetDisplayName}}</strong>
{{end}}
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl
index 86ad835202..65baee6b63 100644
--- a/templates/repo/commits_list.tmpl
+++ b/templates/repo/commits_list.tmpl
@@ -1,5 +1,5 @@
-<div class="ui attached table segment">
- <table class="ui very basic striped fixed table single line" id="commits-table">
+<div class="ui attached table segment commit-table">
+ <table class="ui very basic striped table unstackable fixed" id="commits-table">
<thead>
<tr>
<th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>