From e1341b1d9c4831a1c35b0ced136978ba136b4a02 Mon Sep 17 00:00:00 2001 From: HesterG Date: Tue, 6 Jun 2023 17:19:51 +0800 Subject: [PATCH 1/6] add details --- templates/admin/navbar.tmpl | 12 ++++++------ templates/org/settings/navbar.tmpl | 6 +++--- templates/repo/settings/navbar.tmpl | 6 +++--- templates/user/settings/navbar.tmpl | 6 +++--- web_src/css/index.css | 1 + web_src/css/shared/settings.css | 15 +++++++++++++++ 6 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 web_src/css/shared/settings.css diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index 777fe29924395..1aab91626a885 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -35,14 +35,14 @@ {{end}} {{if .EnableActions}} -
- {{.locale.Tr "actions.actions"}} +
+ {{.locale.Tr "actions.actions"}} -
+ {{end}} {{.locale.Tr "admin.config"}} @@ -50,8 +50,8 @@ {{.locale.Tr "admin.notices"}} -
- {{.locale.Tr "admin.monitor"}} +
+ {{.locale.Tr "admin.monitor"}} -
+ diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl index fcce43f914a21..50c3aef6d7c3d 100644 --- a/templates/org/settings/navbar.tmpl +++ b/templates/org/settings/navbar.tmpl @@ -23,8 +23,8 @@ {{end}} {{if .EnableActions}} -
- {{.locale.Tr "actions.actions"}} +
+ {{.locale.Tr "actions.actions"}} -
+ {{end}} {{.locale.Tr "org.settings.delete"}} diff --git a/templates/repo/settings/navbar.tmpl b/templates/repo/settings/navbar.tmpl index b1beda7c944c1..4f5e43ee42534 100644 --- a/templates/repo/settings/navbar.tmpl +++ b/templates/repo/settings/navbar.tmpl @@ -34,8 +34,8 @@ {{end}} {{if and .EnableActions (not .UnitActionsGlobalDisabled) (.Permission.CanRead $.UnitTypeActions)}} -
- {{.locale.Tr "actions.actions"}} +
+ {{.locale.Tr "actions.actions"}} -
+ {{end}} diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl index 26f49820293b1..a3397052f9ed5 100644 --- a/templates/user/settings/navbar.tmpl +++ b/templates/user/settings/navbar.tmpl @@ -20,8 +20,8 @@ {{.locale.Tr "settings.ssh_gpg_keys"}} {{if .EnableActions}} -
- {{.locale.Tr "actions.actions"}} +
+ {{.locale.Tr "actions.actions"}} -
+ {{end}} {{if .EnablePackages}} diff --git a/web_src/css/index.css b/web_src/css/index.css index 90ee41f52462a..689c3f4a2970d 100644 --- a/web_src/css/index.css +++ b/web_src/css/index.css @@ -9,6 +9,7 @@ @import "./shared/issuelist.css"; @import "./shared/repoorg.css"; +@import "./shared/settings.css"; @import "./features/dropzone.css"; @import "./features/gitgraph.css"; diff --git a/web_src/css/shared/settings.css b/web_src/css/shared/settings.css new file mode 100644 index 0000000000000..21cef2e28da5a --- /dev/null +++ b/web_src/css/shared/settings.css @@ -0,0 +1,15 @@ +summary { + display: flex; + justify-content: space-between; + align-items: center; +} + +summary::after { + transition: 0.2s; + content: '\203A'; /* chevron right */ + font-size: 20px; +} + +details[open] summary::after { + transform: rotate(90deg); +} From 73a161c6582b1c297a81ef2d736022668c53ffba Mon Sep 17 00:00:00 2001 From: HesterG Date: Tue, 6 Jun 2023 18:08:52 +0800 Subject: [PATCH 2/6] update classes --- templates/admin/navbar.tmpl | 4 ++-- templates/org/settings/navbar.tmpl | 2 +- templates/repo/settings/navbar.tmpl | 2 +- templates/user/settings/navbar.tmpl | 2 +- web_src/css/shared/settings.css | 13 +++++++++---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index 1aab91626a885..641d3fad81f8f 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -35,7 +35,7 @@ {{end}} {{if .EnableActions}} -
+
{{.locale.Tr "actions.actions"}}