main
1{{- /*gotype: mokhan.ca/xlgmokha/gitmal/pkg/templates.BlobParams */ -}}
2{{- define "head" -}}
3<style>
4 [id] {
5 scroll-margin-top: var(--header-height);
6 }
7 pre {
8 border: 1px solid var(--c-border);
9 border-top: none;
10 border-bottom-left-radius: var(--border-radius);
11 border-bottom-right-radius: var(--border-radius);
12 }
13 pre {
14 margin: 0;
15 padding: 8px 16px;
16 overflow-x: auto;
17 white-space: pre;
18 word-spacing: normal;
19 word-break: normal;
20 word-wrap: normal;
21 tab-size: 4;
22 font-family: var(--font-family-mono), monospace;
23 }
24 pre > code {
25 display: block;
26 padding: 0 16px;
27 width: fit-content;
28 min-width: 100%;
29 line-height: var(--code-line-height);
30 font-size: var(--code-font-size);
31 }
32 .border {
33 border: 1px solid var(--c-border);
34 border-top: none;
35 border-bottom-left-radius: 6px;
36 border-bottom-right-radius: 6px;
37 }
38 .binary-file {
39 padding: 8px 16px;
40 font-style: italic;
41 }
42 .image {
43 padding: 8px 16px;
44 text-align: center;
45 }
46 .image img {
47 max-width: 100%;
48 height: auto;
49 }
50</style>
51{{- end}}
52
53{{- define "body" -}}
54{{- template "header" .}}
55{{- if .IsImage}}
56<div class="image border">{{.Content}}</div>
57{{- else if .IsBinary}}
58<div class="binary-file border">Binary file</div>
59{{- else}}
60{{.Content}}
61{{- end}}
62{{- end}}