From e58fabd89f9708aaeb10e52f731759712034833f Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Mon, 18 May 2020 18:02:20 +0200 Subject: WIP: Refactoring --- internal/port/tpl/gopher.html | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'internal/port/tpl/gopher.html') diff --git a/internal/port/tpl/gopher.html b/internal/port/tpl/gopher.html index c971847..5436123 100644 --- a/internal/port/tpl/gopher.html +++ b/internal/port/tpl/gopher.html @@ -31,25 +31,16 @@
-
-        {{- $content := "" -}}
+      
{{- $page := . -}} {{- range .Lines -}} - {{- if ne $content "" -}} - {{- $content = printf "%s\n" $content -}} - {{- end -}} - {{- if $page.IsPlain -}} - {{- $content = printf "%s%s" $content (.Text | HTMLEscape) -}} + {{- if .Link -}} +
{{- .Type -}}{{- .Text -}}
{{- 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 -}} +
{{- .Text -}}
{{- end -}} {{- end -}} - {{- $content | safeHtml -}} -
+
{{- template "_modals.html" . -}} -- cgit v1.2.3-70-g09d2