mirror of https://github.com/go-gitea/gitea.git
Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790)
This PR introduces a new UI element type for Gitea called `flex-item`. It consists of a horizontal card with a leading, main and trailing part: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/395dd3f3-3906-4481-8f65-be6ac0acbe03) The idea behind it is that in Gitea UI, we have many cases where we use this kind of layout, but it is achieved in many different ways: - grid layout - `.ui.list` with additional hacky flexbox - `.ui.key.list` - looks to me like a style set originally created for ssh/gpg key list, was used in many other places - `.issue.list` - created for issue cards, used in many other places - ... This new style is based on `.issue.list`, specifically the refactoring of it done in #25750. In this PR, the new element is introduced and lots of templates are being refactored to use that style. This allows to remove a lot of page-specific css, makes many of the elements responsive or simply provides a cleaner/better-looking way to present information. A devtest section with the new style is also available. <details> <summary>Screenshots (left: before, right: after)</summary> ![Bildschirmfoto vom 2023-07-09 21-01-21](https://github.com/go-gitea/gitea/assets/47871822/545b7da5-b300-475f-bd6d-b7d836950bb5) ![Bildschirmfoto vom 2023-07-09 21-01-56](https://github.com/go-gitea/gitea/assets/47871822/b6f70415-6795-4f71-a5ea-117d56107ea1) ![Bildschirmfoto vom 2023-07-09 21-02-45](https://github.com/go-gitea/gitea/assets/47871822/47407121-3f2a-4778-8f6d-ad2687c2e7b3) ![Bildschirmfoto vom 2023-07-09 21-03-44](https://github.com/go-gitea/gitea/assets/47871822/76167aaf-c3b2-46f6-9ffd-709f20aa6a34) ![Bildschirmfoto vom 2023-07-09 21-04-52](https://github.com/go-gitea/gitea/assets/47871822/af8fdde5-711e-4524-99cf-fb5d68af85b9) ![Bildschirmfoto vom 2023-07-09 21-05-25](https://github.com/go-gitea/gitea/assets/47871822/ae406946-e3e4-4109-abfe-b3588a07b468) ![Bildschirmfoto vom 2023-07-09 21-06-35](https://github.com/go-gitea/gitea/assets/47871822/2dbacc04-24d6-4f91-9e42-e16d6e4b5f1f) ![Bildschirmfoto vom 2023-07-09 21-09-03](https://github.com/go-gitea/gitea/assets/47871822/d3ca4e56-a72f-4179-adc8-98bfd638025b) ![Bildschirmfoto vom 2023-07-09 21-09-44](https://github.com/go-gitea/gitea/assets/47871822/df1fa689-499c-4e54-b6fb-3b81644b725f) ![Bildschirmfoto vom 2023-07-09 21-10-27](https://github.com/go-gitea/gitea/assets/47871822/b21cac71-a85a-4c8c-bb99-ab90373d8e09) ![Bildschirmfoto vom 2023-07-09 21-11-12](https://github.com/go-gitea/gitea/assets/47871822/89be39cf-0af9-4f2d-9fca-42f9eb5e7824) ![Bildschirmfoto vom 2023-07-09 21-12-01](https://github.com/go-gitea/gitea/assets/47871822/079579ea-1ecb-49c0-b32b-b59ed957caec) ![Bildschirmfoto vom 2023-07-09 21-17-44](https://github.com/go-gitea/gitea/assets/47871822/61ac6ec4-a319-4d5c-9c99-2e02a77295ba) ![Bildschirmfoto vom 2023-07-09 21-18-27](https://github.com/go-gitea/gitea/assets/47871822/5b55b73f-6244-47f7-a3e6-c5e4a7474585) ![Bildschirmfoto vom 2023-07-09 21-19-18](https://github.com/go-gitea/gitea/assets/47871822/c1b7c22e-3e5a-46d4-b8d6-5560db478c0b) ![Bildschirmfoto vom 2023-07-09 21-29-13](https://github.com/go-gitea/gitea/assets/47871822/82ffca8d-ab2e-4a18-9954-5b685bf6a422) ![Bildschirmfoto vom 2023-07-09 21-30-11](https://github.com/go-gitea/gitea/assets/47871822/ad2fdccc-2be8-41bb-bfdc-a084aa387b61) ![Bildschirmfoto vom 2023-07-09 21-32-44](https://github.com/go-gitea/gitea/assets/47871822/2d298ba7-d084-48b5-a139-f86d56262110) ![Bildschirmfoto vom 2023-07-09 21-33-28](https://github.com/go-gitea/gitea/assets/47871822/4cbd838e-9de8-4ad0-8ed9-438da5c9a5cb) </details> --------- Co-authored-by: Giteabot <teabot@gitea.io>pull/26257/head^2
parent
fc6c3d626e
commit
b9baed2c74
@ -1,38 +1 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
|
||||
{{template "explore/navbar" .}}
|
||||
<div class="ui container">
|
||||
{{template "explore/search" .}}
|
||||
|
||||
<div class="ui user list">
|
||||
{{range .Users}}
|
||||
<div class="item">
|
||||
{{avatar $.Context .}}
|
||||
<div class="content">
|
||||
<span class="header">
|
||||
<a href="{{.HomeLink}}">{{.Name}}</a> {{.FullName}}
|
||||
{{if .Visibility.IsPrivate}}
|
||||
<span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span>
|
||||
{{end}}
|
||||
</span>
|
||||
<div class="description">
|
||||
{{if .Location}}
|
||||
{{svg "octicon-location"}} {{.Location}}
|
||||
{{end}}
|
||||
{{if and .Website}}
|
||||
{{svg "octicon-link"}}
|
||||
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
|
||||
{{end}}
|
||||
{{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div>{{$.locale.Tr "explore.org_no_results"}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "explore/users" .}}
|
||||
|
@ -0,0 +1,5 @@
|
||||
{{if .FullName}}
|
||||
{{.FullName}} <span>(<a class="text primary" href="{{.HomeLink}}">{{.Name}}</a>)</span>
|
||||
{{else}}
|
||||
<a class="text primary" href="{{.HomeLink}}">{{.Name}}</a>
|
||||
{{end}}
|
@ -1,128 +1,128 @@
|
||||
{{range .Feeds}}
|
||||
<div class="news">
|
||||
<div class="ui left">
|
||||
{{avatarByAction $.Context .}}
|
||||
</div>
|
||||
<div class="ui grid">
|
||||
<div class="ui fourteen wide column">
|
||||
<div class="{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}push news{{end}}">
|
||||
<p>
|
||||
{{if gt .ActUser.ID 0}}
|
||||
<a href="{{AppSubUrl}}/{{.GetActUserName | PathEscape}}" title="{{.GetDisplayNameTitle}}">{{.GetDisplayName}}</a>
|
||||
<div id="activity-feed" class="flex-list">
|
||||
{{range .Feeds}}
|
||||
<div class="flex-item">
|
||||
<div class="flex-item-leading">
|
||||
{{avatarByAction $.Context .}}
|
||||
</div>
|
||||
<div class="flex-item-main gt-gap-3">
|
||||
<div>
|
||||
{{if gt .ActUser.ID 0}}
|
||||
<a href="{{AppSubUrl}}/{{.GetActUserName | PathEscape}}" title="{{.GetDisplayNameTitle}}">{{.GetDisplayName}}</a>
|
||||
{{else}}
|
||||
{{.ShortActUserName}}
|
||||
{{end}}
|
||||
{{if eq .GetOpType 1}}
|
||||
{{$.locale.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 2}}
|
||||
{{$.locale.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 5}}
|
||||
{{if .Content}}
|
||||
{{$.locale.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else}}
|
||||
{{.ShortActUserName}}
|
||||
{{end}}
|
||||
{{if eq .GetOpType 1}}
|
||||
{{$.locale.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 2}}
|
||||
{{$.locale.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 5}}
|
||||
{{if .Content}}
|
||||
{{$.locale.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else}}
|
||||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{end}}
|
||||
{{else if eq .GetOpType 6}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 7}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 8}}
|
||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 9}}
|
||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 12}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 13}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 14}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 15}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 16}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 17}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 18}}
|
||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 19}}
|
||||
{{$.locale.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 20}}
|
||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 21}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 22}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 23}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 24}}
|
||||
{{$linkText := .Content | RenderEmoji $.Context}}
|
||||
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||
{{else if eq .GetOpType 25}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$reviewer := index .GetIssueInfos 1}}
|
||||
{{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
|
||||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{end}}
|
||||
</p>
|
||||
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
|
||||
<div class="content">
|
||||
<ul>
|
||||
{{$push := ActionContent2Commits .}}
|
||||
{{$repoLink := .GetRepoLink}}
|
||||
{{range $push.Commits}}
|
||||
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
<li>
|
||||
{{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "gt-mr-2" .AuthorName}}
|
||||
<a class="commit-id gt-mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||
<span class="text truncate light grey">
|
||||
{{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}
|
||||
</span>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else if eq .GetOpType 6}}
|
||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 7}}
|
||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
|
||||
<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</a>
|
||||
{{$comment := index .GetIssueInfos 1}}
|
||||
{{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji $.Context}}</p>{{end}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 8}}
|
||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 9}}
|
||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
|
||||
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
|
||||
<span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 12}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 13}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 14}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 15}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 16}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 17}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 18}}
|
||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 19}}
|
||||
{{$.locale.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 20}}
|
||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 21}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 22}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 23}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 24}}
|
||||
{{$linkText := .Content | RenderEmoji $.Context}}
|
||||
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||
{{else if eq .GetOpType 25}}
|
||||
<p class="text light grey">{{$.locale.Tr "action.review_dismissed_reason"}}</p>
|
||||
<p class="text light grey">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</p>
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$reviewer := index .GetIssueInfos 1}}
|
||||
{{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
|
||||
{{end}}
|
||||
<p class="text italic light grey">{{TimeSince .GetCreate $.locale}}</p>
|
||||
</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">
|
||||
{{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "" .AuthorName}}
|
||||
<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>
|
||||
{{else if eq .GetOpType 6}}
|
||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||
{{else if eq .GetOpType 7}}
|
||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
|
||||
<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</a>
|
||||
{{$comment := index .GetIssueInfos 1}}
|
||||
{{if gt (len $comment) 0}}
|
||||
<div class="flex-item-body">{{$comment | RenderEmoji $.Context | RenderCodeBlock}}</div>
|
||||
{{end}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
<div class="flex-item-body">{{index .GetIssueInfos 1}}</div>
|
||||
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
|
||||
<span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
||||
{{else if eq .GetOpType 25}}
|
||||
<div class="flex-item-body">{{$.locale.Tr "action.review_dismissed_reason"}}</div>
|
||||
<div class="flex-item-body">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div>
|
||||
{{end}}
|
||||
<div class="flex-item-body">{{TimeSince .GetCreate $.locale}}</div>
|
||||
</div>
|
||||
<div class="ui two wide right aligned column">
|
||||
<span class="text grey">{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}</span>
|
||||
<div class="flex-item-trailing">
|
||||
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
{{end}}
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
|
@ -0,0 +1,94 @@
|
||||
.flex-list {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.flex-item {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.flex-item:not(:last-child) {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.flex-item-baseline {
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.flex-item-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-item .flex-item-leading {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.flex-item .flex-item-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.flex-item-header {
|
||||
display: flex;
|
||||
gap: .25rem;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.flex-item a:not(.label, .button):hover {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.flex-item .flex-item-icon svg {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.flex-item .flex-item-trailing {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
flex-grow: 0;
|
||||
flex-wrap: wrap;
|
||||
justify-content: end;
|
||||
flex-shrink: 2;
|
||||
}
|
||||
|
||||
.flex-item .flex-item-title {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: .25rem;
|
||||
max-width: 100%;
|
||||
color: var(--color-text);
|
||||
font-size: 16px;
|
||||
min-width: 0;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
.flex-item .flex-item-title a {
|
||||
color: var(--color-text);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.flex-item .flex-item-body {
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: .25rem;
|
||||
color: var(--color-text-light-2);
|
||||
}
|
||||
|
||||
.flex-item .flex-item-body a {
|
||||
color: inherit;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.flex-list > .flex-item + .flex-item {
|
||||
border-top: 1px solid var(--color-secondary);
|
||||
padding-top: 8px;
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
.issue.list {
|
||||
list-style: none;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.issue.list .item {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.issue.list .item .issue-item-left {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.issue.list .item .issue-item-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.issue.list .item .issue-item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.issue.list a:not(.label):hover {
|
||||
color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-icon svg {
|
||||
margin-right: 0.75rem;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.issue.list .item .issue-item-right {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.issue.list > .action-item {
|
||||
align-items: normal;
|
||||
}
|
||||
|
||||
.issue.list > .item .action-item-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 4px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.issue.list > .item .action-item-right {
|
||||
flex: 0 0 15%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-title {
|
||||
max-width: 100%;
|
||||
color: var(--color-text);
|
||||
font-size: 16px;
|
||||
min-width: 0;
|
||||
font-weight: var(--font-weight-semibold);
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-title a.index {
|
||||
max-width: fit-content;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.issue.list > .item .title {
|
||||
color: var(--color-text);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-body {
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: .25rem;
|
||||
color: var(--color-text-light-2);
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-body a {
|
||||
color: inherit;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-body .checklist progress {
|
||||
margin-left: 2px;
|
||||
width: 80px;
|
||||
height: 6px;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-body .checklist progress::-webkit-progress-value {
|
||||
background-color: var(--color-secondary-dark-4);
|
||||
}
|
||||
|
||||
.issue.list > .item .issue-item-body .checklist progress::-moz-progress-bar {
|
||||
background-color: var(--color-secondary-dark-4);
|
||||
}
|
||||
|
||||
.issue.list .branches {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.issue.list .branches .branch {
|
||||
background-color: var(--color-secondary-alpha-40);
|
||||
border-radius: 3px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.issue.list .branches .truncated-name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 10em;
|
||||
}
|
||||
|
||||
.issue.list > .item + .item {
|
||||
border-top: 1px solid var(--color-secondary);
|
||||
}
|
Loading…
Reference in New Issue