aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-01-31 04:29:03 -0500
committerBobby <[email protected]>2023-01-31 04:29:03 -0500
commit16f9811f924b04276bb581a3dfab1016e68dbb54 (patch)
treeb4b93ce94f5282cbbf0e68d6d25facce642b8a66
parent23091e5e4fb09a38d93ed687e52fa3459b39acb8 (diff)
downloadthatcomputerscientist-16f9811f924b04276bb581a3dfab1016e68dbb54.tar.xz
thatcomputerscientist-16f9811f924b04276bb581a3dfab1016e68dbb54.zip
404 message based on `context.similar_posts` presence
-rw-r--r--templates/404.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html
index ff78fd06..455f1659 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -6,7 +6,11 @@
<div style="width: 500px; display: inline;">
{% if context.mode == 'article' %}
{% load random_numbers %}
+ {% if context.similar_posts %}
<img src="/static/images/site/errors/404/{% random_numbers 1 4 %}.gif" style="width: 500px;">
+ {% else %}
+ <img src="{% static 'images/site/errors/404/404.gif' %}" style="width: 500px;">
+ {% endif %}
<br><br>
<p>Hey! Skippy here! I am the 404 Assistant Bot for this site. Looks like you are trying to search an article, but I couldn't find the page. {% if context.similar_posts %}Maybe you are looking for one of these?{% endif %}</p>
<ul style="position: relative; left: 30px; top: 10px;">