diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-11-11 18:58:24 +0100 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-11-11 18:58:24 +0100 |
commit | d0b3c432bdc80796f8854651b2822662a3ccef70 (patch) | |
tree | 7a970f50d43ffdb8c1d39411742b0e021cf122f7 /template.go | |
parent | Protocol handlers for gopher are not supported by browsers (diff) | |
download | gopherproxy-d0b3c432bdc80796f8854651b2822662a3ccef70.tar.gz gopherproxy-d0b3c432bdc80796f8854651b2822662a3ccef70.tar.bz2 gopherproxy-d0b3c432bdc80796f8854651b2822662a3ccef70.zip |
Replaced UglifyJS with Terser, include whole asset path in struct, display errors in template instead of basic HTML
Diffstat (limited to 'template.go')
-rw-r--r-- | template.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/template.go b/template.go index cb37aff..f58349e 100644 --- a/template.go +++ b/template.go | |||
@@ -6,14 +6,14 @@ var tpltext = `<!doctype html> | |||
6 | <meta charset="utf-8"> | 6 | <meta charset="utf-8"> |
7 | <meta name="viewport" content="width=device-width, initial-scale=1" /> | 7 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
8 | <title>{{ .Title }}</title> | 8 | <title>{{ .Title }}</title> |
9 | <link rel="stylesheet" href="/style-{{ .AssetHashList.Style }}.css" /> | 9 | <link rel="stylesheet" href="{{ .Assets.Style }}" /> |
10 | <style> | 10 | <style> |
11 | @font-face { | 11 | @font-face { |
12 | font-family: 'Iosevka Term SS03'; | 12 | font-family: 'Iosevka Term SS03'; |
13 | font-style: normal; | 13 | font-style: normal; |
14 | font-weight: normal; | 14 | font-weight: normal; |
15 | src: url('/iosevka-term-ss03-regular-{{ .AssetHashList.FontW2 }}.woff2') format('woff2'), | 15 | src: url('{{ .Assets.FontW2 }}') format('woff2'), |
16 | url('/iosevka-term-ss03-regular-{{ .AssetHashList.FontW }}.woff') format('woff'); | 16 | url('{{ .Assets.FontW }}') format('woff'); |
17 | } | 17 | } |
18 | </style> | 18 | </style> |
19 | </head> | 19 | </head> |
@@ -51,7 +51,7 @@ var tpltext = `<!doctype html> | |||
51 | <span class="location__uripart">{{ $uriLast -}}</span> | 51 | <span class="location__uripart">{{ $uriLast -}}</span> |
52 | </div> | 52 | </div> |
53 | <div class="actions"> | 53 | <div class="actions"> |
54 | {{- if not .Lines -}} | 54 | {{- if and (not .Lines) (not .Error) -}} |
55 | <div class="action"><a href="/{{ .URI | replace "^(.*?)/0" "$1/9" }}">View raw</a></div> | 55 | <div class="action"><a href="/{{ .URI | replace "^(.*?)/0" "$1/9" }}">View raw</a></div> |
56 | {{- end -}} | 56 | {{- end -}} |
57 | <div class="action"><button class="settings-btn">Settings</button></div> | 57 | <div class="action"><button class="settings-btn">Settings</button></div> |
@@ -97,6 +97,6 @@ var tpltext = `<!doctype html> | |||
97 | </div> | 97 | </div> |
98 | </div> | 98 | </div> |
99 | </aside> | 99 | </aside> |
100 | <script src="/main-{{ .AssetHashList.JS }}.js"></script> | 100 | <script src="{{ .Assets.JS }}"></script> |
101 | </body> | 101 | </body> |
102 | </html>` | 102 | </html>` |