serve logo and favicon
This commit is contained in:
@@ -17,6 +17,7 @@ func main() {
|
|||||||
init_dav_client()
|
init_dav_client()
|
||||||
|
|
||||||
webserver.ServeLoginPage("/login")
|
webserver.ServeLoginPage("/login")
|
||||||
|
webserver.EnableLogoRoute()
|
||||||
webserver.ServeWebserver()
|
webserver.ServeWebserver()
|
||||||
|
|
||||||
// calDavData := get_caldav_data(serverConfig.Username, serverConfig.Password)
|
// calDavData := get_caldav_data(serverConfig.Username, serverConfig.Password)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 202 KiB |
@@ -11,6 +11,16 @@ func ServeLoginPage(route string) {
|
|||||||
ServeWebpage(route, loginHandler)
|
ServeWebpage(route, loginHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func EnableLogoRoute() {
|
||||||
|
ServeWebpage("/logo", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFile(w, r, "webserver/images/astraltech_logo.png")
|
||||||
|
})
|
||||||
|
|
||||||
|
ServeWebpage("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFile(w, r, "webserver/images/astraltech_favicon.png")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func ServeWebpage(url string, handler func(http.ResponseWriter, *http.Request)) {
|
func ServeWebpage(url string, handler func(http.ResponseWriter, *http.Request)) {
|
||||||
http.HandleFunc(url, handler)
|
http.HandleFunc(url, handler)
|
||||||
routes = append(routes, url)
|
routes = append(routes, url)
|
||||||
|
|||||||
Reference in New Issue
Block a user