summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--derelict.go5
-rw-r--r--view.tmpl2
2 files changed, 4 insertions, 3 deletions
diff --git a/derelict.go b/derelict.go
index 1c93399..1d49636 100644
--- a/derelict.go
+++ b/derelict.go
@@ -84,6 +84,7 @@ func handleRecent(w http.ResponseWriter, r *http.Request) {
}
func handleView(w http.ResponseWriter, r *http.Request) {
- id := mux.Vars(r)["id"]
- templates.ExecuteTemplate(w, "view", id)
+ battle := Battle{Id: mux.Vars(r)["id"]}
+ storage.LoadBattle(&battle)
+ templates.ExecuteTemplate(w, "view", &battle)
}
diff --git a/view.tmpl b/view.tmpl
index ddb88a0..035509c 100644
--- a/view.tmpl
+++ b/view.tmpl
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="/style.css">
-<title>{{.}} - Derelict</title>
+<title>{{.Name}} - Derelict</title>
<body>
<div id="wrapper">
<div id="container"></div>