aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-23 12:23:30 +0800
committerGitHub <noreply@github.com>2023-08-23 04:23:30 +0000
commite4b2bdfbc0a28dcb4272de923b547a19131abd22 (patch)
tree4fc163725428e8fb1aad36c25a9fefd4af4387f1 /templates
parent5db21ce7e10ba78ede8841bea9db7a63adbececb (diff)
downloadgitea-e4b2bdfbc0a28dcb4272de923b547a19131abd22.tar.gz
gitea-e4b2bdfbc0a28dcb4272de923b547a19131abd22.zip
More improvements for the "flex list" and the dashboard list (#26675)
Follow #26649 and #25790 and add one more example (text truncate) in the devtest page
Diffstat (limited to 'templates')
-rw-r--r--templates/devtest/flex-list.tmpl1
-rw-r--r--templates/user/dashboard/feeds.tmpl34
2 files changed, 16 insertions, 19 deletions
diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl
index 37f3f04004..f9087a5714 100644
--- a/templates/devtest/flex-list.tmpl
+++ b/templates/devtest/flex-list.tmpl
@@ -48,6 +48,7 @@
</div>
<div class="flex-item-body">
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content
+ <span class="text truncate">Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content</span>
</div>
</div>
<div class="flex-item-trailing">
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl
index aad44f57df..6bfd8b12be 100644
--- a/templates/user/dashboard/feeds.tmpl
+++ b/templates/user/dashboard/feeds.tmpl
@@ -80,25 +80,21 @@
{{end}}
</div>
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
- <div class="gt-pl-5">
- {{$push := ActionContent2Commits .}}
- {{$repoLink := .GetRepoLink}}
- {{range $push.Commits}}
- {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
- <div class="flex-item">
- <img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
- <a class="commit-id" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
- <span class="text truncate light grey">
- {{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
- </span>
- </div>
- {{end}}
- {{if and (gt $push.Len 1) $push.CompareURL}}
- <div class="flex-item">
- <a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a>
- </div>
- {{end}}
- </div>
+ {{$push := ActionContent2Commits .}}
+ {{$repoLink := .GetRepoLink}}
+ {{range $push.Commits}}
+ {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
+ <div class="flex-text-block">
+ <img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
+ <a class="gt-mono" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
+ <span class="text truncate light grey">
+ {{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
+ </span>
+ </div>
+ {{end}}
+ {{if and (gt $push.Len 1) $push.CompareURL}}
+ <a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a>
+ {{end}}
{{else if eq .GetOpType 6}}
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
{{else if eq .GetOpType 7}}