Browse Source
This was hard to follow because the translation was quite bad. The gist of was use 'throw-code' for quick and basic relay of error (using HTTP response codes) and use 'on-exception' method to generate a more involved HTML page to communicate the error (HTTP response code). At least, I think that was the take-away.master
Craig Oates
2 years ago
4 changed files with 124 additions and 2 deletions
@ -0,0 +1,9 @@
|
||||
{% extends "layouts/error.html" %} |
||||
{% block title %}{% lisp (title! "Bad Request") %}{% endblock %} |
||||
|
||||
{% block main %} |
||||
<h1>400 {% lisp (title!) %}</h1> |
||||
{% if alert %} |
||||
<p class="notice">{{alert}}</p> |
||||
{% endif %} |
||||
{% endblock %} |
@ -0,0 +1,7 @@
|
||||
{% extends "layouts/error.html" %} |
||||
|
||||
{% block title %} {% lisp (title! "Not Found") %} {% endblock %} |
||||
|
||||
{% block main %} |
||||
<h1>404 Not Found</h1> |
||||
{% endblock %} |
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title> |
||||
{% block title %}Title{% endblock %} |
||||
</title> |
||||
<link rel="stylesheet" media="all" href="/css/app.css"> |
||||
</head> |
||||
<body> |
||||
<div id="container"> |
||||
<header> |
||||
<img src="/images/lisplogo.svg" alt="Image alt text" width="800" height="400"> |
||||
<nav class="menubar"> |
||||
<a href="/">TOP</a> |
||||
</nav> |
||||
</header> |
||||
<main> |
||||
{% block main %}Main content here{% endblock %} |
||||
</main> |
||||
<footer> |
||||
{% include "shared/footer.html" %} |
||||
</footer> |
||||
</div> |
||||
</body> |
||||
</html> |
Loading…
Reference in new issue