Files
studio/templates/repo/diff/html_diff.tmpl
T

31 lines
1.0 KiB
Handlebars

{{if or .blobBase .blobHead}}
<tr>
<td colspan="2">
<div class="ui bottom attached segment tw-p-2">
<div class="tw-grid tw-grid-cols-2 tw-gap-4">
{{if .blobBase}}
<div>
<div class="ui top attached header tw-font-normal tw-mb-1">{{ctx.Locale.Tr "repo.diff.file_before"}}</div>
<iframe
src="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}"
style="width:100%;min-height:400px;border:1px solid var(--color-secondary);"
sandbox="allow-scripts allow-same-origin"
></iframe>
</div>
{{end}}
{{if .blobHead}}
<div{{if and .blobBase .blobHead}} class="tw-col-start-2"{{end}}>
<div class="ui top attached header tw-font-normal tw-mb-1">{{ctx.Locale.Tr "repo.diff.file_after"}}</div>
<iframe
src="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}"
style="width:100%;min-height:400px;border:1px solid var(--color-secondary);"
sandbox="allow-scripts allow-same-origin"
></iframe>
</div>
{{end}}
</div>
</div>
</td>
</tr>
{{end}}