aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-11-29 16:52:11 +0100
committerGitHub <noreply@github.com>2020-11-29 17:52:11 +0200
commit295fc99607915d85141fd16099d2d9f59a7ee977 (patch)
tree89eec5bc2e3fbdd28be4fa63065d2022894dc7f1 /templates/repo
parente00a3554279d314a4dab4ce11bdd86707201d0d2 (diff)
downloadgitea-295fc99607915d85141fd16099d2d9f59a7ee977.tar.gz
gitea-295fc99607915d85141fd16099d2d9f59a7ee977.zip
Markdown and Repo header tweaks (#13744)
* Markdown and Repo header tweaks - Use CSS vars for all markdown colors - Tweak repo header, removing double borders and adjust sizes - Use menu instead of buttons for issue open/close switcher - Add emoji inversion for select emoji glyphs in arc-green - Use border over box-shadow for all buttons - Add spacing element to login form without openid * repo settings navbar fix * use shared template in more places and adjust dashboard * fix remaining open/close combos
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/branch_dropdown.tmpl2
-rw-r--r--templates/repo/home.tmpl6
-rw-r--r--templates/repo/issue/list.tmpl22
-rw-r--r--templates/repo/issue/milestone_issues.tmpl22
-rw-r--r--templates/repo/issue/milestones.tmpl10
-rw-r--r--templates/repo/issue/openclose.tmpl10
-rw-r--r--templates/repo/projects/list.tmpl6
-rw-r--r--templates/repo/settings/navbar.tmpl2
8 files changed, 27 insertions, 53 deletions
diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl
index a7eafa3874..81229c0ef5 100644
--- a/templates/repo/branch_dropdown.tmpl
+++ b/templates/repo/branch_dropdown.tmpl
@@ -1,4 +1,4 @@
-<div class="fitted item choose reference">
+<div class="fitted item choose reference mr-1">
<div class="ui floating filter dropdown custom" data-can-create-branch="{{.CanCreateBranch}}" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small compact button" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
<span class="text">
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 98c5aa5738..0922bd7387 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -63,7 +63,7 @@
<!-- If home page, show new PR. If not, show breadcrumb -->
{{if eq $n 0}}
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
- <div class="fitted item">
+ <div class="fitted item mx-0">
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}">
<button id="new-pull-request" class="ui compact basic button">{{if .PullRequestCtx.Allowed}}{{.i18n.Tr "repo.pulls.compare_changes"}}{{else}}{{.i18n.Tr "action.compare_branch"}}{{end}}</button>
</a>
@@ -72,8 +72,8 @@
{{else}}
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
{{end}}
- <div class="right fitted item" id="file-buttons">
- <div class="ui tiny blue buttons">
+ <div class="right fitted item mr-0" id="file-buttons">
+ <div class="ui tiny primary buttons">
{{if .Repository.CanEnableEditor}}
{{if .CanAddFile}}
<a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 49adcd08bf..95aea0c13b 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -28,16 +28,7 @@
<div class="ui divider"></div>
<div id="issue-filters" class="ui stackable grid">
<div class="six wide column">
- <div class="ui tiny basic status buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-opened"}}
- {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
- </a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-closed"}}
- {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
- </a>
- </div>
+ {{template "repo/issue/openclose" .}}
</div>
<div class="ten wide right aligned column">
<div class="ui secondary filter stackable menu labels">
@@ -122,16 +113,7 @@
</div>
<div id="issue-actions" class="ui stackable grid hide">
<div class="six wide column">
- <div class="ui tiny basic status buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-opened"}}
- {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
- </a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-closed"}}
- {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
- </a>
- </div>
+ {{template "repo/issue/openclose" .}}
</div>
{{/* Ten wide does not cope well and makes the columns stack.
This seems to be related to jQuery's hide/show: in fact, switching
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl
index 5794ac422f..a78b20893f 100644
--- a/templates/repo/issue/milestone_issues.tmpl
+++ b/templates/repo/issue/milestone_issues.tmpl
@@ -40,16 +40,7 @@
<div class="ui divider"></div>
<div id="issue-filters" class="ui stackable grid">
<div class="six wide column">
- <div class="ui tiny basic status buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-opened"}}
- {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
- </a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-closed"}}
- {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
- </a>
- </div>
+ {{template "repo/issue/openclose" .}}
</div>
<div class="ten wide right aligned column">
<div class="ui secondary filter stackable menu labels">
@@ -118,16 +109,7 @@
</div>
<div id="issue-actions" class="ui stackable grid hide">
<div class="six wide column">
- <div class="ui tiny basic status buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-opened"}}
- {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
- </a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&assignee={{.AssigneeID}}">
- {{svg "octicon-issue-closed"}}
- {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
- </a>
- </div>
+ {{template "repo/issue/openclose" .}}
</div>
{{/* Ten wide does not cope well and makes the columns stack.
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index ca49664392..22daf66b37 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -12,13 +12,13 @@
</div>
<div class="ui divider"></div>
{{template "base/alert" .}}
- <div class="ui tiny basic buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/milestones?state=open">
- {{svg "octicon-milestone"}}
+ <div class="ui compact tiny menu">
+ <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open">
+ {{svg "octicon-milestone" 16 "mr-3"}}
{{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
</a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/milestones?state=closed">
- {{svg "octicon-milestone"}}
+ <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=closed">
+ {{svg "octicon-milestone" 16 "mr-3"}}
{{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
</a>
</div>
diff --git a/templates/repo/issue/openclose.tmpl b/templates/repo/issue/openclose.tmpl
new file mode 100644
index 0000000000..050660522a
--- /dev/null
+++ b/templates/repo/issue/openclose.tmpl
@@ -0,0 +1,10 @@
+<div class="ui compact tiny menu">
+ <a class="{{if not .IsShowClosed}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
+ {{svg "octicon-issue-opened" 16 "mr-3"}}
+ {{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
+ </a>
+ <a class="{{if .IsShowClosed}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
+ {{svg "octicon-issue-closed" 16 "mr-3"}}
+ {{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
+ </a>
+</div>
diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl
index c7ee628316..838bbdf1c1 100644
--- a/templates/repo/projects/list.tmpl
+++ b/templates/repo/projects/list.tmpl
@@ -12,12 +12,12 @@
</div>
<div class="ui divider"></div>
{{template "base/alert" .}}
- <div class="ui tiny basic buttons">
- <a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/projects?state=open">
+ <div class="ui compact tiny menu">
+ <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=open">
{{svg "octicon-project"}}
{{.i18n.Tr "repo.issues.open_tab" .OpenCount}}
</a>
- <a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/projects?state=closed">
+ <a class="item{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/projects?state=closed">
{{svg "octicon-check"}}
{{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
</a>
diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl
index 1944bd12e2..1aba5de731 100644
--- a/templates/repo/settings/navbar.tmpl
+++ b/templates/repo/settings/navbar.tmpl
@@ -1,4 +1,4 @@
-<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
+<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar shadow-body">
<div class="new-menu-inner">
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
{{.i18n.Tr "repo.settings.options"}}