added initial favicon
This commit is contained in:
parent
799ff0fb2f
commit
6a2dc8146c
7 changed files with 39 additions and 7 deletions
|
|
@ -73,6 +73,9 @@ func staticHandler(ctx *Context) {
|
|||
err = ctx.Write(ctx.Srv.res["bootstrap.css"])
|
||||
case "/custom.css":
|
||||
err = ctx.Write(ctx.Srv.res["custom.css"])
|
||||
case "/favicon.ico":
|
||||
ctx.SetHeader("Content-Type", "image/x-icon")
|
||||
err = ctx.Write(ctx.Srv.res["favicon.ico"])
|
||||
}
|
||||
if err != nil {
|
||||
log.Println("static:", err)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ var routes = []route{
|
|||
indexHandler,
|
||||
[]string{"GET"},
|
||||
},
|
||||
{
|
||||
"/favicon.ico",
|
||||
staticHandler,
|
||||
[]string{"GET"},
|
||||
},
|
||||
{
|
||||
"/bootstrap.css",
|
||||
staticHandler,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue