From bb50ab28613e9c39a57da98e873314e1739f4c14 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 4 Dec 2020 12:18:37 +0100 Subject: [PATCH] Style and template tweaks (#13828) * Style and template tweaks - Get red and green buttons on arc green closer to base theme - EasyMDE adjustments, toolbar and focus border - Fix header on 404 repo page - Tweaks to frontpage search, add 'Create Repo' button - Fix misaligned box headers - Fix pagination on arc-green - Fix background and footer on explore and repo search * better fix for header button alignment * add label hover for reactions --- templates/explore/code.tmpl | 10 +-- templates/repo/issue/new_form.tmpl | 2 +- .../repo/issue/view_content/add_reaction.tmpl | 2 +- .../repo/issue/view_content/context_menu.tmpl | 2 +- templates/repo/issue/view_title.tmpl | 2 +- templates/repo/search.tmpl | 10 +-- templates/repo/settings/lfs.tmpl | 6 +- templates/shared/searchbottom.tmpl | 12 +++ templates/status/404.tmpl | 2 +- templates/status/500.tmpl | 2 +- templates/user/dashboard/issues.tmpl | 2 +- templates/user/dashboard/repolist.tmpl | 60 ++++++++------ web_src/less/_base.less | 39 +++++++-- web_src/less/_chroma.less | 7 +- web_src/less/_dashboard.less | 3 +- web_src/less/_editor.less | 14 ++++ web_src/less/helpers.less | 3 + web_src/less/themes/theme-arc-green.less | 80 ++----------------- 18 files changed, 119 insertions(+), 139 deletions(-) create mode 100644 templates/shared/searchbottom.tmpl diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl index 9c880e59f2a..04956455765 100644 --- a/templates/explore/code.tmpl +++ b/templates/explore/code.tmpl @@ -49,15 +49,7 @@ -
- {{if $result.Language}} - {{$result.Language}} - {{end}} -   - {{if not $result.UpdatedUnix.IsZero}} - {{$.i18n.Tr "explore.code_last_indexed_at" (TimeSinceUnix $result.UpdatedUnix $.i18n.Lang) | Safe}}   - {{end}} -
+ {{template "shared/searchbottom" dict "root" $ "result" .}} {{end}} diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index aa142e3ded9..efebc3bf36c 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -13,7 +13,7 @@
- + {{if .PageIsComparePull}}
{{.i18n.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}}
{{end}} diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl index 6d694219ca3..95778cc5b3d 100644 --- a/templates/repo/issue/view_content/add_reaction.tmpl +++ b/templates/repo/issue/view_content/add_reaction.tmpl @@ -1,5 +1,5 @@ {{if .ctx.IsSigned}} - diff --git a/templates/repo/settings/lfs.tmpl b/templates/repo/settings/lfs.tmpl index b6a0581583c..79477051b30 100644 --- a/templates/repo/settings/lfs.tmpl +++ b/templates/repo/settings/lfs.tmpl @@ -7,8 +7,8 @@

{{.i18n.Tr "repo.settings.lfs_filelist"}} ({{.i18n.Tr "admin.total" .Total}})

@@ -25,7 +25,7 @@
{{FileSize .Size}} {{TimeSince .CreatedUnix.AsTime $.Lang}} - {{$.i18n.Tr "repo.settings.lfs_findcommits"}} + {{$.i18n.Tr "repo.settings.lfs_findcommits"}} diff --git a/templates/shared/searchbottom.tmpl b/templates/shared/searchbottom.tmpl new file mode 100644 index 00000000000..5680c8d2a9c --- /dev/null +++ b/templates/shared/searchbottom.tmpl @@ -0,0 +1,12 @@ +
+
+ {{if .result.Language}} + {{.result.Language}} + {{end}} +
+
+ {{if not .result.UpdatedUnix.IsZero}} + {{.root.i18n.Tr "explore.code_last_indexed_at" (TimeSinceUnix .result.UpdatedUnix .root.i18n.Lang) | Safe}} + {{end}} +
+
diff --git a/templates/status/404.tmpl b/templates/status/404.tmpl index c5f549bf540..6f572b43b3a 100644 --- a/templates/status/404.tmpl +++ b/templates/status/404.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+
{{if .IsRepo}}{{template "repo/header" .}}{{end}}

404

diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index d20b06b1095..3f1b205d366 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -
+

500


diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index d4e7cb38b6a..b8625ec2c15 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -77,7 +77,7 @@
-
+
-

- {{.i18n.Tr "home.my_repos"}} ${reposTotalCount} +

+
+ {{.i18n.Tr "home.my_repos"}} + ${reposTotalCount} +
+ + {{svg "octicon-plus"}} + {{.i18n.Tr "new_repo"}} +