aboutsummaryrefslogtreecommitdiffstats
path: root/internal/port/tpl
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-07-24 09:46:59 +0200
committerVolpeon <git@volpeon.ink>2021-07-24 09:46:59 +0200
commit38485ede265d22e11a316b4d66de1bf0feb945be (patch)
tree72388107a2bfe9e8e972feccd4f9c7d542d37b60 /internal/port/tpl
parentAdd underline to nav protocol (diff)
downloadgopherproxy-38485ede265d22e11a316b4d66de1bf0feb945be.tar.gz
gopherproxy-38485ede265d22e11a316b4d66de1bf0feb945be.tar.bz2
gopherproxy-38485ede265d22e11a316b4d66de1bf0feb945be.zip
Diffstat (limited to 'internal/port/tpl')
-rw-r--r--internal/port/tpl/_fonts.html16
-rw-r--r--internal/port/tpl/_modals.html24
-rw-r--r--internal/port/tpl/gemini.html65
-rw-r--r--internal/port/tpl/gopher.html50
-rw-r--r--internal/port/tpl/startpage.html30
5 files changed, 0 insertions, 185 deletions
diff --git a/internal/port/tpl/_fonts.html b/internal/port/tpl/_fonts.html
deleted file mode 100644
index a947222..0000000
--- a/internal/port/tpl/_fonts.html
+++ /dev/null
@@ -1,16 +0,0 @@
1<style>
2 @font-face {
3 font-family: 'Iosevka Term SS03';
4 font-style: normal;
5 font-weight: normal;
6 src: url('{{ .Assets.FontRegularW2 }}') format('woff2'),
7 url('{{ .Assets.FontRegularW }}') format('woff');
8 }
9 @font-face {
10 font-family: 'Iosevka Term SS03';
11 font-style: normal;
12 font-weight: bold;
13 src: url('{{ .Assets.FontBoldW2 }}') format('woff2'),
14 url('{{ .Assets.FontBoldW }}') format('woff');
15 }
16</style>
diff --git a/internal/port/tpl/_modals.html b/internal/port/tpl/_modals.html
deleted file mode 100644
index 3bbdef2..0000000
--- a/internal/port/tpl/_modals.html
+++ /dev/null
@@ -1,24 +0,0 @@
1<aside class="modal modal--settings">
2 <div class="modal__content">
3 <header class="modal__head header-base">
4 <h1 class="modal__title">Settings</h1>
5 <button class="modal__close-btn">Close</button>
6 </header>
7 <div class="setting setting--word-wrap">
8 <strong class="setting__label">Wrap wide content</strong>
9 <button class="setting__value">[N/A]</button>
10 </div>
11 <div class="setting setting--monospace-font">
12 <strong class="setting__label">Gemini: Monospace font</strong>
13 <button class="setting__value">[N/A]</button>
14 </div>
15 <div class="setting setting--image-previews">
16 <strong class="setting__label">Image thumbnails</strong>
17 <button class="setting__value">[N/A]</button>
18 </div>
19 <div class="setting setting--clickable-plain-links">
20 <strong class="setting__label">Clickable links in text files</strong>
21 <button class="setting__value">[N/A]</button>
22 </div>
23 </div>
24</aside>
diff --git a/internal/port/tpl/gemini.html b/internal/port/tpl/gemini.html
deleted file mode 100644
index 8d20da1..0000000
--- a/internal/port/tpl/gemini.html
+++ /dev/null
@@ -1,65 +0,0 @@
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 .IsPlain }}is-plain{{ end }}">
11 <header class="header header-base">
12 <div class="location">
13 <a class="location__prefix">gemini://</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 <div class="action"><button class="settings-btn">Settings</button></div>
27 </div>
28 </header>
29
30 <main class="wrap">
31 <div class="content{{ if not .IsPlain }} content--has-type-annotations{{ end }}">
32 {{- range .Sections -}}
33 {{- if eq .Type "RAW_TEXT" -}}
34 <div class="section"><span class="section__type">```</span><pre class="section__content">{{- .Text -}}</pre></div>
35 {{- else if eq .Type "REFLOW_TEXT" -}}
36 <div class="section"><p class="section__content">{{- .Text -}}</p></div>
37 {{- else if eq .Type "LINK" -}}
38 {{- $linkCls := "link" -}}
39 {{- $url := string .URL -}}
40 {{- if or (hasSuffix $url ".jpg") (hasSuffix $url ".jpeg") (hasSuffix $url ".png") (hasSuffix $url ".gif") -}}
41 {{- $linkCls = "link--IMG" -}}
42 {{- end -}}
43 <div class="section"><span class="section__type"> =></span><a class="section__content {{ $linkCls }}" href="{{ .URL }}">{{- .Text -}}</a></div>
44 {{- else if eq .Type "HEADING_1" -}}
45 <div class="section"><span class="section__type"> #</span><h1 class="section__content">{{- .Text -}}</h1></div>
46 {{- else if eq .Type "HEADING_2" -}}
47 <div class="section"><span class="section__type"> ##</span><h2 class="section__content">{{- .Text -}}</h2></div>
48 {{- else if eq .Type "HEADING_3" -}}
49 <div class="section"><span class="section__type">###</span><h3 class="section__content">{{- .Text -}}</h3></div>
50 {{- else if eq .Type "LIST" -}}
51 <div class="section"><ul class="section__content">
52 {{- range .Items -}}
53 <li>{{- . -}}</li>
54 {{- end -}}
55 </ul></div>
56 {{- end -}}
57 {{- end -}}
58 </div>
59 </main>
60
61 {{- template "_modals.html" . -}}
62
63 <script src="{{ .Assets.JS }}"></script>
64 </body>
65</html>
diff --git a/internal/port/tpl/gopher.html b/internal/port/tpl/gopher.html
deleted file mode 100644
index 6eb607c..0000000
--- a/internal/port/tpl/gopher.html
+++ /dev/null
@@ -1,50 +0,0 @@
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>
diff --git a/internal/port/tpl/startpage.html b/internal/port/tpl/startpage.html
deleted file mode 100644
index 772ac90..0000000
--- a/internal/port/tpl/startpage.html
+++ /dev/null
@@ -1,30 +0,0 @@
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 }}</title>
7 <link rel="stylesheet" href="{{ .Assets.Style }}" />
8 {{- template "_fonts.html" . -}}
9 </head>
10 <body class="is-plain">
11 <header class="header header-base">
12 <div class="location">
13 <a class="location__prefix">start://</a><a class="location__prefix location__prefix--mobile">://</a>
14 </div>
15 <div class="actions">
16 <div class="action"><button class="settings-btn">Settings</button></div>
17 </div>
18 </header>
19
20 <main class="wrap">
21 <pre class="content content--monospace">
22 {{- .Content -}}
23 </pre>
24 </main>
25
26 {{- template "_modals.html" . -}}
27
28 <script src="{{ .Assets.JS }}"></script>
29 </body>
30</html>