From a2acb92553f35cb98fd38b6ea21808aa13f3ec35 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 15 Mar 2024 23:44:24 +0100 Subject: [PATCH 01/10] Add borderRadius config to tailwind and migrate a few classes --- tailwind.config.js | 12 ++++++++++++ templates/org/header.tmpl | 2 +- templates/repo/issue/filter_list.tmpl | 4 ++-- templates/repo/issue/labels/label_list.tmpl | 2 +- templates/repo/pulls/tab_menu.tmpl | 2 +- templates/user/dashboard/navbar.tmpl | 2 +- web_src/css/helpers.css | 16 ---------------- web_src/js/components/DashboardRepoList.vue | 4 ++-- web_src/js/components/RepoCodeFrequency.vue | 2 +- web_src/js/components/RepoContributors.vue | 2 +- web_src/js/components/RepoRecentCommits.vue | 2 +- web_src/js/features/repo-diff-commit.js | 2 +- 12 files changed, 24 insertions(+), 28 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index d783268bd7a10..604dec228fce6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -55,5 +55,17 @@ export default { current: 'currentcolor', transparent: 'transparent', }, + borderRadius: { + 'none': '0', + 'sm': '2px', + 'DEFAULT': 'var(--border-radius)', // 4px + 'md': 'var(--border-radius-medium)', // 6px + 'lg': '8px', + 'xl': '12px', + '2xl': '16px', + '3xl': '24px', + 'circle': 'var(--border-radius-circle)', // 50% + 'full': '9999px', + }, }, }; diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 943557b1ca968..1a55101c2e92a 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -7,7 +7,7 @@ {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} - + {{if .EnableFeed}} {{svg "octicon-rss" 24}} diff --git a/templates/repo/issue/filter_list.tmpl b/templates/repo/issue/filter_list.tmpl index d0086fdf8c2b6..bb13f63b9889b 100644 --- a/templates/repo/issue/filter_list.tmpl +++ b/templates/repo/issue/filter_list.tmpl @@ -43,7 +43,7 @@ {{end}} {{end}} {{RenderLabel $.Context ctx.Locale .}} -

{{template "repo/issue/labels/label_archived" .}}

+

{{template "repo/issue/labels/label_archived" .}}

{{end}} @@ -108,7 +108,7 @@ {{range .OpenProjects}} - {{svg .IconName 18 "gt-mr-3 gt-shrink-0"}}{{.Title}} + {{svg .IconName 18 "gt-mr-3 tw-shrink-0"}}{{.Title}} {{end}} {{end}} diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl index 428a4919aa1fe..ca8d40f1e0c1f 100644 --- a/templates/repo/issue/labels/label_list.tmpl +++ b/templates/repo/issue/labels/label_list.tmpl @@ -44,7 +44,7 @@
{{template "repo/issue/labels/label_archived" .}} -
+
{{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} {{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}} {{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}} diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl index 10bdfdb3de391..340b1bb397def 100644 --- a/templates/repo/pulls/tab_menu.tmpl +++ b/templates/repo/pulls/tab_menu.tmpl @@ -15,7 +15,7 @@ {{ctx.Locale.Tr "repo.pulls.tab_files"}} {{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}} - + {{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}} {{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl index af07897e2c8f0..3e9442d6fc92c 100644 --- a/templates/user/dashboard/navbar.tmpl +++ b/templates/user/dashboard/navbar.tmpl @@ -78,7 +78,7 @@ {{if .ContextUser.IsOrganization}}
-
+
-