Add AntiDrift favicon
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
@@ -4,6 +4,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -51,6 +51,12 @@ func (s *Server) Router() *gin.Engine {
|
||||
r.GET("/app.js", func(c *gin.Context) {
|
||||
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.POST("/planning", s.handlePlanning)
|
||||
r.POST("/coach", s.handleCoach)
|
||||
|
||||
@@ -215,6 +215,8 @@ func TestServesStaticAssets(t *testing.T) {
|
||||
}{
|
||||
{"/app.css", "css"},
|
||||
{"/app.js", "javascript"},
|
||||
{"/favicon.ico", "image"},
|
||||
{"/favicon.png", "image"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
req := httptest.NewRequest(http.MethodGet, tc.path, nil)
|
||||
|
||||
Reference in New Issue
Block a user