mirror of
https://github.com/nxshock/gron.git
synced 2025-07-01 00:13:36 +05:00
Switch to Roboto font
This commit is contained in:
parent
c952ded006
commit
b5afaea039
3 changed files with 19 additions and 2 deletions
BIN
font.ttf
Normal file
BIN
font.ttf
Normal file
Binary file not shown.
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
|
@ -11,12 +12,16 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//go:embed font.ttf
|
||||
var font []byte
|
||||
|
||||
func httpServer(listenAddress string) {
|
||||
if listenAddress == "none" {
|
||||
return
|
||||
}
|
||||
|
||||
http.HandleFunc("/", handler)
|
||||
http.HandleFunc("/font.ttf", handleFont)
|
||||
http.HandleFunc("/reloadJobs", handleReloadJobs)
|
||||
http.HandleFunc("/shutdown", handleShutdown)
|
||||
http.HandleFunc("/start", handleForceStart)
|
||||
|
@ -102,3 +107,9 @@ func handleReloadJobs(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||
}
|
||||
|
||||
func handleFont(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Content-Type", "font/ttf")
|
||||
w.Header().Add("Cache-Control", "public") // TODO
|
||||
w.Write(font)
|
||||
}
|
||||
|
|
10
index.htm
10
index.htm
|
@ -43,8 +43,14 @@
|
|||
--base0F: #be5046;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
src: url('/font.ttf');
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: Verdana;
|
||||
font-family: Roboto;
|
||||
|
||||
font-size: 14px;
|
||||
color: var(--base05);
|
||||
margin: 0;
|
||||
|
@ -112,7 +118,7 @@
|
|||
}
|
||||
|
||||
.smaller {
|
||||
font-size: 75%;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
.nowrap {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue