From c5a6699ce4ae79145651518d241c7b0ac7b38876 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 19 Feb 2014 01:35:59 +0100 Subject: Add file not found template --- hypo.hy | 2 +- templates/notfound.html | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 templates/notfound.html diff --git a/hypo.hy b/hypo.hy index 435a128..07d31cc 100755 --- a/hypo.hy +++ b/hypo.hy @@ -55,7 +55,7 @@ (defun no-such-file [] (setv web.ctx.status (str "404 Not Found")) - "No such file.\n") + (render.notfound)) (defun get-lexer [filename content] "Try to guess the correct lexer by FILENAME and CONTENT. diff --git a/templates/notfound.html b/templates/notfound.html new file mode 100644 index 0000000..52f3f40 --- /dev/null +++ b/templates/notfound.html @@ -0,0 +1,48 @@ +$# Hypo -- Quickly share stuff +$# Copyright (C) 2013 Tom Willemse +$# +$# Hypo is free software: you can redistribute it and/or modify it +$# under the terms of the GNU Affero General Public License as +$# published by the Free Software Foundation, either version 3 of the +$# License, or (at your option) any later version. +$# +$# Hypo is distributed in the hope that it will be useful, but WITHOUT +$# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +$# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General +$# Public License for more details. +$# +$# You should have received a copy of the GNU Affero General Public +$# License along with Hypo. If not, see . + + + + Hypo: Not Found + + + + + + +
+

No such file

+ +
+ The file you are looking for could not be found. +
+ + +
+ + -- cgit v1.2.3-54-g00ecf