summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-04-13 22:00:32 +0200
committerGitHub <noreply@github.com>2020-04-13 17:00:32 -0300
commit063b1d260fa5559fac0b77c215e8b06a9c083cec (patch)
treeb0e7740b68d5b836960d620c40e27de8eebce48a
parentad5c43ae5d90dc92a5ce173894c72b5f6c248bc0 (diff)
downloadgitea-063b1d260fa5559fac0b77c215e8b06a9c083cec.tar.gz
gitea-063b1d260fa5559fac0b77c215e8b06a9c083cec.zip
Fix language label vertical alignment (#11061)
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
-rw-r--r--templates/explore/code.tmpl2
-rw-r--r--templates/repo/search.tmpl2
-rw-r--r--web_src/less/_base.less9
3 files changed, 11 insertions, 2 deletions
diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl
index 418d669fe9..43b44af4bf 100644
--- a/templates/explore/code.tmpl
+++ b/templates/explore/code.tmpl
@@ -18,7 +18,7 @@
</h3>
<div>
{{range $term := .SearchResultLanguages}}
- <a class="ui {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{AppSubUrl}}/explore/code?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}">
+ <a class="ui language-label {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{AppSubUrl}}/explore/code?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}">
<i class="color-icon" style="background-color: {{$term.Color}}"></i>
{{$term.Language}}
<div class="detail">{{$term.Count}}</div>
diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl
index 5aa2f8983e..984b3fe9e5 100644
--- a/templates/repo/search.tmpl
+++ b/templates/repo/search.tmpl
@@ -18,7 +18,7 @@
</h3>
<div>
{{range $term := .SearchResultLanguages}}
- <a class="ui {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{EscapePound $.SourcePath}}/search?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}">
+ <a class="ui language-label {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{EscapePound $.SourcePath}}/search?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}">
<i class="color-icon" style="background-color: {{$term.Color}}"></i>
{{$term.Language}}
<div class="detail">{{$term.Count}}</div>
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index ba3bbff369..1c5626be0b 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -1228,3 +1228,12 @@ i.icon.centerlock {
overflow-x: hidden;
text-overflow: ellipsis;
}
+
+.language-label {
+ display: inline-flex !important;
+ align-items: center !important;
+}
+
+.language-label .color-icon {
+ position: static !important;
+}