<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>{{ .Title }}{{ if ne .Protocol "startpage" }} - {{ .Protocol | title }} proxy{{ end }}</title> <link rel="stylesheet" href="{{ .Assets.Style }}" /> <style> @font-face { font-family: 'Iosevka Term SS03'; font-style: normal; font-weight: normal; src: url('{{ .Assets.FontW2 }}') format('woff2'), url('{{ .Assets.FontW }}') format('woff'); } @font-face { font-family: 'Iosevka Aile'; font-style: normal; font-weight: normal; src: url('{{ .Assets.PropFontW2 }}') format('woff2'), url('{{ .Assets.PropFontW }}') format('woff'); } </style> </head> <body class="{{ if not .Lines }}is-plain{{ end }}"> <header class="header header-base"> <div class="location"> <a class="location__prefix">{{ .Protocol }}://</a><a class="location__prefix location__prefix--mobile">://</a> {{- if .URI -}} {{- $page := . -}} {{- $href := printf "/%s" .Protocol -}} {{- $uriParts := split .URI "/" -}} {{- $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/{{ .URI | replace "^([^/]*)/0" "$1/9" }}">View raw</a></div> {{- end -}} <div class="action"><button class="settings-btn">Settings</button></div> </div> </header> <main class="wrap"> <pre class="content content--has-monospace-font{{ if .Lines }} content--has-type-annotations{{ end }}"> {{- if .Lines -}} {{- $content := "" -}} {{- range .Lines -}} {{- if ne $content "" -}} {{- $content = printf "%s\n" $content -}} {{- end -}} {{- if .Link -}} {{- $content = printf "%s%s" $content (printf "<span class=\"type-annotation\">%s </span><a class=\"link link--%s\" href=\"%s\">%s</a>" .Type .Type .Link (.Text | HTMLEscape)) -}} {{- else -}} {{- $content = printf "%s%s" $content (printf "<span class=\"type-annotation\"> </span>%s" (.Text | HTMLEscape)) -}} {{- end -}} {{- end -}} {{- $content | safeHtml -}} {{- else -}} {{- .RawText -}} {{- end -}} </pre> </main> <aside class="modal modal--settings"> <div class="modal__content"> <header class="modal__head header-base"> <h1 class="modal__title">Settings</h1> <button class="modal__close-btn">Close</button> </header> <div class="setting setting--word-wrap"> <strong class="setting__label">Wrap wide content</strong> <button class="setting__value">[N/A]</button> </div> <div class="setting setting--monospace-font"> <strong class="setting__label">Monospace font</strong> <button class="setting__value">[N/A]</button> </div> <div class="setting setting--image-previews"> <strong class="setting__label">Image thumbnails</strong> <button class="setting__value">[N/A]</button> </div> <div class="setting setting--clickable-plain-links"> <strong class="setting__label">Clickable links in text files</strong> <button class="setting__value">[N/A]</button> </div> </div> </aside> <script src="{{ .Assets.JS }}"></script> </body> </html>