1
0
Fork 0
forked from forgejo/forgejo

Diff stat improvements (#13954)

* Diff stat improvements

- Combine number to just total number of changes
- Add tooltip over stats bar
- Increase contrast on file name
- Refactor classes and CSS to be more reusable

* misc tweaks

* make count bold
This commit is contained in:
silverwind 2020-12-12 02:06:22 +01:00 committed by GitHub
parent 3285babcae
commit 1837e647eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 43 deletions

View file

@ -1,6 +1,4 @@
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
<span class="bar">
<div class="pull-left add" style="width: {{DiffStatsWidth .Addition .Deletion}}%"></div>
<div class="pull-left del"></div>
{{Add .file.Addition .file.Deletion}}
<span class="diff-stats-bar poping up ml-2" data-content="{{.root.i18n.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}" data-variation="wide">
<div class="diff-stats-add-bar" style="width: {{DiffStatsWidth .file.Addition .file.Deletion}}%"></div>
</span>
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>