From 9dd462320cf6ed896797da0c7a14e7cfa0c112ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Wed, 17 Aug 2022 00:23:07 +0200 Subject: [PATCH] 404 --- lib/PZ/Controller/Shortcut.pm | 2 +- templates/404.html.ep | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 templates/404.html.ep diff --git a/lib/PZ/Controller/Shortcut.pm b/lib/PZ/Controller/Shortcut.pm index 7f47f9c..e46d6c2 100644 --- a/lib/PZ/Controller/Shortcut.pm +++ b/lib/PZ/Controller/Shortcut.pm @@ -12,7 +12,7 @@ sub redirect ($c) { })->first; if ( ! $shortcut ) { - $c->render( status => 404, text => 'not found' ); + $c->render( '404', status => 404 ); return; } diff --git a/templates/404.html.ep b/templates/404.html.ep new file mode 100644 index 0000000..0d2525b --- /dev/null +++ b/templates/404.html.ep @@ -0,0 +1,5 @@ +% layout 'default'; + +<h1 class="head-alt-md md:head-alt-lg max-w-5xl mb-8">Zkratka "<%= $c->stash->{shortcut} %>" neexistuje</h1> + + -- GitLab