aboutsummaryrefslogtreecommitdiffstats
path: root/templates/explore
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-12-20 19:00:03 +0100
committerGitHub <noreply@github.com>2020-12-20 13:00:03 -0500
commitb4f8da533e1771eb1e0d222d8d586b4220447e4c (patch)
treec5db36e00ba4cb2383f9773e1e2e5e8950e9fb92 /templates/explore
parente0a84d78809f4b19247ec7538e76f73b1f4c499f (diff)
downloadgitea-b4f8da533e1771eb1e0d222d8d586b4220447e4c.tar.gz
gitea-b4f8da533e1771eb1e0d222d8d586b4220447e4c.zip
Search and Diff CSS enhancements (#14050)
* Search and Diff CSS enhancements - Use flexbox for language stats - Improve labels and code boxes on repo and code search - Use flexbox on diff header and improve suppressed diff text - Add dedicated color for diff expander * more diff tweaks, less vertical padding on header * more minor tweaks * always show fold icon, image diff improvments * remove margin Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/explore')
-rw-r--r--templates/explore/code.tmpl8
-rw-r--r--templates/explore/repo_list.tmpl8
2 files changed, 8 insertions, 8 deletions
diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl
index 0495645576..1c41dd843f 100644
--- a/templates/explore/code.tmpl
+++ b/templates/explore/code.tmpl
@@ -16,10 +16,10 @@
<h3>
{{.i18n.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html }}
</h3>
- <div>
+ <div class="df ac fw">
{{range $term := .SearchResultLanguages}}
- <a class="ui text-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>
+ <a class="ui text-label df ac mr-1 my-1 {{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 mr-3" style="background-color: {{$term.Color}}"></i>
{{$term.Language}}
<div class="detail">{{$term.Count}}</div>
</a>
@@ -31,7 +31,7 @@
<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result">
<h4 class="ui top attached normal header">
<span class="file"><a rel="nofollow" href="{{EscapePound $repo.HTMLURL}}">{{$repo.FullName}}</a> - {{.Filename}}</span>
- <a class="ui basic grey tiny button" rel="nofollow" href="{{EscapePound $repo.HTMLURL}}/src/commit/{{$result.CommitID}}/{{EscapePound .Filename}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
+ <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $repo.HTMLURL}}/src/commit/{{$result.CommitID}}/{{EscapePound .Filename}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
</h4>
<div class="ui attached table segment">
<div class="file-body file-code code-view">
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index bfec17ff29..91dc3d8bf4 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -38,12 +38,12 @@
{{end}}
</div>
</div>
- <div class="metas">
+ <div class="metas df ac">
{{if .PrimaryLanguage }}
- <span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
+ <span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
{{end}}
- <span class="text grey">{{svg "octicon-star"}} {{.NumStars}}</span>
- <span class="text grey">{{svg "octicon-git-branch"}} {{.NumForks}}</span>
+ <span class="text grey df ac mr-3">{{svg "octicon-star" 16 "mr-3"}}{{.NumStars}}</span>
+ <span class="text grey df ac mr-3">{{svg "octicon-git-branch" 16 "mr-3"}}{{.NumForks}}</span>
</div>
</div>
<div class="description">