From e58fabd89f9708aaeb10e52f731759712034833f Mon Sep 17 00:00:00 2001
From: Feuerfuchs <git@feuerfuchs.dev>
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 @@
-<header class="header header-base">
-  <div class="location">
-            <a class="location__prefix">{{ .Protocol }}://</a><a class="location__prefix location__prefix--mobile">://</a>
-            
-    {{- 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 -}}
-            <span class="location__slash">/</span><a href="{{ $href }}/" class="location__uripart">{{ $part }}</a>
-          {{- end -}}
-        {{- else -}}
-          {{- $href = printf "%s/%s" $href . -}}
-          {{- if ne $i 0 -}}
-            <span class="location__slash">/</span>
-          {{- end -}}
-          <a href="{{ $href }}/" class="location__uripart">{{ . }}</a>
-        {{- end -}}
-      {{- end -}}
-      {{- if ne (len $uriParts) 0 -}}
-        <span class="location__slash">/</span>
-      {{- end -}}
-      {{- if and (eq $page.Protocol "gopher") (eq (len $uriParts) 1) -}}
-        {{- $uriLast = $uriLast | trimLeftChar -}}
-      {{- end -}}
-      <span class="location__uripart">{{ $uriLast }}</span>
-            {{- end -}}
-  </div>
-  <div class="actions">
-    {{- if and (not .Lines) (not .Error) (eq .Protocol "gopher") -}}
-      <div class="action"><a href="/gopher/{{ .URL | replace "^([^/]*)/0" "$1/9" }}">View raw</a></div>
-    {{- end -}}
-    <div class="action"><button class="settings-btn">Settings</button></div>
-  </div>
-</header>
-- 
cgit v1.2.3-70-g09d2