aboutsummaryrefslogtreecommitdiffstats
path: root/template.go
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-06-25 17:57:19 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-06-25 17:57:19 +0200
commit487e80adc7823b4fb91b660ec58b56e2adaaa7bb (patch)
tree245ad438df36075c51cf8a59f46f257d9633fcd3 /template.go
parentWrap content on smaller screens (diff)
downloadgopherproxy-487e80adc7823b4fb91b660ec58b56e2adaaa7bb.tar.gz
gopherproxy-487e80adc7823b4fb91b660ec58b56e2adaaa7bb.tar.bz2
gopherproxy-487e80adc7823b4fb91b660ec58b56e2adaaa7bb.zip
Improved wrapping behavior
Diffstat (limited to 'template.go')
-rw-r--r--template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/template.go b/template.go
index cdef279..93777b2 100644
--- a/template.go
+++ b/template.go
@@ -50,7 +50,7 @@ var tpltext = `<!doctype html>
50 </div> 50 </div>
51 </header> 51 </header>
52 <main class="wrap"> 52 <main class="wrap">
53 <pre class="content"> 53 <pre class="content{{ if .Lines }} content--has-type-annotations{{ end }}">
54 {{- if .Lines -}} 54 {{- if .Lines -}}
55 {{- $content := "" -}} 55 {{- $content := "" -}}
56 {{- range .Lines -}} 56 {{- range .Lines -}}
@@ -60,7 +60,7 @@ var tpltext = `<!doctype html>
60 {{- if .Link -}} 60 {{- if .Link -}}
61 {{- $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)) -}} 61 {{- $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)) -}}
62 {{- else -}} 62 {{- else -}}
63 {{- $content = printf "%s%s" $content (printf " %s" (.Text | HTMLEscape)) -}} 63 {{- $content = printf "%s%s" $content (printf "<span class=\"type-annotation\"> </span>%s" (.Text | HTMLEscape)) -}}
64 {{- end -}} 64 {{- end -}}
65 {{- end -}} 65 {{- end -}}
66 {{- $content | safeHtml -}} 66 {{- $content | safeHtml -}}