feat: add caskaydia cove nerd fonts
This commit is contained in:
+3
-3
@@ -3,7 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@@ -20,10 +19,11 @@ func main() {
|
|||||||
|
|
||||||
mux.HandleFunc("/", handlers.Index)
|
mux.HandleFunc("/", handlers.Index)
|
||||||
mux.HandleFunc("/css/", handlers.CSS)
|
mux.HandleFunc("/css/", handlers.CSS)
|
||||||
|
mux.HandleFunc("/fonts/", handlers.Fonts)
|
||||||
|
|
||||||
loggingMux := middleware.Logging(mux)
|
loggingMux := middleware.Logging(mux)
|
||||||
|
|
||||||
const addr = ":7777"
|
const addr = "localhost:7777"
|
||||||
|
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: addr,
|
Addr: addr,
|
||||||
@@ -31,7 +31,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
fmt.Printf("Starting server on %s\n", addr)
|
log.Printf("Server listening at http://%s\n", addr)
|
||||||
|
|
||||||
err := server.ListenAndServe()
|
err := server.ListenAndServe()
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'CaskaydiaCove NFM';
|
||||||
|
src: url('/fonts/CaskaydiaCoveNFM-Regular.eot');
|
||||||
|
src: url('/fonts/CaskaydiaCoveNFM-Regular.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('/fonts/CaskaydiaCoveNFM-Regular.woff2') format('woff2'),
|
||||||
|
url('/fonts/CaskaydiaCoveNFM-Regular.woff') format('woff'),
|
||||||
|
url('/fonts/CaskaydiaCoveNFM-Regular.svg#CaskaydiaCoveNFM-Regular') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
/* CSS Resets */
|
/* CSS Resets */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -39,6 +51,7 @@ table {
|
|||||||
/* Site Styles */
|
/* Site Styles */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
font-family: 'CaskaydiaCove NFM', monospace;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 6.4 MiB |
Binary file not shown.
Binary file not shown.
@@ -10,4 +10,6 @@ var (
|
|||||||
Templates embed.FS
|
Templates embed.FS
|
||||||
//go:embed "css/*"
|
//go:embed "css/*"
|
||||||
CSS embed.FS
|
CSS embed.FS
|
||||||
|
//go:embed "fonts/*"
|
||||||
|
Fonts embed.FS
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,3 +22,7 @@ func Index(w http.ResponseWriter, r *http.Request) {
|
|||||||
func CSS(w http.ResponseWriter, r *http.Request) {
|
func CSS(w http.ResponseWriter, r *http.Request) {
|
||||||
http.ServeFileFS(w, r, assets.CSS, r.URL.Path)
|
http.ServeFileFS(w, r, assets.CSS, r.URL.Path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Fonts(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFileFS(w, r, assets.Fonts, r.URL.Path)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user