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/gemini.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'internal/port/tpl/gemini.html') 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 @@ + + + + + + {{ .Title }} - Gemini proxy + + {{- template "_fonts.html" . -}} + + + {{- template "_header.html" . -}} + +
+
+				{{- if .Lines -}}
+					{{- $content := "" -}}
+					{{- range .Lines -}}
+						{{- if ne $content "" -}}
+							{{- $content = printf "%s\n" $content -}}
+						{{- end -}}
+						{{- 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 -}}
+					{{- $content | safeHtml -}}
+				{{- else -}}
+					{{- .RawText -}}
+				{{- end -}}
+			
+
+ + {{- template "_modals.html" . -}} + + + + -- cgit v1.2.3-70-g09d2