add nicer 404 "not found" page

This commit is contained in:
Gered 2013-06-07 19:54:44 -04:00
parent d4f654a5e4
commit f1ee2329db
2 changed files with 16 additions and 1 deletions

View file

@ -5,6 +5,7 @@
blarg.routes.files
blarg.routes.rss
blarg.routes.accessrules
ring.middleware.head
compojure.core)
(:require [noir.util.middleware :as middleware]
[noir.response :as resp]
@ -16,7 +17,10 @@
(defroutes app-routes
(route/resources "/")
(route/not-found "Not Found"))
(wrap-head
(fn [request]
(->> (layout/render "notfound.html")
(resp/status 404)))))
(defn init
"init will be called once when

View file

@ -0,0 +1,11 @@
{% extends "blarg/views/templates/base.html" %}
{% block content %}
<div class="page-header">
<h2>Not Found</h2>
</div>
<p>That resource could not be found.</p>
{% endblock %}