From f1a4330306a21a1b53aaa744ec5749a52135c807 Mon Sep 17 00:00:00 2001 From: Hester Gong Date: Wed, 26 Apr 2023 23:59:08 +0800 Subject: [PATCH] Modify width of ui container, fine tune css for settings pages and org header (#24315) Close #24302 Part of #24229, Follows #24246 This PR focused on CSS style fine-tune, main changes: 1. Give `.ui.ui.ui.container` a width of `1280px` with a max-width of `calc(100vw - 64px)`, so the main contents looks better on large devices. 2. Share styles for table elements in all levels settings pages to fix overflow of runners table on mobile and for consistency (The headers on mobile can be further improved, but haven't found a proper way yet). 3. Use [stackable grid](https://fomantic-ui.com/collections/grid.html#stackable) and [device column width](https://fomantic-ui.com/examples/responsive.html) for responsiveness for some pages (repo/org collaborators settings pages, org teams related page) 4. Fixed #24302 by sharing label related CSS in reporg.css 5. Fine tune repo tags settings page --------- Co-authored-by: wxiaoguang --- templates/admin/dashboard.tmpl | 24 ++--- templates/admin/notice.tmpl | 105 +++++++++----------- templates/org/settings/runners.tmpl | 6 +- templates/org/team/members.tmpl | 2 +- templates/org/team/repositories.tmpl | 2 +- templates/org/team/teams.tmpl | 2 +- templates/repo/actions/list.tmpl | 2 +- templates/repo/issue/labels/label_list.tmpl | 4 +- templates/repo/settings/collaboration.tmpl | 4 +- templates/repo/settings/deploy_keys.tmpl | 2 +- templates/repo/settings/tags.tmpl | 2 +- templates/user/settings/applications.tmpl | 2 +- templates/user/settings/keys_principal.tmpl | 2 +- templates/user/settings/keys_ssh.tmpl | 2 +- templates/user/settings/repos.tmpl | 2 +- web_src/css/admin.css | 50 +--------- web_src/css/base.css | 17 +++- web_src/css/helpers.css | 18 ++++ web_src/css/organization.css | 11 +- web_src/css/shared/repoorg.css | 6 ++ 20 files changed, 122 insertions(+), 143 deletions(-) diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 93fcae4ca4d4..0aa95c0e73c5 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -19,55 +19,55 @@
{{.CsrfTokenHtml}}
- +
- + - + - + - + {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} - + - + {{end}} - + - + - + - + - +
{{.locale.Tr "admin.dashboard.delete_inactive_accounts"}}
{{.locale.Tr "admin.dashboard.delete_repo_archives"}}
{{.locale.Tr "admin.dashboard.delete_missing_repos"}}
{{.locale.Tr "admin.dashboard.git_gc_repos"}}
{{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}
{{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}
{{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}
{{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}
{{.locale.Tr "admin.dashboard.resync_all_hooks"}}
{{.locale.Tr "admin.dashboard.reinit_missing_repos"}}
{{.locale.Tr "admin.dashboard.sync_external_users"}}
{{.locale.Tr "admin.dashboard.repo_health_check"}}
{{.locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}
diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl index bd6b74dd2bdf..3dbae0462575 100644 --- a/templates/admin/notice.tmpl +++ b/templates/admin/notice.tmpl @@ -3,67 +3,60 @@

{{.locale.Tr "admin.notices.system_notice_list"}} ({{.locale.Tr "admin.total" .Total}})

-
- - +
+ + + + + + + + + + + + {{range .Notices}} - - - - - - + + + + + + - - - {{range .Notices}} + {{end}} + + {{if .Notices}} + - - - - - - - - {{end}} - - {{if .Notices}} - - - - + - - - {{end}} -
ID{{.locale.Tr "admin.notices.type"}}{{.locale.Tr "admin.notices.desc"}}{{.locale.Tr "admin.users.created"}}{{.locale.Tr "admin.notices.op"}}
ID{{.locale.Tr "admin.notices.type"}}{{.locale.Tr "admin.notices.desc"}}{{.locale.Tr "admin.users.created"}}{{.locale.Tr "admin.notices.op"}}
{{.ID}}{{$.locale.Tr .TrStr}}{{.Description}}{{DateTime "short" .CreatedUnix}}{{svg "octicon-note" 16}}
-
- -
-
{{.ID}}{{$.locale.Tr .TrStr}}{{.Description}}{{DateTime "short" .CreatedUnix}}{{svg "octicon-note" 16 "view-detail"}}
- - {{.CsrfTokenHtml}} - - - +
+ {{.CsrfTokenHtml}} + +
+
-
- +
+ + + + + {{end}} + {{template "base/paginate" .}} diff --git a/templates/org/settings/runners.tmpl b/templates/org/settings/runners.tmpl index 2350f68ba9e9..86cb1bcd787c 100644 --- a/templates/org/settings/runners.tmpl +++ b/templates/org/settings/runners.tmpl @@ -1,5 +1,5 @@ {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings runners")}} -
- {{template "shared/actions/runner_list" .}} -
+
+ {{template "shared/actions/runner_list" .}} +
{{template "org/settings/layout_footer" .}} diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 5f520f24a115..b31f2a96c583 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -3,7 +3,7 @@ {{template "org/header" .}}
{{template "base/alert" .}} -
+
{{template "org/team/sidebar" .}}
{{template "org/team/navbar" .}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 86b4a212d1f3..c73f40f0541e 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -3,7 +3,7 @@ {{template "org/header" .}}
{{template "base/alert" .}} -
+
{{template "org/team/sidebar" .}}
{{template "org/team/navbar" .}} diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 9148a45e5a55..dcf937f3f073 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -10,7 +10,7 @@
{{end}} -
+
{{range .Teams}}
diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl index 15f0d607a3c2..0f446302011b 100644 --- a/templates/repo/actions/list.tmpl +++ b/templates/repo/actions/list.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}
-
+