aboutsummaryrefslogtreecommitdiffstats
path: root/internal/gopherproxy/tpl/gopher.html
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gopherproxy/tpl/gopher.html')
-rw-r--r--internal/gopherproxy/tpl/gopher.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/internal/gopherproxy/tpl/gopher.html b/internal/gopherproxy/tpl/gopher.html
new file mode 100644
index 0000000..6eb607c
--- /dev/null
+++ b/internal/gopherproxy/tpl/gopher.html
@@ -0,0 +1,50 @@
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 }} - Gopher proxy</title>
7 <link rel="stylesheet" href="{{ .Assets.Style }}" />
8 {{- template "_fonts.html" . -}}
9 </head>
10 <body class="{{ if .IsPlain }}is-plain{{ end }}">
11 <header class="header header-base">
12 <div class="location">
13 <a class="location__prefix">gopher://</a><a class="location__prefix location__prefix--mobile">://</a>
14 {{- range $i, $item := .Nav -}}
15 {{- if ne $i 0 -}}
16 <span class="location__slash">/</span>
17 {{- end -}}
18 {{- if .Current -}}
19 <span class="location__uripart">{{ .Label }}</span>
20 {{- else -}}
21 <a href="{{ .URL }}/" class="location__uripart">{{ .Label }}</a>
22 {{- end -}}
23 {{- end -}}
24 </div>
25 <div class="actions">
26 {{- if .IsPlain -}}
27 <div class="action"><a href="/gopher/{{ .URL | replace "^([^/]*)/0" "$1/9" }}">View raw</a></div>
28 {{- end -}}
29 <div class="action"><button class="settings-btn">Settings</button></div>
30 </div>
31 </header>
32
33 <main class="wrap">
34 <div class="content content--monospace{{ if not .IsPlain }} content--has-type-annotations{{ end }}">
35 {{- $page := . -}}
36 {{- range .Lines -}}
37 {{- if .Link -}}
38 <div class="section"><span class="section__type">{{- .Type -}}</span><a class="section__content link link--{{ .Type }}" href="{{ .Link }}">{{- .Text -}}</a></div>
39 {{- else -}}
40 <div class="section"><span class="section__type"></span><pre class="section__content">{{- .Text -}}</pre></div>
41 {{- end -}}
42 {{- end -}}
43 </div>
44 </main>
45
46 {{- template "_modals.html" . -}}
47
48 <script src="{{ .Assets.JS }}"></script>
49 </body>
50</html>