From ac770231436f8a17d348a6a0ab934429df3c57d0 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Mon, 18 May 2020 16:12:43 +0200 Subject: WIP: Refactoring --- internal/port/tpl/gopher.html | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'internal/port/tpl/gopher.html') diff --git a/internal/port/tpl/gopher.html b/internal/port/tpl/gopher.html index e69de29..c971847 100644 --- a/internal/port/tpl/gopher.html +++ b/internal/port/tpl/gopher.html @@ -0,0 +1,59 @@ + + + + + + {{ .Title }} - Gopher proxy + + {{- template "_fonts.html" . -}} + + +
+
+ gopher://:// + {{- range $i, $item := .Nav -}} + {{- if ne $i 0 -}} + / + {{- end -}} + {{- if .Current -}} + {{ .Label }} + {{- else -}} + {{ .Label }} + {{- end -}} + {{- end -}} +
+
+ {{- if .IsPlain -}} + + {{- end -}} +
+
+
+ +
+
+        {{- $content := "" -}}
+        {{- $page := . -}}
+        {{- range .Lines -}}
+          {{- if ne $content "" -}}
+            {{- $content = printf "%s\n" $content -}}
+          {{- end -}}
+          {{- if $page.IsPlain -}}
+            {{- $content = printf "%s%s" $content (.Text | HTMLEscape) -}}
+          {{- else -}}
+            {{- if .Link -}}
+              {{- $content = printf "%s%s" $content (printf "%s  %s" .Type .Type .Link (.Text | HTMLEscape)) -}}
+            {{- else -}}
+              {{- $content = printf "%s%s" $content (printf "     %s" (.Text | HTMLEscape)) -}}
+            {{- end -}}
+          {{- end -}}
+        {{- end -}}
+        {{- $content | safeHtml -}}
+			
+
+ + {{- template "_modals.html" . -}} + + + + -- cgit v1.2.3-70-g09d2