From 9da3d78e74d6c8f363799dc2157540ea005ea102 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 20 May 2022 00:08:08 +0200 Subject: [PATCH] Replace blue button and label classes with primary (#19763) * make blue really blue * replace blue button and label classes with primary * add --color-blue-dark * add light color variants, tweak a few colors * fix colors * add comment Co-authored-by: wxiaoguang --- templates/admin/auth/list.tmpl | 2 +- templates/admin/base/search.tmpl | 2 +- templates/admin/emails/list.tmpl | 2 +- templates/admin/org/list.tmpl | 2 +- templates/admin/packages/list.tmpl | 2 +- templates/admin/process.tmpl | 2 +- templates/admin/repo/list.tmpl | 2 +- templates/admin/repo/search.tmpl | 2 +- templates/admin/repo/unadopted.tmpl | 4 +- templates/admin/stacktrace.tmpl | 2 +- templates/admin/user/list.tmpl | 4 +- templates/base/head_navbar.tmpl | 2 +- templates/explore/code.tmpl | 2 +- templates/explore/repo_search.tmpl | 2 +- templates/explore/search.tmpl | 2 +- templates/org/home.tmpl | 2 +- templates/org/team/sidebar.tmpl | 2 +- templates/org/team/teams.tmpl | 2 +- templates/package/shared/list.tmpl | 2 +- templates/package/shared/versionlist.tmpl | 2 +- templates/repo/commit_page.tmpl | 10 ++-- templates/repo/diff/box.tmpl | 2 +- templates/repo/editor/cherry_pick.tmpl | 2 +- templates/repo/header.tmpl | 8 +-- templates/repo/home.tmpl | 2 +- .../issue/labels/label_load_template.tmpl | 2 +- templates/repo/issue/labels/label_new.tmpl | 4 +- templates/repo/issue/milestone_new.tmpl | 2 +- templates/repo/issue/milestones.tmpl | 2 +- templates/repo/issue/search.tmpl | 2 +- templates/repo/issue/view_content.tmpl | 4 +- .../repo/issue/view_content/reactions.tmpl | 2 +- templates/repo/issue/view_title.tmpl | 6 +- templates/repo/projects/new.tmpl | 2 +- templates/repo/pulls/tab_menu.tmpl | 6 +- templates/repo/settings/branches.tmpl | 2 +- templates/repo/settings/deploy_keys.tmpl | 4 +- templates/repo/settings/lfs_file.tmpl | 2 +- templates/repo/settings/lfs_file_find.tmpl | 4 +- templates/repo/settings/lfs_locks.tmpl | 4 +- templates/repo/settings/lfs_pointers.tmpl | 2 +- templates/repo/settings/options.tmpl | 4 +- templates/repo/settings/tags.tmpl | 4 +- .../repo/settings/webhook/base_list.tmpl | 2 +- templates/repo/settings/webhook/history.tmpl | 2 +- templates/user/auth/activate.tmpl | 2 +- templates/user/auth/forgot_passwd.tmpl | 2 +- templates/user/auth/reset_passwd.tmpl | 2 +- templates/user/dashboard/issues.tmpl | 16 ++--- templates/user/dashboard/milestones.tmpl | 4 +- templates/user/dashboard/navbar.tmpl | 2 +- templates/user/settings/account.tmpl | 8 +-- templates/user/settings/keys_gpg.tmpl | 4 +- templates/user/settings/keys_principal.tmpl | 4 +- templates/user/settings/keys_ssh.tmpl | 6 +- templates/user/settings/organization.tmpl | 4 +- templates/user/settings/security/twofa.tmpl | 2 +- web_src/js/features/comp/ReactionSelector.js | 2 +- web_src/js/features/repo-home.js | 2 - web_src/less/_base.less | 59 +++++++++++-------- web_src/less/_repository.less | 6 +- 61 files changed, 132 insertions(+), 123 deletions(-) diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index b4a703e41..f1b4da35e 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -6,7 +6,7 @@

{{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})

diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 98fd3f4a0..4ec62c162 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -18,6 +18,6 @@
- +
diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 277c777a8..92444efbd 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -25,7 +25,7 @@
- +
diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl index 0782ef64e..1cfd3e79e 100644 --- a/templates/admin/org/list.tmpl +++ b/templates/admin/org/list.tmpl @@ -6,7 +6,7 @@

{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})

diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index df89d8bed..6b19c09a1 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -24,7 +24,7 @@ - +
diff --git a/templates/admin/process.tmpl b/templates/admin/process.tmpl index c44300dbb..51bf1d48f 100644 --- a/templates/admin/process.tmpl +++ b/templates/admin/process.tmpl @@ -1,7 +1,7 @@

{{.i18n.Tr "admin.monitor.process"}}

diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index da05bfab9..96f04b8fe 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -6,7 +6,7 @@

{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})

diff --git a/templates/admin/repo/search.tmpl b/templates/admin/repo/search.tmpl index 8b1deb913..e51d50936 100644 --- a/templates/admin/repo/search.tmpl +++ b/templates/admin/repo/search.tmpl @@ -24,6 +24,6 @@
- +
diff --git a/templates/admin/repo/unadopted.tmpl b/templates/admin/repo/unadopted.tmpl index 345f59401..cd04891d7 100644 --- a/templates/admin/repo/unadopted.tmpl +++ b/templates/admin/repo/unadopted.tmpl @@ -6,7 +6,7 @@

{{.i18n.Tr "admin.repos.unadopted"}}

@@ -14,7 +14,7 @@
- +
diff --git a/templates/admin/stacktrace.tmpl b/templates/admin/stacktrace.tmpl index 68dfbe066..5c3993e23 100644 --- a/templates/admin/stacktrace.tmpl +++ b/templates/admin/stacktrace.tmpl @@ -6,7 +6,7 @@

{{.i18n.Tr "admin.monitor.stacktrace"}}: {{.i18n.Tr "admin.monitor.goroutines" .GoroutineCount}}

diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 755e4436f..963a440e2 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -6,7 +6,7 @@

{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})

@@ -56,7 +56,7 @@
- +
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 5ce1d0b88..babf244f9 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -77,7 +77,7 @@ {{svg "octicon-issue-opened"}} {{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}} - + {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}} diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl index e1056ab31..2801cdfaf 100644 --- a/templates/explore/code.tmpl +++ b/templates/explore/code.tmpl @@ -14,7 +14,7 @@
{{.i18n.Tr "explore.search.match"}}
- +
diff --git a/templates/explore/repo_search.tmpl b/templates/explore/repo_search.tmpl index bc4572dfc..3d45305df 100644 --- a/templates/explore/repo_search.tmpl +++ b/templates/explore/repo_search.tmpl @@ -27,7 +27,7 @@
- +
diff --git a/templates/explore/search.tmpl b/templates/explore/search.tmpl index 245cc9f34..2c1687f60 100644 --- a/templates/explore/search.tmpl +++ b/templates/explore/search.tmpl @@ -19,7 +19,7 @@
- +
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 1fe0b035e..a49029d4d 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -78,7 +78,7 @@ {{if .IsOrganizationOwner}} {{end}} {{end}} diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 8adee3cc7..d597d1349 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -12,7 +12,7 @@
{{$.CsrfTokenHtml}} - +
{{end}} diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 9165a62bc..49407ef19 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -25,7 +25,7 @@ {{else if $.IsOrganizationOwner}}
{{$.CsrfTokenHtml}} - +
{{end}} diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 9e6bf5ce9..ce2b57e4a 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -17,7 +17,7 @@ - +
diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index e2aa19cc8..59f7cd164 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -10,7 +10,7 @@ {{end}} - +
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 70cc7d02e..1e6296836 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -22,11 +22,11 @@

{{RenderCommitMessage $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}

{{if not $.PageIsWiki}}
- + {{.i18n.Tr "repo.diff.browse_source"}} {{if and ($.Permission.CanWrite $.UnitTypeCode) (not $.Repository.IsArchived) (not .IsDeleted)}}{{- /* */ -}} - diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index bfac8c52e..02c7dcd68 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -186,7 +186,7 @@ {{$.i18n.Tr "loading"}}
-
{{.i18n.Tr "repo.issues.cancel"}}
+
{{.i18n.Tr "repo.issues.cancel"}}
{{.i18n.Tr "repo.issues.save"}}
diff --git a/templates/repo/editor/cherry_pick.tmpl b/templates/repo/editor/cherry_pick.tmpl index 9cdda2ea8..15f518f90 100644 --- a/templates/repo/editor/cherry_pick.tmpl +++ b/templates/repo/editor/cherry_pick.tmpl @@ -12,7 +12,7 @@
diff --git a/templates/repo/issue/labels/label_new.tmpl b/templates/repo/issue/labels/label_new.tmpl index 15a6c029a..a7c30bd22 100644 --- a/templates/repo/issue/labels/label_new.tmpl +++ b/templates/repo/issue/labels/label_new.tmpl @@ -19,8 +19,8 @@ {{template "repo/issue/label_precolors"}}
-
{{.i18n.Tr "repo.milestones.cancel"}}
- +
{{.i18n.Tr "repo.milestones.cancel"}}
+
diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl index 94d31d627..178b2c9db 100644 --- a/templates/repo/issue/milestone_new.tmpl +++ b/templates/repo/issue/milestone_new.tmpl @@ -44,7 +44,7 @@
{{if .PageIsEditMilestone}} - + {{.i18n.Tr "repo.milestones.cancel"}} +
diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl index f7ca49e66..8fd31a231 100644 --- a/templates/repo/issue/search.tmpl +++ b/templates/repo/issue/search.tmpl @@ -6,6 +6,6 @@ - + diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 91af5160b..8d4fc4f8b 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -215,8 +215,8 @@ {{end}} diff --git a/templates/repo/issue/view_content/reactions.tmpl b/templates/repo/issue/view_content/reactions.tmpl index 4978edf3f..4e0efca87 100644 --- a/templates/repo/issue/view_content/reactions.tmpl +++ b/templates/repo/issue/view_content/reactions.tmpl @@ -1,5 +1,5 @@ {{range $key, $value := .Reactions}} - + {{ReactionToEmoji $key}} {{len $value}} diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 707b8252f..22ad58876 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -2,7 +2,7 @@
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
-
{{.i18n.Tr "repo.issues.edit"}}
+
{{.i18n.Tr "repo.issues.edit"}}
{{end}}

@@ -14,8 +14,8 @@

{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
- - + +
{{end}}
diff --git a/templates/repo/projects/new.tmpl b/templates/repo/projects/new.tmpl index e015f7d7a..e801959aa 100644 --- a/templates/repo/projects/new.tmpl +++ b/templates/repo/projects/new.tmpl @@ -50,7 +50,7 @@
diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl index 5671eca36..dbc115ec4 100644 --- a/templates/repo/settings/branches.tmpl +++ b/templates/repo/settings/branches.tmpl @@ -66,7 +66,7 @@ {{range .ProtectedBranches}} -
{{.BranchName}}
+
{{.BranchName}}
{{$.i18n.Tr "repo.settings.edit_protected_branch"}} {{else}} diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 019a62b5f..6b9e129d9 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -8,9 +8,9 @@ {{.i18n.Tr "repo.settings.deploy_keys"}}
{{if not .DisableSSH}} -
{{.i18n.Tr "repo.settings.add_deploy_key"}}
+
{{.i18n.Tr "repo.settings.add_deploy_key"}}
{{else}} -
{{.i18n.Tr "settings.ssh_disabled"}}
+
{{.i18n.Tr "settings.ssh_disabled"}}
{{end}}
diff --git a/templates/repo/settings/lfs_file.tmpl b/templates/repo/settings/lfs_file.tmpl index a4d6b21f1..0c8eff122 100644 --- a/templates/repo/settings/lfs_file.tmpl +++ b/templates/repo/settings/lfs_file.tmpl @@ -12,7 +12,7 @@ {{.i18n.Tr "repo.escape_control_characters"}} {{end}} - {{$.i18n.Tr "repo.settings.lfs_findcommits"}} + {{$.i18n.Tr "repo.settings.lfs_findcommits"}}
diff --git a/templates/repo/settings/lfs_file_find.tmpl b/templates/repo/settings/lfs_file_find.tmpl index 60caf46fe..77e49989d 100644 --- a/templates/repo/settings/lfs_file_find.tmpl +++ b/templates/repo/settings/lfs_file_find.tmpl @@ -30,12 +30,12 @@ {{if .ParentHashes}} {{$.i18n.Tr "repo.diff.parent"}} {{range .ParentHashes}} - {{ShortSha .String}} + {{ShortSha .String}} {{end}} {{end}}
{{$.i18n.Tr "repo.diff.commit"}} - {{ShortSha .SHA}} + {{ShortSha .SHA}} {{TimeSince .When $.i18n.Lang}} diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl index d30575a05..507938145 100644 --- a/templates/repo/settings/lfs_locks.tmpl +++ b/templates/repo/settings/lfs_locks.tmpl @@ -13,7 +13,7 @@ {{$.CsrfTokenHtml}}
- +
@@ -43,7 +43,7 @@
{{$.CsrfTokenHtml}} - +
diff --git a/templates/repo/settings/lfs_pointers.tmpl b/templates/repo/settings/lfs_pointers.tmpl index 440e54423..159ee94f9 100644 --- a/templates/repo/settings/lfs_pointers.tmpl +++ b/templates/repo/settings/lfs_pointers.tmpl @@ -56,7 +56,7 @@ - {{$.i18n.Tr "repo.settings.lfs_findcommits"}} + {{$.i18n.Tr "repo.settings.lfs_findcommits"}} {{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} {{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 77897f25c..e2d6c5e1d 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -98,7 +98,7 @@
{{.CsrfTokenHtml}} - +
@@ -183,7 +183,7 @@ {{$.CsrfTokenHtml}} - + diff --git a/templates/repo/settings/tags.tmpl b/templates/repo/settings/tags.tmpl index 48c42bdf2..8e67285dd 100644 --- a/templates/repo/settings/tags.tmpl +++ b/templates/repo/settings/tags.tmpl @@ -65,7 +65,7 @@ - + {{$.i18n.Tr "cancel"}} {{else}} @@ -110,7 +110,7 @@ {{end}} - {{$.i18n.Tr "edit"}} + {{$.i18n.Tr "edit"}}
{{$.CsrfTokenHtml}} diff --git a/templates/repo/settings/webhook/base_list.tmpl b/templates/repo/settings/webhook/base_list.tmpl index b1a3771bd..e2416607c 100644 --- a/templates/repo/settings/webhook/base_list.tmpl +++ b/templates/repo/settings/webhook/base_list.tmpl @@ -2,7 +2,7 @@ {{.Title}}