feat/multi-repo
 1{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.BlobParams */ -}}
 2{{ define "head" }}
 3    {{ if .InlineStyles }}
 4    <style>{{ .CSS }}
 5    {{ else }}
 6    <link rel="stylesheet" href="{{ .RootHref }}chroma.css">
 7    <style>
 8    {{ end }}
 9        [id] {
10          scroll-margin-top: var(--header-height);
11        }
12
13        pre {
14          border: 1px solid var(--c-border);
15          border-top: none;
16          border-bottom-left-radius: var(--border-radius);
17          border-bottom-right-radius: var(--border-radius);
18        }
19
20        pre {
21          margin: 0;
22          padding: 8px 16px;
23          overflow-x: auto;
24          white-space: pre;
25          word-spacing: normal;
26          word-break: normal;
27          word-wrap: normal;
28          tab-size: 4;
29          font-family: var(--font-family-mono), monospace;
30          background: var(--code-block-bg);
31          color: var(--code-block-color);
32        }
33
34        pre > code {
35          display: block;
36          padding: 0 16px;
37          width: fit-content;
38          min-width: 100%;
39          line-height: var(--code-line-height);
40          font-size: var(--code-font-size);
41        }
42
43        .chroma {
44          background: var(--code-block-bg);
45          color: var(--code-block-color);
46        }
47
48        .border {
49          border: 1px solid var(--c-border);
50          border-top: none;
51          border-bottom-left-radius: 6px;
52          border-bottom-right-radius: 6px;
53        }
54
55        .binary-file {
56          padding: 8px 16px;
57          font-style: italic;
58        }
59
60        .image {
61          padding: 8px 16px;
62          text-align: center;
63        }
64
65        .image img {
66          max-width: 100%;
67          height: auto;
68        }
69    </style>
70{{ end }}
71
72{{ define "body" }}
73    {{ template "header" . }}
74    {{ if .IsImage }}
75        <div class="image border">{{.Content}}</div>
76    {{ else if .IsBinary}}
77        <div class="binary-file border">Binary file</div>
78    {{ else }}
79        {{ .Content }}
80    {{ end }}
81{{ end }}
82