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/_header.html | 48 ------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 internal/port/tpl/_header.html (limited to 'internal/port/tpl/_header.html') diff --git a/internal/port/tpl/_header.html b/internal/port/tpl/_header.html deleted file mode 100644 index 5bcd254..0000000 --- a/internal/port/tpl/_header.html +++ /dev/null @@ -1,48 +0,0 @@ -
-
- {{ .Protocol }}://:// - - {{- if .URL -}} - {{- $page := . -}} - {{- $href := printf "/%s" .Protocol -}} - {{- $uriParts := split .URL "/" -}} - - {{- $uriLast := $uriParts | last -}} - {{- $uriParts = $uriParts | pop -}} - {{- if eq $uriLast "" -}} - {{- $uriLast = $uriParts | last -}} - {{- $uriParts = $uriParts | pop -}} - {{- end -}} - - {{- range $i, $part := $uriParts -}} - {{- if and (eq $page.Protocol "gopher") (eq $i 1) -}} - {{- $href = printf "%s/1" $href -}} - {{- $part = $part | trimLeftChar -}} - {{- if not (eq $part "") -}} - {{- $href = printf "%s/%s" $href $part -}} - /{{ $part }} - {{- end -}} - {{- else -}} - {{- $href = printf "%s/%s" $href . -}} - {{- if ne $i 0 -}} - / - {{- end -}} - {{ . }} - {{- end -}} - {{- end -}} - {{- if ne (len $uriParts) 0 -}} - / - {{- end -}} - {{- if and (eq $page.Protocol "gopher") (eq (len $uriParts) 1) -}} - {{- $uriLast = $uriLast | trimLeftChar -}} - {{- end -}} - {{ $uriLast }} - {{- end -}} -
-
- {{- if and (not .Lines) (not .Error) (eq .Protocol "gopher") -}} - - {{- end -}} -
-
-
-- cgit v1.2.3-70-g09d2