From 9ac34c0786ad25aefaae1c60277857b581f34ff3 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 8 Jul 2023 12:13:02 +0800 Subject: [PATCH] fix --- templates/projects/list.tmpl | 2 +- templates/repo/clone_buttons.tmpl | 2 +- templates/repo/commit_page.tmpl | 2 +- templates/repo/header.tmpl | 2 +- templates/repo/migrate/migrate.tmpl | 4 ++-- templates/repo/unicode_escape_prompt.tmpl | 4 ++-- templates/user/auth/captcha.tmpl | 2 +- web_src/css/helpers.css | 9 ++++----- web_src/css/repo.css | 3 ++- web_src/js/features/common-global.js | 2 +- web_src/js/features/repo-issue-content.js | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index 79e18678d4df3..fc8bf60811003 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -1,5 +1,5 @@ {{if .CanWriteProjects}} -
+
diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl index e451c0afd67c1..8f5b63128a218 100644 --- a/templates/repo/clone_buttons.tmpl +++ b/templates/repo/clone_buttons.tmpl @@ -9,7 +9,7 @@ SSH {{end}} - + diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 8f8e9fa0e81b8..e4aad30fa7cf1 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -189,7 +189,7 @@
{{if .Commit.Signature}} -
+
{{if .Verification.Verified}} {{if ne .Verification.SigningUser.ID 0}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index aeb1e6a90e62a..b119c31948916 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -121,7 +121,7 @@
{{$.locale.Tr "repo.already_forked" .Name}}
-
+
{{range $.UserAndOrgForks}}
diff --git a/templates/repo/migrate/migrate.tmpl b/templates/repo/migrate/migrate.tmpl index 0e15da84255ba..eb177946473ad 100644 --- a/templates/repo/migrate/migrate.tmpl +++ b/templates/repo/migrate/migrate.tmpl @@ -16,10 +16,10 @@ {{svg (printf "gitea-%s" .Name) 184}} {{end}}
-
+
{{.Title}}
-
+
{{(printf "repo.migrate.%s.description" .Name) | $.locale.Tr}}
diff --git a/templates/repo/unicode_escape_prompt.tmpl b/templates/repo/unicode_escape_prompt.tmpl index 12eff6aebe3af..961e2370a782f 100644 --- a/templates/repo/unicode_escape_prompt.tmpl +++ b/templates/repo/unicode_escape_prompt.tmpl @@ -1,6 +1,6 @@ {{if .EscapeStatus}} {{if .EscapeStatus.HasInvisible}} -
+
{{$.root.locale.Tr "repo.invisible_runes_header"}} @@ -11,7 +11,7 @@ {{end}}
{{else if .EscapeStatus.HasAmbiguous}} -
+
{{$.root.locale.Tr "repo.ambiguous_runes_header"}} diff --git a/templates/user/auth/captcha.tmpl b/templates/user/auth/captcha.tmpl index 62a3779e55285..a71d3bc53888b 100644 --- a/templates/user/auth/captcha.tmpl +++ b/templates/user/auth/captcha.tmpl @@ -22,7 +22,7 @@
{{else if eq .CaptchaType "cfturnstile"}} -
+
{{end}}{{end}} diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index a24d35e97938d..73f2ebe79bd44 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -8,10 +8,6 @@ Gitea's private styles use `g-` prefix. .gt-dif { display: inline-flex !important; } .gt-dib { display: inline-block !important; } .gt-ac { align-items: center !important; } -.gt-ab { align-items: baseline !important; } -.gt-tc { text-align: center !important; } -.gt-tl { text-align: left !important; } -.gt-tr { text-align: right !important; } /* TODO: rename these to "gt-text-right", etc. there are only a few */ .gt-jc { justify-content: center !important; } .gt-js { justify-content: flex-start !important; } .gt-je { justify-content: flex-end !important; } @@ -22,7 +18,6 @@ Gitea's private styles use `g-` prefix. .gt-vm { vertical-align: middle !important; } .gt-w-100 { width: 100% !important; } .gt-h-100 { height: 100% !important; } -.gt-br-0 { border-radius: 0 !important; } .gt-mono { font-family: var(--fonts-monospace) !important; @@ -90,6 +85,10 @@ Gitea's private styles use `g-` prefix. .gt-float-right { float: right !important; } .gt-clear-both { clear: both !important; } +.gt-text-center { text-align: center !important; } +.gt-text-left { text-align: left !important; } +.gt-text-right { text-align: right !important; } + .gt-font-light { font-weight: var(--font-weight-light) !important; } .gt-font-normal { font-weight: var(--font-weight-normal) !important; } .gt-font-medium { font-weight: var(--font-weight-medium) !important; } diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 55d10098e9a1e..3862436701957 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -190,6 +190,7 @@ .repository #clone-panel #repo-clone-url { width: 320px; + border-radius: 0; } @media (min-width: 768px) and (max-width: 991.98px) { @@ -2655,7 +2656,7 @@ height: 30px; } -.repo-button-row .button.dropdown { +.repo-button-row .button.dropdown:not(.icon) { padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */ } diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index a99b29141d3f8..8ee5ce25bfc9e 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -237,7 +237,7 @@ export function initGlobalDropzone() { // Create a "Copy Link" element, to conveniently copy the image // or file link as Markdown to the clipboard const copyLinkElement = document.createElement('div'); - copyLinkElement.className = 'gt-tc'; + copyLinkElement.className = 'gt-text-center'; // The a element has a hardcoded cursor: pointer because the default is overridden by .dropzone copyLinkElement.innerHTML = `${svg('octicon-copy', 14, 'copy link')} Copy link`; copyLinkElement.addEventListener('click', (e) => { diff --git a/web_src/js/features/repo-issue-content.js b/web_src/js/features/repo-issue-content.js index fc916aea1920a..3ada166c5b009 100644 --- a/web_src/js/features/repo-issue-content.js +++ b/web_src/js/features/repo-issue-content.js @@ -24,7 +24,7 @@ function showContentHistoryDetail(issueBaseUrl, commentId, historyId, itemTitleH
-
+
`); $dialog.appendTo($('body')); $dialog.find('.dialog-header-options').dropdown({