add nicer 404 "not found" page
This commit is contained in:
parent
d4f654a5e4
commit
f1ee2329db
|
@ -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
|
||||
|
|
11
src/blarg/views/templates/notfound.html
Normal file
11
src/blarg/views/templates/notfound.html
Normal 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 %}
|
Reference in a new issue