From e00a3554279d314a4dab4ce11bdd86707201d0d2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 29 Nov 2020 07:22:04 +0100 Subject: [PATCH] Dropdowns, Labels fixes and more CSS tweaks (#13733) * Dropdowns and Labels fixes - Rework dropdown, menu and label styles - Improve issue sidebar milestone and label sections - Fix archived repo and private org badge - Move more colors to CSS vars - Move issue number to end of title on issue page * more dropdown fixes * fix basic blue labels - fixes #13731 * improve class setting on svg Co-authored-by: zeripath Co-authored-by: techknowlogick --- templates/explore/repo_list.tmpl | 4 +- templates/org/home.tmpl | 6 +- templates/repo/header.tmpl | 4 +- templates/repo/home.tmpl | 8 +- templates/repo/issue/milestone_issues.tmpl | 4 +- templates/repo/issue/new_form.tmpl | 126 +++++---- .../repo/issue/view_content/sidebar.tmpl | 46 ++-- templates/repo/issue/view_title.tmpl | 71 ++--- templates/repo/release/new.tmpl | 18 +- templates/repo/sub_menu.tmpl | 2 +- web_src/js/index.js | 31 ++- web_src/js/svg.js | 25 +- web_src/less/_base.less | 189 +++++++++++++- web_src/less/_organization.less | 41 --- web_src/less/_repository.less | 107 +++----- web_src/less/helpers.less | 1 + web_src/less/themes/theme-arc-green.less | 245 +----------------- 17 files changed, 412 insertions(+), 516 deletions(-) diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 9e4e438a8..6899971a0 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -8,7 +8,9 @@ {{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} - {{if .IsArchived}}{{$.i18n.Tr "repo.desc.archived"}}{{end}} + {{if .IsArchived}} + {{$.i18n.Tr "repo.desc.archived"}} + {{end}} {{if .IsTemplate}} {{if .IsPrivate}} {{$.i18n.Tr "repo.desc.private_template"}} diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 7f72c61e9..12630b70d 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{/* overflow: auto is the clearfix - this avoids the image going beyond the container where it is supposed to stay inside. */}}
@@ -8,8 +8,8 @@
{{.Org.DisplayName}} - {{if .Org.Visibility.IsLimited}}
{{.i18n.Tr "org.settings.visibility.limited_shortname"}}
{{end}} - {{if .Org.Visibility.IsPrivate}}
{{.i18n.Tr "org.settings.visibility.private_shortname"}}
{{end}} + {{if .Org.Visibility.IsLimited}}
{{.i18n.Tr "org.settings.visibility.limited_shortname"}}
{{end}} + {{if .Org.Visibility.IsPrivate}}
{{.i18n.Tr "org.settings.visibility.private_shortname"}}
{{end}}
{{if .IsOrganizationOwner}}{{svg "octicon-gear"}}{{end}}
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 77f2362f8..51f49b599 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -28,7 +28,9 @@ {{end}} {{end}} {{end}} - {{if .IsArchived}}{{$.i18n.Tr "repo.desc.archived"}}{{end}} + {{if .IsArchived}} + {{$.i18n.Tr "repo.desc.archived"}} + {{end}} {{if .IsMirror}}{{end}} {{if .IsFork}}
{{$.i18n.Tr "repo.forked_from"}} {{SubStr .BaseRepo.RelLink 1 -1}}
{{end}} {{if .IsGenerated}}
{{$.i18n.Tr "repo.generated_from"}} {{SubStr .TemplateRepo.RelLink 1 -1}}
{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 73508bdd2..98c5aa573 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -23,12 +23,12 @@
{{end}}
-
- {{range .Topics}}{{.Name}}{{end}} - {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{.i18n.Tr "repo.topic.manage_topics"}}{{end}} +
+ {{range .Topics}}{{.Name}}{{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{.i18n.Tr "repo.topic.manage_topics"}}{{end}}
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}} -