Skip to content

Commit

Permalink
added favicon.ico
Browse files Browse the repository at this point in the history
  • Loading branch information
tux21b committed Apr 7, 2012
1 parent e39d65e commit 3dc8d35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions chess.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="Play chess with Go, HTML5, WebSockets and random strangers!" />
<link rel="stylesheet" type="text/css" href="/chess.css" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<script type="text/javascript" src="chess.js"></script>
<link href='http://fonts.googleapis.com/css?family=Oleo+Script:700' rel='stylesheet' type='text/css'>
</head>
Expand Down
Binary file added favicon.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ var tmpl = template.Must(template.ParseFiles("chess.html"))

// Serve the index page.
func handleIndex(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
http.Error(w, "Not Found", http.StatusNotFound)
return
}
if err := tmpl.Execute(w, r.Host); err != nil {
log.Printf("tmpl.Execute: %v", err)
}
Expand Down Expand Up @@ -207,6 +211,7 @@ func main() {
http.HandleFunc("/chess.js", handleFile("chess.js"))
http.HandleFunc("/chess.css", handleFile("chess.css"))
http.HandleFunc("/bg.png", handleFile("bg.png"))
http.HandleFunc("/favicon.ico", handleFile("favicon.ico"))
http.Handle("/ws", websocket.Handler(handleWS))

go hookUp()
Expand Down

0 comments on commit 3dc8d35

Please sign in to comment.