loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix UI on mobile view (#25315)

Various fixes to pages or elements which were looking ugly on mobile.
<details>
<summary>Screenshots</summary>

![Bildschirmfoto vom 2023-06-17
20-38-41](https://github.com/go-gitea/gitea/assets/47871822/30b5d3ce-df3b-43eb-a4c2-c3790667fb9d)
![Bildschirmfoto vom 2023-06-17
20-39-27](https://github.com/go-gitea/gitea/assets/47871822/27c07b25-3602-4fb2-b34d-d5e875e054e9)
![Bildschirmfoto vom 2023-06-17
20-41-27](https://github.com/go-gitea/gitea/assets/47871822/dacdbb4e-e3dd-4b94-abf0-c68e3d64bd3b)
![Bildschirmfoto vom 2023-06-17
20-41-48](https://github.com/go-gitea/gitea/assets/47871822/72432c35-7c4a-4c7f-a767-3562f26a5c14)
![Bildschirmfoto vom 2023-06-17
20-42-37](https://github.com/go-gitea/gitea/assets/47871822/737c26ed-1910-4467-98ef-e8769bbbe6f0)
![Bildschirmfoto vom 2023-06-17
20-42-52](https://github.com/go-gitea/gitea/assets/47871822/1813b4bc-43c0-4912-8acb-5d799c090bf3)
![Bildschirmfoto vom 2023-06-17
20-43-06](https://github.com/go-gitea/gitea/assets/47871822/136466e8-34e5-419d-97ec-5202ff819fd2)
![Bildschirmfoto vom 2023-06-17
20-43-42](https://github.com/go-gitea/gitea/assets/47871822/59270bb2-d661-4a84-8504-3e50f771f767)
![Bildschirmfoto vom 2023-06-17
20-44-44](https://github.com/go-gitea/gitea/assets/47871822/494e274d-3771-4141-9419-0a4bbd8b7f64)

</details>

Co-authored by @silverwind

---------

Co-authored-by: silverwind <me@silverwind.io>

authored by

Denys Konovalov
silverwind
and committed by
GitHub
9e740634 57120d99

+329 -201
+27 -24
templates/projects/list.tmpl
··· 35 35 </div> 36 36 </div> 37 37 </div> 38 - <div class="milestone list"> 38 + <div class="milestone-list"> 39 39 {{range .Projects}} 40 - <li class="item"> 41 - {{svg .IconName}} <a href="{{.Link}}">{{.Title}}</a> 42 - <div class="meta"> 43 - {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} 44 - {{if .IsClosed}} 45 - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} 40 + <li class="milestone-card"> 41 + <h3 class="flex-text-block gt-m-0"> 42 + {{svg .IconName 16}} 43 + <a class="muted" href="{{.Link}}">{{.Title}}</a> 44 + </h3> 45 + <div class="milestone-toolbar"> 46 + <div class="group"> 47 + <div class="flex-text-block"> 48 + {{svg "octicon-issue-opened" 14}} 49 + {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 50 + </div> 51 + <div class="flex-text-block"> 52 + {{svg "octicon-check" 14}} 53 + {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 54 + </div> 55 + </div> 56 + {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} 57 + <div class="group"> 58 + <a class="flex-text-inline" href="{{.Link}}/edit">{{svg "octicon-pencil" 14}}{{$.locale.Tr "repo.issues.label_edit"}}</a> 59 + {{if .IsClosed}} 60 + <a class="link-action flex-text-inline" href data-url="{{.Link}}/open">{{svg "octicon-check" 14}}{{$.locale.Tr "repo.projects.open"}}</a> 61 + {{else}} 62 + <a class="link-action flex-text-inline" href data-url="{{.Link}}/close">{{svg "octicon-skip" 14}}{{$.locale.Tr "repo.projects.close"}}</a> 63 + {{end}} 64 + <a class="delete-button flex-text-inline" href="#" data-url="{{.Link}}/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}} tesssst</a> 65 + </div> 46 66 {{end}} 47 - <span class="issue-stats"> 48 - {{svg "octicon-issue-opened" 16 "gt-mr-3"}} 49 - {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 50 - {{svg "octicon-check" 16 "gt-mr-3"}} 51 - {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 52 - </span> 53 67 </div> 54 - {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} 55 - <div class="ui right operate"> 56 - <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Title}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> 57 - {{if .IsClosed}} 58 - <a class="link-action" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check"}} {{$.locale.Tr "repo.projects.open"}}</a> 59 - {{else}} 60 - <a class="link-action" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-skip"}} {{$.locale.Tr "repo.projects.close"}}</a> 61 - {{end}} 62 - <a class="delete-button" href="#" data-url="{{$.Link}}/{{.ID}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> 63 - </div> 64 - {{end}} 65 68 {{if .Description}} 66 69 <div class="content"> 67 70 {{.RenderedContent|Str2html}}
+1 -1
templates/projects/view.tmpl
··· 46 46 {{if $.CanWriteProjects}} 47 47 <div class="column right aligned"> 48 48 <div class="ui compact right small menu"> 49 - <a class="item" href="{{$.Link}}/edit?redirect=project" data-id={{$.Project.ID}} data-title={{$.Project.Title}}> 49 + <a class="item" href="{{$.Link}}/edit?redirect=project"> 50 50 {{svg "octicon-pencil"}} 51 51 <span class="gt-mx-3">{{$.locale.Tr "repo.issues.label_edit"}}</span> 52 52 </a>
+18 -19
templates/repo/activity.tmpl
··· 2 2 <div role="main" aria-label="{{.Title}}" class="page-content repository commits"> 3 3 {{template "repo/header" .}} 4 4 <div class="ui container"> 5 - <h2 class="ui header">{{DateTime "long" .DateFrom}} - {{DateTime "long" .DateUntil}} 6 - <div class="ui right"> 7 - <!-- Period --> 8 - <div class="ui floating dropdown jump filter"> 9 - <div class="ui basic compact button"> 10 - <span class="text"> 11 - {{.locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong> 12 - {{svg "octicon-triangle-down" 14 "dropdown icon"}} 13 - </span> 14 - </div> 15 - <div class="menu"> 16 - <a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{.locale.Tr "repo.activity.period.daily"}}</a> 17 - <a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{.locale.Tr "repo.activity.period.halfweekly"}}</a> 18 - <a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{.locale.Tr "repo.activity.period.weekly"}}</a> 19 - <a class="{{if eq .Period "monthly"}}active {{end}}item" href="{{$.RepoLink}}/activity/monthly">{{.locale.Tr "repo.activity.period.monthly"}}</a> 20 - <a class="{{if eq .Period "quarterly"}}active {{end}}item" href="{{$.RepoLink}}/activity/quarterly">{{.locale.Tr "repo.activity.period.quarterly"}}</a> 21 - <a class="{{if eq .Period "semiyearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/semiyearly">{{.locale.Tr "repo.activity.period.semiyearly"}}</a> 22 - <a class="{{if eq .Period "yearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/yearly">{{.locale.Tr "repo.activity.period.yearly"}}</a> 23 - </div> 5 + <h2 class="ui header activity-header"> 6 + <span>{{DateTime "long" .DateFrom}} - {{DateTime "long" .DateUntil}}</span> 7 + <!-- Period --> 8 + <div class="ui floating dropdown jump filter"> 9 + <div class="ui basic compact button"> 10 + <span class="text"> 11 + {{.locale.Tr "repo.activity.period.filter_label"}} <strong>{{.PeriodText}}</strong> 12 + {{svg "octicon-triangle-down" 14 "dropdown icon"}} 13 + </span> 14 + </div> 15 + <div class="menu"> 16 + <a class="{{if eq .Period "daily"}}active {{end}}item" href="{{$.RepoLink}}/activity/daily">{{.locale.Tr "repo.activity.period.daily"}}</a> 17 + <a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{.locale.Tr "repo.activity.period.halfweekly"}}</a> 18 + <a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{.locale.Tr "repo.activity.period.weekly"}}</a> 19 + <a class="{{if eq .Period "monthly"}}active {{end}}item" href="{{$.RepoLink}}/activity/monthly">{{.locale.Tr "repo.activity.period.monthly"}}</a> 20 + <a class="{{if eq .Period "quarterly"}}active {{end}}item" href="{{$.RepoLink}}/activity/quarterly">{{.locale.Tr "repo.activity.period.quarterly"}}</a> 21 + <a class="{{if eq .Period "semiyearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/semiyearly">{{.locale.Tr "repo.activity.period.semiyearly"}}</a> 22 + <a class="{{if eq .Period "yearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/yearly">{{.locale.Tr "repo.activity.period.yearly"}}</a> 24 23 </div> 25 24 </div> 26 25 </h2>
+2 -2
templates/repo/empty.tmpl
··· 26 26 <div class="item"> 27 27 <h3>{{.locale.Tr "repo.clone_this_repo"}} <small>{{.locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3> 28 28 29 - <div class="gt-df"> 29 + <div class="repo-button-row"> 30 30 {{if and .CanWriteCode (not .Repository.IsArchived)}} 31 31 <a class="ui small button" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/"> 32 32 {{.locale.Tr "repo.editor.new_file"}} ··· 44 44 </div> 45 45 46 46 {{if not .Repository.IsArchived}} 47 - <div class="ui divider"></div> 47 + <div class="ui divider gt-my-0"></div> 48 48 49 49 <div class="item"> 50 50 <h3>{{.locale.Tr "repo.create_new_repo_command"}}</h3>
+3 -3
templates/repo/issue/list.tmpl
··· 71 71 {{template "repo/issue/search" .}} 72 72 {{if not .Repository.IsArchived}} 73 73 {{if .PageIsIssueList}} 74 - <a class="ui small green button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{.locale.Tr "repo.issues.new"}}</a> 74 + <a class="ui small green button issue-list-new" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{.locale.Tr "repo.issues.new"}}</a> 75 75 {{else}} 76 - <a class="ui small green button new-pr-button{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.pulls.new"}}</a> 76 + <a class="ui small green button new-pr-button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.pulls.new"}}</a> 77 77 {{end}} 78 78 {{else}} 79 79 {{if not .PageIsIssueList}} 80 - <a class="ui small green small button{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{$.locale.Tr "action.compare_commits_general"}}</a> 80 + <a class="ui small green small button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{$.locale.Tr "action.compare_commits_general"}}</a> 81 81 {{end}} 82 82 {{end}} 83 83 </div>
+55 -35
templates/repo/issue/milestones.tmpl
··· 13 13 {{template "base/alert" .}} 14 14 15 15 <div class="list-header"> 16 - <div class="small-menu-items ui compact tiny menu"> 16 + <div class="small-menu-items ui compact tiny menu list-header-toggle"> 17 17 <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}"> 18 18 {{svg "octicon-milestone" 16 "gt-mr-3"}} 19 19 {{.locale.PrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}} ··· 53 53 </div> 54 54 55 55 <!-- milestone list --> 56 - <div class="milestone list"> 56 + <div class="milestone-list"> 57 57 {{range .Milestones}} 58 - <li class="item"> 59 - <div class="gt-df gt-ac gt-sb"> 60 - <h3 class="gt-df gt-ac gt-m-0 gt-fw"> 61 - {{svg "octicon-milestone" 16 "gt-mr-3"}}<a class="muted" href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a> 58 + <li class="milestone-card"> 59 + <div class="milestone-header"> 60 + <h3 class="flex-text-block gt-m-0"> 61 + {{svg "octicon-milestone" 16}} 62 + <a class="muted" href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a> 62 63 </h3> 63 64 <div class="gt-df gt-ac"> 64 65 <span class="gt-mr-3">{{.Completeness}}%</span> 65 66 <progress value="{{.Completeness}}" max="100"></progress> 66 67 </div> 67 68 </div> 68 - <div class="meta"> 69 - {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} 70 - {{if .IsClosed}} 71 - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} 72 - {{else}} 73 - {{svg "octicon-calendar"}} 74 - {{if .DeadlineString}} 75 - <span {{if .IsOverdue}}class="overdue"{{end}}>{{DateTime "short" .DeadlineString}}</span> 76 - {{else}} 77 - {{$.locale.Tr "repo.milestones.no_due_date"}} 69 + <div class="milestone-toolbar"> 70 + <div class="group"> 71 + <div class="flex-text-block"> 72 + {{svg "octicon-issue-opened" 14}} 73 + {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 74 + </div> 75 + <div class="flex-text-block"> 76 + {{svg "octicon-check" 14}} 77 + {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 78 + </div> 79 + {{if .TotalTrackedTime}} 80 + <div class="flex-text-block"> 81 + {{svg "octicon-clock"}} 82 + {{.TotalTrackedTime|Sec2Time}} 83 + </div> 78 84 {{end}} 79 - {{end}} 80 - <span class="issue-stats"> 81 - {{svg "octicon-issue-opened" 16 "gt-mr-3"}} 82 - {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 83 - {{svg "octicon-check" 16 "gt-mr-3"}} 84 - {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 85 - {{if .TotalTrackedTime}}{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}{{end}} 86 - {{if .UpdatedUnix}}{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix $.locale) | Safe}}{{end}} 87 - </span> 88 - </div> 89 - {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} 90 - <div class="ui right operate"> 91 - <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> 92 - {{if .IsClosed}} 93 - <a class="link-action" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check"}} {{$.locale.Tr "repo.milestones.open"}}</a> 94 - {{else}} 95 - <a class="link-action" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x"}} {{$.locale.Tr "repo.milestones.close"}}</a> 85 + {{if .UpdatedUnix}} 86 + <div class="flex-text-block"> 87 + {{svg "octicon-clock"}} 88 + {{$.locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix $.locale) | Safe}} 89 + </div> 96 90 {{end}} 97 - <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> 91 + <div class="flex-text-block"> 92 + {{if .IsClosed}} 93 + {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} 94 + {{svg "octicon-clock" 14}} 95 + {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} 96 + {{else}} 97 + {{svg "octicon-calendar" 14}} 98 + {{if .DeadlineString}} 99 + <span {{if .IsOverdue}}class="overdue"{{end}}> 100 + {{DateTime "short" .DeadlineString}} 101 + </span> 102 + {{else}} 103 + {{$.locale.Tr "repo.milestones.no_due_date"}} 104 + {{end}} 105 + {{end}} 106 + </div> 98 107 </div> 99 - {{end}} 108 + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} 109 + <div class="group"> 110 + <a class="flex-text-inline" href="{{$.Link}}/{{.ID}}/edit">{{svg "octicon-pencil" 14}}{{$.locale.Tr "repo.issues.label_edit"}}</a> 111 + {{if .IsClosed}} 112 + <a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check" 14}}{{$.locale.Tr "repo.milestones.open"}}</a> 113 + {{else}} 114 + <a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a> 115 + {{end}} 116 + <a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a> 117 + </div> 118 + {{end}} 119 + </div> 100 120 {{if .Content}} 101 121 <div class="markup content"> 102 122 {{.RenderedContent|Str2html}}
+1 -1
templates/repo/issue/navbar.tmpl
··· 1 - <h2 class="ui compact small menu header small-menu-items"> 1 + <h2 class="ui compact small menu header small-menu-items issue-list-navbar"> 2 2 <a class="{{if .PageIsLabels}}active {{end}}item" href="{{.RepoLink}}/labels">{{.locale.Tr "repo.labels"}}</a> 3 3 <a class="{{if .PageIsMilestones}}active {{end}}item" href="{{.RepoLink}}/milestones">{{.locale.Tr "repo.milestones"}}</a> 4 4 </h2>
+1 -1
templates/repo/issue/search.tmpl
··· 1 - <form class="list-header-search ui form ignore-dirty"> 1 + <form class="list-header-search ui form ignore-dirty issue-list-search"> 2 2 <div class="ui small search fluid action input"> 3 3 <input type="hidden" name="type" value="{{$.ViewType}}"> 4 4 <input type="hidden" name="state" value="{{$.State}}">
+29 -26
templates/repo/projects/list.tmpl
··· 2 2 <div role="main" aria-label="{{.Title}}" class="page-content repository projects milestones"> 3 3 {{template "repo/header" .}} 4 4 <div class="ui container"> 5 - <div class="navbar gt-mb-4"> 5 + <div class="navbar projects-header"> 6 6 <div> 7 7 <div class="small-menu-items ui compact tiny menu"> 8 8 <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=open"> ··· 15 15 </a> 16 16 </div> 17 17 </div> 18 - <div> 18 + <div class="projects-toolbar"> 19 19 <!-- Sort --> 20 20 <div class="ui small dropdown type jump item"> 21 21 <span class="text"> ··· 35 35 </div> 36 36 {{template "base/alert" .}} 37 37 38 - <div class="milestone list"> 38 + <div class="milestone-list"> 39 39 {{range .Projects}} 40 - <li class="item"> 41 - {{svg .IconName}} <a href="{{.Link}}">{{.Title}}</a> 42 - <div class="meta"> 43 - {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} 44 - {{if .IsClosed}} 45 - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} 40 + <li class="milestone-card"> 41 + <h3 class="flex-text-block gt-m-0"> 42 + {{svg .IconName 16}} 43 + <a class="muted" href="{{.Link}}">{{.Title}}</a> 44 + </h3> 45 + <div class="milestone-toolbar"> 46 + <div class="group"> 47 + <div class="flex-text-block"> 48 + {{svg "octicon-issue-opened" 14}} 49 + {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 50 + </div> 51 + <div class="flex-text-block"> 52 + {{svg "octicon-check" 14}} 53 + {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 54 + </div> 55 + </div> 56 + {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} 57 + <div class="group"> 58 + <a class="flex-text-inline" href="{{.Link}}/edit">{{svg "octicon-pencil" 14}}{{$.locale.Tr "repo.issues.label_edit"}}</a> 59 + {{if .IsClosed}} 60 + <a class="link-action flex-text-inline" href data-url="{{.Link}}/open">{{svg "octicon-check" 14}}{{$.locale.Tr "repo.projects.open"}}</a> 61 + {{else}} 62 + <a class="link-action flex-text-inline" href data-url="{{.Link}}/close">{{svg "octicon-skip" 14}}{{$.locale.Tr "repo.projects.close"}}</a> 63 + {{end}} 64 + <a class="delete-button flex-text-inline" href="#" data-url="{{.Link}}/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a> 65 + </div> 46 66 {{end}} 47 - <span class="issue-stats"> 48 - {{svg "octicon-issue-opened" 16 "gt-mr-3"}} 49 - {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 50 - {{svg "octicon-check" 16 "gt-mr-3"}} 51 - {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 52 - </span> 53 67 </div> 54 - {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} 55 - <div class="ui right operate"> 56 - <a href="{{.Link}}/edit" data-id={{.ID}} data-title={{.Title}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> 57 - {{if .IsClosed}} 58 - <a class="link-action" href data-url="{{.Link}}/open">{{svg "octicon-check"}} {{$.locale.Tr "repo.projects.open"}}</a> 59 - {{else}} 60 - <a class="link-action" href data-url="{{.Link}}/close">{{svg "octicon-skip"}} {{$.locale.Tr "repo.projects.close"}}</a> 61 - {{end}} 62 - <a class="delete-button" href="#" data-url="{{.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> 63 - </div> 64 - {{end}} 65 68 {{if .Description}} 66 69 <div class="content"> 67 70 {{.RenderedContent|Str2html}}
+1 -1
templates/repo/projects/view.tmpl
··· 50 50 {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} 51 51 <div class="column right aligned"> 52 52 <div class="ui compact right small menu"> 53 - <a class="item" href="{{$.RepoLink}}/projects/{{.Project.ID}}/edit?redirect=project" data-id={{$.Project.ID}} data-title={{$.Project.Title}}> 53 + <a class="item" href="{{$.RepoLink}}/projects/{{.Project.ID}}/edit?redirect=project"> 54 54 {{svg "octicon-pencil"}} 55 55 <span class="gt-mx-3">{{$.locale.Tr "repo.issues.label_edit"}}</span> 56 56 </a>
+1 -1
templates/user/dashboard/issues.tmpl
··· 61 61 </div> 62 62 <div class="twelve wide column content"> 63 63 <div class="list-header"> 64 - <div class="small-menu-items ui compact tiny menu"> 64 + <div class="small-menu-items ui compact tiny menu list-header-toggle"> 65 65 <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}"> 66 66 {{svg "octicon-issue-opened" 16 "gt-mr-3"}} 67 67 {{.locale.PrettyNumber .IssueStats.OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
+57 -36
templates/user/dashboard/milestones.tmpl
··· 35 35 </div> 36 36 <div class="twelve wide column content"> 37 37 <div class="list-header"> 38 - <div class="small-menu-items ui compact tiny menu"> 38 + <div class="small-menu-items ui compact tiny menu list-header-toggle"> 39 39 <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}"> 40 40 {{svg "octicon-milestone" 16 "gt-mr-3"}} 41 41 {{.locale.PrettyNumber .MilestoneStats.OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}} ··· 71 71 </div> 72 72 </div> 73 73 </div> 74 - <div class="milestone list"> 74 + <div class="milestone-list"> 75 75 {{range .Milestones}} 76 - <li class="item"> 77 - <div class="gt-df gt-ac gt-sb"> 78 - <h3 class="gt-df gt-ac gt-m-0 gt-fw"> 79 - <span class="ui large label">{{.Repo.FullName}}</span> 80 - {{svg "octicon-milestone" 16 "gt-mr-3"}}<a class="muted" href="{{.Repo.Link}}/milestone/{{.ID}}">{{.Name}}</a> 76 + <li class="milestone-card"> 77 + <div class="milestone-header"> 78 + <h3 class="flex-text-block gt-m-0"> 79 + <span class="ui large label"> 80 + {{.Repo.FullName}} 81 + </span> 82 + {{svg "octicon-milestone" 16}} 83 + <a class="muted" href="{{.Repo.Link}}/milestone/{{.ID}}">{{.Name}}</a> 81 84 </h3> 82 85 <div class="gt-df gt-ac"> 83 86 <span class="gt-mr-3">{{.Completeness}}%</span> 84 87 <progress value="{{.Completeness}}" max="100"></progress> 85 88 </div> 86 89 </div> 87 - <div class="meta"> 88 - {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} 89 - {{if .IsClosed}} 90 - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} 91 - {{else}} 92 - {{svg "octicon-calendar"}} 93 - {{if .DeadlineString}} 94 - <span {{if .IsOverdue}}class="overdue"{{end}}>{{DateTime "short" .DeadlineString}}</span> 95 - {{else}} 96 - {{$.locale.Tr "repo.milestones.no_due_date"}} 97 - {{end}} 98 - {{end}} 99 - <span class="issue-stats"> 100 - {{svg "octicon-issue-opened" 16 "gt-mr-3"}} 101 - {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 102 - {{svg "octicon-check" 16 "gt-mr-3"}} 103 - {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 90 + <div class="milestone-toolbar"> 91 + <div class="group"> 92 + <div class="flex-text-block"> 93 + {{svg "octicon-issue-opened" 14}} 94 + {{$.locale.PrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}} 95 + </div> 96 + <div class="flex-text-block"> 97 + {{svg "octicon-check" 14}} 98 + {{$.locale.PrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}} 99 + </div> 104 100 {{if .TotalTrackedTime}} 105 - {{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}} 101 + <div class="flex-text-block"> 102 + {{svg "octicon-clock"}} 103 + {{.TotalTrackedTime|Sec2Time}} 104 + </div> 106 105 {{end}} 107 - </span> 108 - </div> 109 - {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} 110 - <div class="ui right operate"> 111 - <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a> 112 - {{if .IsClosed}} 113 - <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.locale.Tr "repo.milestones.open"}}</a> 114 - {{else}} 115 - <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.locale.Tr "repo.milestones.close"}}</a> 106 + {{if .UpdatedUnix}} 107 + <div class="flex-text-block"> 108 + {{svg "octicon-clock"}} 109 + {{$.locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix $.locale) | Safe}} 110 + </div> 116 111 {{end}} 117 - <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a> 112 + <div class="flex-text-block"> 113 + {{if .IsClosed}} 114 + {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} 115 + {{svg "octicon-clock" 14}} 116 + {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} 117 + {{else}} 118 + {{svg "octicon-calendar" 14}} 119 + {{if .DeadlineString}} 120 + <span {{if .IsOverdue}}class="overdue"{{end}}> 121 + {{DateTime "short" .DeadlineString}} 122 + </span> 123 + {{else}} 124 + {{$.locale.Tr "repo.milestones.no_due_date"}} 125 + {{end}} 126 + {{end}} 127 + </div> 118 128 </div> 119 - {{end}} 129 + {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}} 130 + <div class="group"> 131 + <a class="flex-text-inline" href="{{$.Link}}/{{.ID}}/edit">{{svg "octicon-pencil" 14}}{{$.locale.Tr "repo.issues.label_edit"}}</a> 132 + {{if .IsClosed}} 133 + <a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check" 14}}{{$.locale.Tr "repo.milestones.open"}}</a> 134 + {{else}} 135 + <a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a> 136 + {{end}} 137 + <a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a> 138 + </div> 139 + {{end}} 140 + </div> 120 141 {{if .Content}} 121 142 <div class="markup content"> 122 143 {{.RenderedContent|Str2html}}
+1
web_src/css/index.css
··· 9 9 @import "./modules/comment.css"; 10 10 11 11 @import "./shared/issuelist.css"; 12 + @import "./shared/milestone.css"; 12 13 @import "./shared/repoorg.css"; 13 14 @import "./shared/settings.css"; 14 15
+33 -50
web_src/css/repo.css
··· 87 87 } 88 88 } 89 89 90 + .projects-header { 91 + margin-bottom: 1rem; 92 + flex-direction: column; 93 + gap: 8px; 94 + } 95 + 96 + .projects-toolbar { 97 + display: flex; 98 + justify-content: space-between; 99 + padding-left: 4px; 100 + } 101 + 90 102 .repository .issue-content-right .menu { 91 103 overflow-x: auto; 92 104 max-height: 500px; ··· 223 235 display: flex; 224 236 justify-content: space-between; 225 237 align-items: center; 238 + } 239 + 240 + @media (max-width: 767.68px) { 241 + .repository.file.list .repo-description { 242 + flex-direction: column; 243 + gap: 8px; 244 + align-items: normal; 245 + } 226 246 } 227 247 228 248 .repository.file.list #repo-desc { ··· 1167 1187 margin-top: -8px; 1168 1188 } 1169 1189 1170 - .repository .milestone.list { 1171 - list-style: none; 1172 - } 1173 - 1174 - .repository .milestone.list > .item { 1175 - padding-top: 10px; 1176 - padding-bottom: 10px; 1177 - } 1178 - 1179 - .repository .milestone.list > .item + .item { 1180 - border-top: 1px solid var(--color-secondary); 1181 - } 1182 - 1183 - .repository .milestone.list > .item progress { 1184 - width: 200px; 1185 - height: 16px; 1186 - } 1187 - 1188 - .repository .milestone.list > .item .meta { 1189 - color: var(--color-text-light-2); 1190 - padding-top: 5px; 1191 - } 1192 - 1193 - .repository .milestone.list > .item .meta .issue-stats .svg { 1194 - padding-left: 5px; 1195 - } 1196 - 1197 - .repository .milestone.list > .item .meta .overdue { 1198 - color: var(--color-red); 1199 - } 1200 - 1201 - .repository .milestone.list > .item .operate { 1202 - margin-top: -15px; 1203 - } 1204 - 1205 - .repository .milestone.list > .item .operate > a { 1206 - font-size: 15px; 1207 - padding-top: 5px; 1208 - padding-right: 10px; 1209 - color: var(--color-text-light-2); 1210 - } 1211 - 1212 - .repository .milestone.list > .item .operate > a:hover { 1213 - color: var(--color-text); 1214 - } 1215 - 1216 - .repository .milestone.list > .item .content { 1217 - padding-top: 10px; 1218 - } 1219 - 1220 1190 .repository.new.milestone textarea { 1221 1191 height: 200px; 1222 1192 } ··· 1962 1932 .repository.wiki #clone-panel #repo-clone-url { 1963 1933 width: 160px; 1964 1934 } 1935 + } 1936 + 1937 + .repository .activity-header { 1938 + display: flex; 1939 + justify-content: space-between; 1940 + gap: 8px; 1941 + flex-wrap: wrap; 1965 1942 } 1966 1943 1967 1944 .repository.settings.collaboration .collaborator.list { ··· 3379 3356 grid-template-columns: repeat(3, 1fr); 3380 3357 gap: 8px; 3381 3358 margin-bottom: 8px; 3359 + } 3360 + 3361 + @media (max-width: 767.98px) { 3362 + #issue-pins { 3363 + grid-template-columns: repeat(1, 1fr); 3364 + } 3382 3365 } 3383 3366 3384 3367 .pinned-issue-card {
+20
web_src/css/repo/issue-list.css
··· 13 13 .issue-list-toolbar-right { 14 14 margin-left: auto; 15 15 } 16 + 17 + @media (max-width: 767.98px) { 18 + .issue-list-toolbar { 19 + flex-direction: column-reverse; 20 + } 21 + .issue-list-toolbar-right { 22 + margin-right: auto; 23 + width: 100%; 24 + } 25 + .issue-list-navbar { 26 + order: 0; 27 + } 28 + .issue-list-new { 29 + order: 1; 30 + margin-left: auto !important; 31 + } 32 + .issue-list-search { 33 + order: 2 !important; 34 + } 35 + }
+13 -1
web_src/css/repo/list-header.css
··· 8 8 .list-header-sort { 9 9 display: flex; 10 10 align-items: center; 11 - justify-content: flex-end; 12 11 padding-left: 1rem; 13 12 padding-right: 1rem; 14 13 } ··· 44 43 .small-menu-items .item.active { 45 44 background: var(--color-active) !important; 46 45 } 46 + 47 + @media (max-width: 767.98px) { 48 + .list-header-search { 49 + order: 0; 50 + } 51 + .list-header-toggle { 52 + order: 1; 53 + } 54 + .list-header-sort { 55 + order: 2; 56 + margin-left: auto; 57 + } 58 + }
+66
web_src/css/shared/milestone.css
··· 1 + .milestone-list { 2 + list-style: none; 3 + } 4 + 5 + .milestone-card { 6 + width: 100%; 7 + padding-top: 10px; 8 + padding-bottom: 10px; 9 + } 10 + 11 + .milestone-card + .milestone-card { 12 + border-top: 1px solid var(--color-secondary); 13 + } 14 + 15 + .milestone-card .content { 16 + padding-top: 10px; 17 + } 18 + 19 + .milestone-header progress { 20 + width: 200px; 21 + height: 16px; 22 + } 23 + 24 + .milestone-header { 25 + display: flex; 26 + align-items: center; 27 + margin: 0; 28 + flex-wrap: wrap; 29 + justify-content: space-between; 30 + } 31 + 32 + .milestone-toolbar { 33 + padding-top: 5px; 34 + display: flex; 35 + flex-wrap: wrap; 36 + gap: 8px; 37 + justify-content: space-between; 38 + } 39 + 40 + .milestone-toolbar .group { 41 + color: var(--color-text-light-2); 42 + display: flex; 43 + flex-wrap: wrap; 44 + gap: 8px; 45 + } 46 + 47 + .milestone-toolbar .group .overdue { 48 + color: var(--color-red); 49 + } 50 + 51 + .milestone-toolbar .group > a { 52 + font-size: 15px; 53 + color: var(--color-text-light-2); 54 + } 55 + 56 + .milestone-toolbar .group > a:hover { 57 + color: var(--color-text); 58 + } 59 + 60 + @media (max-width: 767.98px) { 61 + .milestone-card { 62 + display: flex; 63 + flex-direction: column; 64 + gap: 8px; 65 + } 66 + }