aboutsummaryrefslogtreecommitdiffstats
path: root/internal/port/tpl/gemini.html
diff options
context:
space:
mode:
Diffstat (limited to 'internal/port/tpl/gemini.html')
-rw-r--r--internal/port/tpl/gemini.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/internal/port/tpl/gemini.html b/internal/port/tpl/gemini.html
index e69de29..08f1b8e 100644
--- a/internal/port/tpl/gemini.html
+++ b/internal/port/tpl/gemini.html
@@ -0,0 +1,38 @@
1<!doctype html>
2<html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <title>{{ .Title }} - Gemini proxy</title>
7 <link rel="stylesheet" href="{{ .Assets.Style }}" />
8 {{- template "_fonts.html" . -}}
9 </head>
10 <body class="{{ if not .Lines }}is-plain{{ end }}">
11 {{- template "_header.html" . -}}
12
13 <main class="wrap">
14 <pre class="content content--has-monospace-font{{ if .Lines }} content--has-type-annotations{{ end }}">
15 {{- if .Lines -}}
16 {{- $content := "" -}}
17 {{- range .Lines -}}
18 {{- if ne $content "" -}}
19 {{- $content = printf "%s\n" $content -}}
20 {{- end -}}
21 {{- if .Link -}}
22 {{- $content = printf "%s%s" $content (printf "<span class=\"type-annotation\">%s </span><a class=\"link link--%s\" href=\"%s\">%s</a>" .Type .Type .Link (.Text | HTMLEscape)) -}}
23 {{- else -}}
24 {{- $content = printf "%s%s" $content (printf "<span class=\"type-annotation\"> </span>%s" (.Text | HTMLEscape)) -}}
25 {{- end -}}
26 {{- end -}}
27 {{- $content | safeHtml -}}
28 {{- else -}}
29 {{- .RawText -}}
30 {{- end -}}
31 </pre>
32 </main>
33
34 {{- template "_modals.html" . -}}
35
36 <script src="{{ .Assets.JS }}"></script>
37 </body>
38</html>