From 8a8b7536475bea0146298177affb74dddd8c6f6a Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 14 May 2023 04:38:22 +0800 Subject: [PATCH] Improve button-ghost, remove tertiary button (#24692) image image image And a page to test buttons:
image
--------- Co-authored-by: Giteabot Co-authored-by: silverwind --- templates/devtest/gitea-ui.tmpl | 33 +++++++++++++++++++ templates/repo/branch/list.tmpl | 20 +++++------ templates/repo/home.tmpl | 2 +- .../applications_oauth2_edit_form.tmpl | 2 +- web_src/css/base.css | 20 +++-------- web_src/css/user.css | 4 --- 6 files changed, 50 insertions(+), 31 deletions(-) diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl index 2fe478a07d8..c00d12217db 100644 --- a/templates/devtest/gitea-ui.tmpl +++ b/templates/devtest/gitea-ui.tmpl @@ -1,5 +1,38 @@ {{template "base/head" .}}
+
+

Button

+
+ Style: + + + + +
+
+ State: + +
+
+
+ + + + + +
+
This is a button
+
+ +

Tooltip

diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 199d4489a9e..93882589210 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -27,7 +27,7 @@ {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} - {{else}} - {{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index e7a76cdaf56..7c084b06867 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -30,7 +30,7 @@
{{range .Topics}}{{.Name}}{{end}} - {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{end}}
{{end}} {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} diff --git a/templates/user/settings/applications_oauth2_edit_form.tmpl b/templates/user/settings/applications_oauth2_edit_form.tmpl index 1a8336b1506..8a9579c5c51 100644 --- a/templates/user/settings/applications_oauth2_edit_form.tmpl +++ b/templates/user/settings/applications_oauth2_edit_form.tmpl @@ -27,7 +27,7 @@
{{.CsrfTokenHtml}} {{.locale.Tr "settings.oauth2_regenerate_secret_hint"}} - +
diff --git a/web_src/css/base.css b/web_src/css/base.css index 6c1bbb00c46..4c8d30c1b4b 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -2180,13 +2180,16 @@ a.ui.active.label:hover { border-left: none; } -.ui.button.button-ghost { +/* a ghost button can be used as inline text, it doesn't have obvious styles */ +.button.button-ghost { background: transparent; border: none; color: inherit; + margin: 0; + padding: 0; } -.ui.button.button-ghost:hover { +.button.button-ghost:hover { color: var(--color-primary); } @@ -2283,19 +2286,6 @@ a.ui.active.label:hover { border-color: var(--color-secondary-dark-3) !important; } -.ui.tertiary.button { - color: var(--color-text-light); - border: none; -} - -.ui.tertiary.button:hover { - color: var(--color-text); -} - -.ui.tertiary.button:focus { - color: var(--color-text-dark); -} - .ui.primary.label, .ui.primary.labels .label, .ui.ui.ui.primary.label { diff --git a/web_src/css/user.css b/web_src/css/user.css index 648480d71d0..a7106599dfe 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -121,10 +121,6 @@ object-fit: contain; } -.user.notification table button { - padding: 3px 3px 3px 5px; -} - #notification_div .tab.segment { overflow-x: auto; }