mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-15 14:08:21 +00:00
c82bef515e
This will conclude the refactor of 1:1 class replacements to tailwind, except `gt-hidden`. Commands ran: ```bash perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/* ``` (cherry picked from commit 68ec9b48592fe88765bcc3a73093d43c98b315de) Conflicts: routers/web/repo/view.go templates/base/head_navbar.tmpl templates/repo/code/recently_pushed_new_branches.tmpl templates/repo/diff/box.tmpl templates/repo/diff/compare.tmpl templates/repo/diff/conversation.tmpl templates/repo/header.tmpl templates/repo/issue/filter_list.tmpl templates/repo/issue/view_content/conversation.tmpl templates/repo/issue/view_content/sidebar.tmpl templates/repo/settings/options.tmpl templates/repo/view_file.tmpl templates/shared/user/blocked_users.tmpl templates/status/500.tmpl web_src/js/components/DashboardRepoList.vue resolved by prefering Forgejo version and applying the commands to all files
74 lines
2.8 KiB
Go HTML Template
74 lines
2.8 KiB
Go HTML Template
{{with .Issue}}
|
|
{{if eq $.Page.Project.CardType 1}}{{/* Images and Text*/}}
|
|
<div class="card-attachment-images">
|
|
{{range (index $.Page.issuesAttachmentMap .ID)}}
|
|
<img src="{{.DownloadURL}}" alt="{{.Name}}" />
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
<div class="content tw-p-0 tw-w-full">
|
|
<div class="tw-flex tw-items-start">
|
|
<div class="issue-card-icon">
|
|
{{template "shared/issueicon" .}}
|
|
</div>
|
|
<a class="issue-card-title muted issue-title" href="{{.Link}}">{{.Title | RenderEmoji ctx | RenderCodeBlock}}</a>
|
|
{{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}}
|
|
<a role="button" class="issue-card-unpin muted tw-flex tw-items-center" data-tooltip-content={{ctx.Locale.Tr "repo.issues.unpin_issue"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}">
|
|
{{svg "octicon-x" 16}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
<div class="meta tw-my-1">
|
|
<span class="text light grey muted-links">
|
|
{{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}}
|
|
{{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}}
|
|
{{if .OriginalAuthor}}
|
|
{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}}
|
|
{{else if gt .Poster.ID 0}}
|
|
{{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}}
|
|
{{end}}
|
|
</span>
|
|
</div>
|
|
{{if .MilestoneID}}
|
|
<div class="meta tw-my-1">
|
|
<a class="milestone" href="{{.Repo.Link}}/milestone/{{.MilestoneID}}">
|
|
{{svg "octicon-milestone" 16 "tw-mr-1 tw-align-middle"}}
|
|
<span class="tw-align-middle">{{.Milestone.Name}}</span>
|
|
</a>
|
|
</div>
|
|
{{end}}
|
|
{{if $.Page.LinkedPRs}}
|
|
{{range index $.Page.LinkedPRs .ID}}
|
|
<div class="meta tw-my-1">
|
|
<a href="{{$.Issue.Repo.Link}}/pulls/{{.Index}}">
|
|
<span class="tw-m-0 text {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "tw-mr-1 tw-align-middle"}}</span>
|
|
<span class="tw-align-middle">{{.Title}} <span class="text light grey">#{{.Index}}</span></span>
|
|
</a>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
{{$tasks := .GetTasks}}
|
|
{{if gt $tasks 0}}
|
|
<div class="meta tw-my-1">
|
|
{{svg "octicon-checklist" 16 "tw-mr-1 tw-align-middle"}}
|
|
<span class="tw-align-middle">{{.GetTasksDone}} / {{$tasks}}</span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
|
|
{{if or .Labels .Assignees}}
|
|
<div class="extra content labels-list tw-p-0 tw-pt-1">
|
|
{{range .Labels}}
|
|
<a target="_blank" href="{{$.Issue.Repo.Link}}/issues?labels={{.ID}}">{{RenderLabel ctx .}}</a>
|
|
{{end}}
|
|
<div class="right floated">
|
|
{{range .Assignees}}
|
|
<a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{ctx.Locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 28 "mini tw-mr-2"}}</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|