gitea
Зеркало из https://github.com/go-gitea/gitea
1{{if or .blobBase .blobHead}}
2<tr>
3<td colspan="2">
4<div class="image-diff"
5data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}"
6data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}"
7data-mime-before="{{.sniffedTypeBase.GetMimeType}}"
8data-mime-after="{{.sniffedTypeHead.GetMimeType}}"
9>
10<overflow-menu class="ui secondary pointing tabular menu custom">
11<div class="overflow-menu-items tw-justify-center">
12<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.side_by_side"}}</a>
13{{if and .blobBase .blobHead}}
14<a class="item" data-tab="diff-swipe-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.swipe"}}</a>
15<a class="item" data-tab="diff-overlay-{{.file.Index}}">{{ctx.Locale.Tr "repo.diff.image.overlay"}}</a>
16{{end}}
17</div>
18</overflow-menu>
19<div class="image-diff-tabs is-loading">
20<div class="ui bottom attached tab image-diff-container active" data-tab="diff-side-by-side-{{.file.Index}}">
21<div class="diff-side-by-side">
22{{if .blobBase}}
23<span class="side">
24<p class="side-header">{{ctx.Locale.Tr "repo.diff.file_before"}}</p>
25<span class="before-container"><img class="image-before"></span>
26<p>
27<span class="bounds-info-before">
28{{ctx.Locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
29 |
30{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
31 |
32</span>
33{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobBase.Size}}</span>
34</p>
35</span>
36{{end}}
37{{if .blobHead}}
38<span class="side">
39<p class="side-header">{{ctx.Locale.Tr "repo.diff.file_after"}}</p>
40<span class="after-container"><img class="image-after"></span>
41<p>
42<span class="bounds-info-after">
43{{ctx.Locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
44 |
45{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
46 |
47</span>
48{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .blobHead.Size}}</span>
49</p>
50</span>
51{{end}}
52</div>
53</div>
54{{if and .blobBase .blobHead}}
55<div class="ui bottom attached tab image-diff-container" data-tab="diff-swipe-{{.file.Index}}">
56<div class="diff-swipe">
57<div class="swipe-frame">
58<span class="before-container"><img class="image-before"></span>
59<span class="swipe-container">
60<span class="after-container"><img class="image-after"></span>
61</span>
62<span class="swipe-bar">
63<span class="handle top-handle"></span>
64<span class="handle bottom-handle"></span>
65</span>
66</div>
67</div>
68</div>
69<div class="ui bottom attached tab image-diff-container" data-tab="diff-overlay-{{.file.Index}}">
70<div class="diff-overlay">
71<input type="range" min="0" max="100" value="50">
72<div class="overlay-frame">
73<span class="before-container"><img class="image-before"></span>
74<span class="after-container"><img class="image-after"></span>
75</div>
76</div>
77</div>
78{{end}}
79</div>
80</div>
81</td>
82</tr>
83{{end}}
84