                [:br]])
              rs)))))
 
-(defn page-not-found []
-  "<h1>Page not found</h1>")
-
 (defroutes main-routes
   (GET "/" [] (last-games 25))
   (GET "/highscores" [] (highscores 25))

           [:div
            [:h2 name]
            [:p (:games_played row) " games played, " (:ascensions row) " ascensions."]
            [:br]
            [:a {:href (str "/user/" name "/dumps/")} "dumps"]
            [:br]
            [:a {:href (str "/user/" name "/ttyrecs/")} "ttyrecs"]]))))))
                                                                 
(defn users []
  (sql/with-connection db
    (sql/with-query-results

      [:a {:href (str base extension)} "dump #" (:id row)]
      [:div "No dump file for game " (:id row)])))


(defn rs-row-to-tr [row]
  [:tr
   [:td [:a {:href (str "/game/" (:id row))} (:id row)]]
   [:td [:a {:href (str "/user/" (:name row))} (:name row)]]
   [:td (:points row)]
   [:td (:turns row)]
   [:td (:deathdate row)]
   [:td [:a {:href (str "/cause/" (url-encode (:death_uniq row)))} (:death row)]]])

(defn rs-to-table [rs]
  [:table
   [:tr
    [:th "game"]
    [:th "name"]
    [:th "points"]
    [:th "turns"]
    [:th "deathdate"]
    [:th "death"]]
   (map #'rs-row-to-tr rs)])

(defn game [id]
  (sql/with-connection db
