Skip to content
Permalink
Browse files

use the Go font family

Regenerate assets.
  • Loading branch information...
dmitshur committed Aug 11, 2019
1 parent 7f138b4 commit eaea7fe50113267180db114f5753c8f446d3dcdc
@@ -1,5 +1,5 @@
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: Go;
font-size: 14px;
line-height: 1.428571429;
margin: 0px;
@@ -68,6 +68,7 @@ li:hover .highlight-on-hover {
}

.commitID {
font-family: "Go Mono";
background-color: rgb(238, 238, 238);
padding: 1px 4px;
}

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,8 @@
package assets

import "github.com/shurcooL/gofontwoff"

var (
// Fonts contains the Go font family in Web Open Font Format.
Fonts = gofontwoff.Assets
)
@@ -54,6 +54,7 @@ func componentHandler(w http.ResponseWriter, req *http.Request) error {
_, err := io.WriteString(w, `<html>
<head>
<title>Go Package Store</title>
<link href="/assets/fonts/fonts.css" rel="stylesheet" type="text/css" />
<link href="/assets/style.css" rel="stylesheet" type="text/css" />
<script async src="/assets/component/component.js" type="text/javascript"></script>
</head>
@@ -11,6 +11,7 @@ import (
var headHTML = template.Must(template.New("").Parse(`<html>
<head>
<title>Go Package Store</title>
<link href="/assets/fonts/fonts.css" rel="stylesheet" type="text/css" />
<link href="/assets/style.css" rel="stylesheet" type="text/css" />
<script async src="/frontend.js" type="text/javascript"></script>
{{if .Production}}<script type="text/javascript">
@@ -81,9 +81,11 @@ func main() {
}
http.Handle("/api/updates", errorHandler(updatesHandler))
http.Handle("/updates", errorHandler(indexHandler))
fileServer := httpgzip.FileServer(assets.Assets, httpgzip.FileServerOptions{ServeError: httpgzip.Detailed})
http.Handle("/assets/", fileServer)
http.Handle("/frontend.js", fileServer)
assetsFS := httpgzip.FileServer(assets.Assets, httpgzip.FileServerOptions{ServeError: httpgzip.Detailed})
http.Handle("/assets/", assetsFS)
http.Handle("/frontend.js", assetsFS)
fontsFS := httpgzip.FileServer(assets.Fonts, httpgzip.FileServerOptions{ServeError: httpgzip.Detailed})
http.Handle("/assets/fonts/", http.StripPrefix("/assets/fonts", fontsFS))

// Start listening first.
listener, err := net.Listen("tcp", *httpFlag)

0 comments on commit eaea7fe

Please sign in to comment.
You can’t perform that action at this time.