Skip to content

Commit

Permalink
Organize the ui/ subdirectory. Add static handler to serve contents from
Browse files Browse the repository at this point in the history
/ui/static.
  • Loading branch information
tstromberg committed Oct 8, 2013
1 parent 2c4d441 commit 76ac809
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ui/index.html → ui/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta name="author" content="">

<title>namebench (v2 alpha)</title>
<link href="bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link href="menu.css" rel="stylesheet">
<link href="/static/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link href="/static/index.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</head>

Expand Down
3 changes: 2 additions & 1 deletion ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ const (
)

var (
indexTmpl = loadTemplate("ui/index.html")
indexTmpl = loadTemplate("ui/templates/index.html")
)

// RegisterHandler registers all known handlers.
func RegisterHandlers() {
http.HandleFunc("/", Index)
http.Handle("/static/", http.StripPrefix("/static", http.FileServer(http.Dir("ui/static"))))
http.HandleFunc("/submit", Submit)
}

Expand Down

0 comments on commit 76ac809

Please sign in to comment.