aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-06-05 13:52:59 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-06-05 13:52:59 +0200
commitc55e859bd93016f7246ea62984f7eaa02a325736 (patch)
treee4729c569fb905f069ed8520f7dfce6cf280d10a
parentFix selection color in Chrome (diff)
downloadgopherproxy-c55e859bd93016f7246ea62984f7eaa02a325736.tar.gz
gopherproxy-c55e859bd93016f7246ea62984f7eaa02a325736.tar.bz2
gopherproxy-c55e859bd93016f7246ea62984f7eaa02a325736.zip
Updated font handling
-rw-r--r--Makefile2
-rw-r--r--assets/iosevka-term-ss03-regular.woffbin0 -> 12332 bytes
-rw-r--r--assets/iosevka-term-ss03-regular.woff2bin0 -> 10024 bytes
-rw-r--r--css/main.scss10
-rw-r--r--fonts/iosevka-term-ss03-regular.ttfbin0 -> 396468 bytes
-rw-r--r--glyphs.txt1
-rw-r--r--go.mod1
-rw-r--r--go.sum60
-rw-r--r--gopherproxy.go27
-rw-r--r--style.go2
-rw-r--r--template.go2
11 files changed, 101 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8377afe..247b88c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,8 @@ dev: build
8build: clean 8build: clean
9 sassc -t compressed css/main.scss style.go 9 sassc -t compressed css/main.scss style.go
10 sed -i "s/.*/package gopherproxy\n\nvar styletext = \`&\`/" style.go 10 sed -i "s/.*/package gopherproxy\n\nvar styletext = \`&\`/" style.go
11 pyftsubset fonts/iosevka-term-ss03-regular.ttf --name-IDs+=0,4,6 --text-file=glyphs.txt --flavor='woff' --output-file='assets/iosevka-term-ss03-regular.woff'
12 pyftsubset fonts/iosevka-term-ss03-regular.ttf --name-IDs+=0,4,6 --text-file=glyphs.txt --flavor='woff2' --output-file='assets/iosevka-term-ss03-regular.woff2'
11 go build -o ./gopherproxy ./cmd/gopherproxy/main.go 13 go build -o ./gopherproxy ./cmd/gopherproxy/main.go
12 14
13profile: 15profile:
diff --git a/assets/iosevka-term-ss03-regular.woff b/assets/iosevka-term-ss03-regular.woff
new file mode 100644
index 0000000..498d93d
--- /dev/null
+++ b/assets/iosevka-term-ss03-regular.woff
Binary files differ
diff --git a/assets/iosevka-term-ss03-regular.woff2 b/assets/iosevka-term-ss03-regular.woff2
new file mode 100644
index 0000000..233b497
--- /dev/null
+++ b/assets/iosevka-term-ss03-regular.woff2
Binary files differ
diff --git a/css/main.scss b/css/main.scss
index 75a6609..b5a872a 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -9,6 +9,14 @@ $link-visited: $text;
9$sel-background: rgba($accent, .996); 9$sel-background: rgba($accent, .996);
10$sel-text: #000; 10$sel-text: #000;
11 11
12@font-face {
13 font-family: 'Iosevka Term SS03';
14 font-style: normal;
15 font-weight: normal;
16 src: url('/iosevka-term-ss03-regular.woff2') format('woff2'),
17 url('/iosevka-term-ss03-regular.woff') format('woff');
18}
19
12body { 20body {
13 margin: 0; 21 margin: 0;
14 padding: 0; 22 padding: 0;
@@ -33,7 +41,7 @@ body {
33 margin: 0; 41 margin: 0;
34 padding: 2em 1em; 42 padding: 2em 1em;
35 text-align: left; 43 text-align: left;
36 font-family: 'IBM Plex Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Droid Sans Mono', Monaco, Consolas, Courier, monospace; 44 font-family: 'Iosevka Term SS03', 'IBM Plex Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Droid Sans Mono', Monaco, Consolas, Courier, monospace;
37 font-size: 1em; 45 font-size: 1em;
38 line-height: 1.5; 46 line-height: 1.5;
39} 47}
diff --git a/fonts/iosevka-term-ss03-regular.ttf b/fonts/iosevka-term-ss03-regular.ttf
new file mode 100644
index 0000000..b621842
--- /dev/null
+++ b/fonts/iosevka-term-ss03-regular.ttf
Binary files differ
diff --git a/glyphs.txt b/glyphs.txt
new file mode 100644
index 0000000..1f4af23
--- /dev/null
+++ b/glyphs.txt
@@ -0,0 +1 @@
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~äöüÄÖÜßẞ↓↙←↖↑↗→↘
diff --git a/go.mod b/go.mod
index 7c178d3..099e4c0 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,7 @@
1module git.feuerfuchs.dev/Feuerfuchs/gopherproxy 1module git.feuerfuchs.dev/Feuerfuchs/gopherproxy
2 2
3require ( 3require (
4 github.com/gobuffalo/packr v1.25.0
4 github.com/prologic/go-gopher v0.0.0-20181230133552-0c68ed5f58b0 5 github.com/prologic/go-gopher v0.0.0-20181230133552-0c68ed5f58b0
5 github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea 6 github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea
6) 7)
diff --git a/go.sum b/go.sum
index 3474014..7eb5a57 100644
--- a/go.sum
+++ b/go.sum
@@ -1,9 +1,69 @@
1github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
4github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
5github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
6github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU=
7github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
8github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs=
9github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI=
10github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk=
11github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28=
12github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw=
13github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360=
14github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8=
15github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
16github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
17github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0 h1:P6naWPiHm/7R3eYx/ub3VhaW9G+1xAMJ6vzACePaGPI=
18github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4=
19github.com/gobuffalo/packr v1.25.0 h1:NtPK45yOKFdTKHTvRGKL+UIKAKmJVWIVJOZBDI/qEdY=
20github.com/gobuffalo/packr v1.25.0/go.mod h1:NqsGg8CSB2ZD+6RBIRs18G7aZqdYDlYNNvsSqP6T4/U=
21github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ=
22github.com/gobuffalo/packr/v2 v2.1.0/go.mod h1:n90ZuXIc2KN2vFAOQascnPItp9A2g9QYSvYvS3AjQEM=
23github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754 h1:tpom+2CJmpzAWj5/VEHync2rJGi+epHNIeRSWjzGA+4=
24github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
25github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
26github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
27github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
28github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
29github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
30github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
31github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
32github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
33github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
34github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
35github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
36github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
37github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 38github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3github.com/prologic/go-gopher v0.0.0-20181230133552-0c68ed5f58b0 h1:10LO/S8HVjIuEHsHea//Cena1Ztgy23f/e8HFC0w5ow= 39github.com/prologic/go-gopher v0.0.0-20181230133552-0c68ed5f58b0 h1:10LO/S8HVjIuEHsHea//Cena1Ztgy23f/e8HFC0w5ow=
4github.com/prologic/go-gopher v0.0.0-20181230133552-0c68ed5f58b0/go.mod h1:LiuwIXz4es4YIUOD6yRv8mES9n9dFbe4z0+TcrLkhXg= 40github.com/prologic/go-gopher v0.0.0-20181230133552-0c68ed5f58b0/go.mod h1:LiuwIXz4es4YIUOD6yRv8mES9n9dFbe4z0+TcrLkhXg=
41github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
42github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
43github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=
44github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
45github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
46github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
47github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
48github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
49github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
50github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
5github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 51github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
52github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
6github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea h1:hH8P1IiDpzRU6ZDbDh/RDnVuezi2oOXJpApa06M0zyI= 53github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea h1:hH8P1IiDpzRU6ZDbDh/RDnVuezi2oOXJpApa06M0zyI=
7github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea/go.mod h1:aOux3gHPCftJ3KHq6Pz/AlDjYJ7Y+yKfm1gU/3B0u04= 54github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea/go.mod h1:aOux3gHPCftJ3KHq6Pz/AlDjYJ7Y+yKfm1gU/3B0u04=
55golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
56golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
8golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= 57golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
9golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 58golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
59golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
60golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
61golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
62golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
63golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
64golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
65golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
66golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
67golang.org/x/tools v0.0.0-20190404132500-923d25813098/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
68gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
69gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
diff --git a/gopherproxy.go b/gopherproxy.go
index dc849d0..82215c5 100644
--- a/gopherproxy.go
+++ b/gopherproxy.go
@@ -14,6 +14,8 @@ import (
14 "github.com/temoto/robotstxt" 14 "github.com/temoto/robotstxt"
15 15
16 "github.com/prologic/go-gopher" 16 "github.com/prologic/go-gopher"
17
18 "github.com/gobuffalo/packr"
17) 19)
18 20
19type Item struct { 21type Item struct {
@@ -164,6 +166,23 @@ func RobotsTxtHandler(robotstxtdata []byte) http.HandlerFunc {
164 } 166 }
165} 167}
166 168
169func FontHandler(woff2 bool, fontdata []byte) http.HandlerFunc {
170 return func(w http.ResponseWriter, req *http.Request) {
171 if fontdata == nil {
172 http.Error(w, "Not Found", http.StatusNotFound)
173 return
174 }
175
176 if woff2 {
177 w.Header().Set("Content-Type", "font/woff2")
178 } else {
179 w.Header().Set("Content-Type", "font/woff")
180 }
181
182 w.Write(fontdata)
183 }
184}
185
167// ListenAndServe creates a listening HTTP server bound to 186// ListenAndServe creates a listening HTTP server bound to
168// the interface specified by bind and sets up a Gopher to HTTP 187// the interface specified by bind and sets up a Gopher to HTTP
169// proxy proxying requests as requested and by default will prozy 188// proxy proxying requests as requested and by default will prozy
@@ -194,6 +213,10 @@ func ListenAndServe(bind, robotsfile, uri string) error {
194 styletext = string(styledata) 213 styletext = string(styledata)
195 } 214 }
196 215
216 box := packr.NewBox("./assets")
217 fontdataw, err := box.Find("iosevka-term-ss03-regular.woff")
218 fontdataw2, err := box.Find("iosevka-term-ss03-regular.woff2")
219
197 tpldata, err := ioutil.ReadFile(".template") 220 tpldata, err := ioutil.ReadFile(".template")
198 if err == nil { 221 if err == nil {
199 tpltext = string(tpldata) 222 tpltext = string(tpldata)
@@ -212,7 +235,9 @@ func ListenAndServe(bind, robotsfile, uri string) error {
212 235
213 http.HandleFunc("/", GopherHandler(tpl, robotsdata, styletext, uri)) 236 http.HandleFunc("/", GopherHandler(tpl, robotsdata, styletext, uri))
214 http.HandleFunc("/robots.txt", RobotsTxtHandler(robotstxtdata)) 237 http.HandleFunc("/robots.txt", RobotsTxtHandler(robotstxtdata))
215 // http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets/")))) 238 http.HandleFunc("/iosevka-term-ss03-regular.woff", FontHandler(false, fontdataw))
239 http.HandleFunc("/iosevka-term-ss03-regular.woff2", FontHandler(true, fontdataw2))
240 //http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets/"))))
216 241
217 return http.ListenAndServe(bind, nil) 242 return http.ListenAndServe(bind, nil)
218} 243}
diff --git a/style.go b/style.go
index 94ef4c7..7e1bdb9 100644
--- a/style.go
+++ b/style.go
@@ -1,3 +1,3 @@
1package gopherproxy 1package gopherproxy
2 2
3var styletext = `body{margin:0;padding:0;background-color:#14171a;color:#cad1d8}.wrap{text-align:center}.content{display:inline-block;min-width:50em;min-width:85ch;margin:0;padding:2em 1em;text-align:left;font-family:'IBM Plex Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Droid Sans Mono', Monaco, Consolas, Courier, monospace;font-size:1em;line-height:1.5}::selection{color:#000;background-color:rgba(239,198,138,0.996)}:link{color:#fff}:visited{color:#cad1d8}.link-type{color:#929ba3}` 3var styletext = `@font-face{font-family:'Iosevka Term SS03';font-style:normal;font-weight:normal;src:url("/iosevka-term-ss03-regular.woff2") format("woff2"),url("/iosevka-term-ss03-regular.woff") format("woff")}body{margin:0;padding:0;background-color:#14171a;color:#cad1d8}.wrap{text-align:center}.content{display:inline-block;min-width:50em;min-width:85ch;margin:0;padding:2em 1em;text-align:left;font-family:'Iosevka Term SS03', 'IBM Plex Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Droid Sans Mono', Monaco, Consolas, Courier, monospace;font-size:1em;line-height:1.5}::selection{color:#000;background-color:rgba(239,198,138,0.996)}:link{color:#fff}:visited{color:#cad1d8}.link-type{color:#929ba3}`
diff --git a/template.go b/template.go
index 6e541e2..81730a6 100644
--- a/template.go
+++ b/template.go
@@ -14,7 +14,7 @@ var tpltext = `<!doctype html>
14<body> 14<body>
15<main class="wrap"> 15<main class="wrap">
16<pre class="content"> 16<pre class="content">
17{{if .Lines}}{{range .Lines}} {{if .Link}}<span class="link-type">({{.Type}})</span> <a class="link link-{{ .Type }}" href="{{.Link}}">{{.Text}}</a>{{else}} {{.Text}}{{end}} 17{{if .Lines}}{{range .Lines}} {{if .Link}}<span class="link-type"> {{.Type}} </span> <a class="link link-{{ .Type }}" href="{{.Link}}">{{.Text}}</a>{{else}} {{.Text}}{{end}}
18{{end}}{{else}}{{.RawText}}{{end}}</pre> 18{{end}}{{else}}{{.RawText}}{{end}}</pre>
19</main> 19</main>
20<script type="text/javascript"> 20<script type="text/javascript">