gitea

Зеркало из https://github.com/go-gitea/gitea
Форк
0
/
image_diff.tmpl 
83 строки · 3.4 Кб
1
{{if or .blobBase .blobHead}}
2
<tr>
3
	<td colspan="2">
4
		<div class="image-diff"
5
			data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}"
6
			data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}"
7
			data-mime-before="{{.sniffedTypeBase.GetMimeType}}"
8
			data-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
									&nbsp;|&nbsp;
30
									{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
31
									&nbsp;|&nbsp;
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
									&nbsp;|&nbsp;
45
									{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
46
									&nbsp;|&nbsp;
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

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.