Add AntiDrift favicon

This commit is contained in:
2026-06-01 19:09:37 -04:00
parent 895ad342c7
commit d95aed0111
5 changed files with 10 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

+2
View File
@@ -4,6 +4,8 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>AntiDrift</title> <title>AntiDrift</title>
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="stylesheet" href="/app.css"> <link rel="stylesheet" href="/app.css">
</head> </head>
<body> <body>
+6
View File
@@ -51,6 +51,12 @@ func (s *Server) Router() *gin.Engine {
r.GET("/app.js", func(c *gin.Context) { r.GET("/app.js", func(c *gin.Context) {
c.FileFromFS("/app.js", http.FS(sub)) c.FileFromFS("/app.js", http.FS(sub))
}) })
r.GET("/favicon.ico", func(c *gin.Context) {
c.FileFromFS("/favicon.ico", http.FS(sub))
})
r.GET("/favicon.png", func(c *gin.Context) {
c.FileFromFS("/favicon.png", http.FS(sub))
})
r.GET("/events", s.handleEvents) r.GET("/events", s.handleEvents)
r.POST("/planning", s.handlePlanning) r.POST("/planning", s.handlePlanning)
r.POST("/coach", s.handleCoach) r.POST("/coach", s.handleCoach)
+2
View File
@@ -215,6 +215,8 @@ func TestServesStaticAssets(t *testing.T) {
}{ }{
{"/app.css", "css"}, {"/app.css", "css"},
{"/app.js", "javascript"}, {"/app.js", "javascript"},
{"/favicon.ico", "image"},
{"/favicon.png", "image"},
} }
for _, tc := range cases { for _, tc := range cases {
req := httptest.NewRequest(http.MethodGet, tc.path, nil) req := httptest.NewRequest(http.MethodGet, tc.path, nil)