favicon
This commit is contained in:
parent
ff9c3e7f77
commit
d8c7ec2295
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -15,6 +15,7 @@ import (
|
|||
"github.com/dballard/transmet/news"
|
||||
"bytes"
|
||||
txtTemplate "text/template"
|
||||
"path"
|
||||
)
|
||||
|
||||
func GetFlashes(session *sessions.Session) map[string]interface{} {
|
||||
|
@ -250,10 +251,18 @@ func addedHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
|
|||
ShowTemplate("added", w, map[string]interface{}{"user": user, "flashes": flashes})
|
||||
}
|
||||
|
||||
|
||||
|
||||
func ServeFileHandler(res http.ResponseWriter, req *http.Request) {
|
||||
fname := path.Base(req.URL.Path)
|
||||
http.ServeFile(res, req, "./"+fname)
|
||||
}
|
||||
|
||||
func init_route_handlers() {
|
||||
http.Handle("/js/", http.StripPrefix("/js/", http.FileServer(http.Dir("js/"))))
|
||||
http.Handle("/css/", http.StripPrefix("/css/", http.FileServer(http.Dir("css/"))))
|
||||
http.Handle("/fonts/", http.StripPrefix("/fonts", http.FileServer(http.Dir("fonts/"))))
|
||||
http.HandleFunc("/favicon.ico", ServeFileHandler)
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
<link href="/css/template.css" rel="stylesheet">
|
||||
<link href="/css/signin.css" rel="stylesheet">
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
Loading…
Reference in New Issue