File tree 4 files changed +29
-43
lines changed
4 files changed +29
-43
lines changed Original file line number Diff line number Diff line change @@ -1787,6 +1787,7 @@ diff.whitespace_ignore_all_whitespace = Ignore whitespace when comparing lines
1787
1787
diff.whitespace_ignore_amount_changes = Ignore changes in amount of whitespace
1788
1788
diff.whitespace_ignore_at_eol = Ignore changes in whitespace at EOL
1789
1789
diff.stats_desc = <strong> %d changed files</strong> with <strong>%d additions</strong> and <strong>%d deletions</strong>
1790
+ diff.stats_desc_file = %d changes: %d additions and %d deletions
1790
1791
diff.bin = BIN
1791
1792
diff.view_file = View File
1792
1793
diff.file_before = Before
Original file line number Diff line number Diff line change 36
36
<ol class="diff-detail-box diff-stats detail-files hide" id="diff-files">
37
37
{{range .Diff.Files}}
38
38
<li>
39
- <div class="diff-counter count pull-right">
39
+ <div class="diff-counter pull-right">
40
40
{{if not .IsBin}}
41
- {{template "repo/diff/stats" . }}
41
+ {{template "repo/diff/stats" dict "file" . "root" $ }}
42
42
{{else}}
43
43
<span>{{$.i18n.Tr "repo.diff.bin"}}</span>
44
44
{{end}}
53
53
{{if $file.IsIncomplete}}
54
54
<div class="diff-file-box diff-box file-content">
55
55
<h4 class="ui top attached normal header rounded">
56
- <div class="diff-counter count ui left">
56
+ <div class="diff-counter ui left">
57
57
{{if not $file.IsRenamed}}
58
- {{template "repo/diff/stats" . }}
58
+ {{template "repo/diff/stats" dict "file" . "root" $ }}
59
59
{{end}}
60
60
</div>
61
61
<span class="file">{{$file.Name}}</span>
87
87
{{svg "octicon-chevron-down" 18}}
88
88
</a>
89
89
{{end}}
90
- <div class="diff-counter count ">
90
+ <div class="diff-counter">
91
91
{{if $file.IsBin}}
92
92
{{$.i18n.Tr "repo.diff.bin"}}
93
93
{{else if not $file.IsRenamed}}
94
- {{template "repo/diff/stats" . }}
94
+ {{template "repo/diff/stats" dict "file" . "root" $ }}
95
95
{{end}}
96
96
</div>
97
97
<span class="file">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
Original file line number Diff line number Diff line change 1
- <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
2
- <span class="bar">
3
- <div class="pull-left add" style="width: {{DiffStatsWidth .Addition .Deletion}}%"></div>
4
- <div class="pull-left del"></div>
1
+ {{Add .file.Addition .file.Deletion}}
2
+ <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">
3
+ <div class="diff-stats-add-bar" style="width: {{DiffStatsWidth .file.Addition .file.Deletion}}%"></div>
5
4
</span>
6
- <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
Original file line number Diff line number Diff line change 1563
1563
display : flex ;
1564
1564
align-items : center ;
1565
1565
1566
- .count {
1567
- margin-right : 12px ;
1568
- font-size : 13px ;
1569
- flex : 0 0 auto ;
1570
-
1571
- .bar {
1572
- background-color : var (--color-red );
1573
- height : 12px ;
1574
- width : 40px ;
1575
- display : inline-block ;
1576
- margin : 2px 4px 0 ;
1577
- vertical-align : text-top ;
1578
-
1579
- .add {
1580
- background-color : var (--color-green );
1581
- height : 12px ;
1582
- }
1583
- }
1584
- }
1585
-
1586
1566
.file {
1587
1567
flex : 1 ;
1588
- color : var (--color-text-light-2 );
1589
1568
word-break : break-all ;
1590
1569
}
1591
1570
1768
1747
border-bottom : 1px dashed #dddddd ;
1769
1748
padding-left : 6px ;
1770
1749
}
1771
-
1772
- .diff-counter {
1773
- margin-right : 15px ;
1774
-
1775
- .del {
1776
- color : var (--color-red );
1777
- }
1778
- .add {
1779
- color : var (--color-green );
1780
- }
1781
- }
1782
1750
}
1783
1751
1784
1752
.repo-search-result {
@@ -3142,6 +3110,25 @@ td.blob-excerpt {
3142
3110
border-radius : var (--border-radius ) !important ;
3143
3111
}
3144
3112
3113
+ .diff-counter {
3114
+ font-weight : 600 ;
3115
+ margin-right : 8px ;
3116
+ }
3117
+
3118
+ .diff-stats-bar {
3119
+ display : inline-block ;
3120
+ background-color : var (--color-red );
3121
+ height : 12px ;
3122
+ width : 40px ;
3123
+ position : relative ;
3124
+ top : 2px ;
3125
+
3126
+ .diff-stats-add-bar {
3127
+ background-color : var (--color-green );
3128
+ height : 100% ;
3129
+ }
3130
+ }
3131
+
3145
3132
/* prevent page shaking on language bar click */
3146
3133
.repository-summary-language-stats {
3147
3134
height : 48px ;
You can’t perform that action at this time.
0 commit comments