1
0
mirror of https://github.com/nxshock/gron.git synced 2024-11-27 03:41:00 +05:00

Switch to Roboto font

This commit is contained in:
nxshock 2022-03-28 20:35:55 +05:00
parent c952ded006
commit b5afaea039
3 changed files with 19 additions and 2 deletions

BIN
font.ttf Normal file

Binary file not shown.

View File

@ -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)
}

View File

@ -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 {