-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from poopsicles/main
Add custom error pages
- Loading branch information
Showing
12 changed files
with
140 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Coding Conventions | ||
|
||
1. All files should end with a new line character. | ||
1. Python code should be formatted with [black](https://github.com/psf/black). | ||
1. Python code should be formatted with [ruff](https://github.com/astral-sh/ruff). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{ define "main" }} | ||
<main> | ||
<h1>404</h1> | ||
<h2>Page Not Found</h2> | ||
<p>The URL you requested does not exist on this blog. Got lost?</p> | ||
<p><a href="#" onclick="history.back();">← Go back</a> or return to the <a href="{{ .Site.Home.RelPermalink }}">homepage</a>.</p> | ||
</main> | ||
|
||
<footer> | ||
{{- with .Site.GetPage "/" }} | ||
{{- with .OutputFormats.Get "rss" }} | ||
<p> | ||
Subscribe via | ||
{{ printf `<a href=%q title=%q>RSS</a>.` .Permalink site.Title | safeHTML }} | ||
</p> | ||
{{- end }} | ||
{{- end }} | ||
</footer> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends 'index.html' %} | ||
|
||
{% block title %}404 — Page Not Found{% endblock title %} | ||
|
||
{% block content %} | ||
<main> | ||
<h1>404</h1> | ||
<h2>Page Not Found</h2> | ||
<p>The URL you requested does not exist on this blog. Got lost?</p> | ||
<p><a href="#" onclick="history.back();">← Go back</a> or return to the <a href="/">homepage</a>.</p> | ||
</main> | ||
<footer> | ||
Subscribe via <a href="/{{ config.feed_filename }}">RSS</a>. | ||
</footer> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}400 — Bad Request{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<h1>400</h1> | ||
<h2>Bad Request</h2> | ||
<p>You made a request in a way that we don't understand. That's all we know.</p> | ||
<p><a href="#" onclick="history.back();">← Go back</a> or return to the <a href="{% url 'index' %}">homepage</a>.</p> | ||
</main> | ||
|
||
{% include 'partials/error_webring.html' %} | ||
|
||
{% include 'partials/error_footer_blog.html' %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}403 — Permission Denied{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<h1>403</h1> | ||
<h2>Permission Denied</h2> | ||
<p>Looks like you tried to do something you're not allowed to. Oops?</p> | ||
<p><a href="#" onclick="history.back();">← Go back</a> or return to the <a href="{% url 'index' %}">homepage</a>.</p> | ||
</main> | ||
|
||
{% include 'partials/error_webring.html' %} | ||
|
||
{% include 'partials/error_footer_blog.html' %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}404 — Page Not Found{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<h1>404</h1> | ||
<h2>Page Not Found</h2> | ||
<p>The URL you requested does not exist on this blog. Got lost?</p> | ||
<p><a href="#" onclick="history.back();">← Go back</a> or return to the <a href="{% url 'index' %}">homepage</a>.</p> | ||
</main> | ||
|
||
{% include 'partials/error_webring.html' %} | ||
|
||
{% include 'partials/error_footer_blog.html' %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends 'main/layout.html' %} | ||
|
||
{% block title %}500 — Internal Server Error{% endblock %} | ||
|
||
{% block content %} | ||
<main> | ||
<h1>500</h1> | ||
<h2>Internal Server Error</h2> | ||
<p>An error occurred processing your request. That's all we know.</p> | ||
<p><a href="#" onclick="history.back();">← Go back</a> or return to the <a href="{% url 'index' %}">homepage</a>.</p> | ||
</main> | ||
|
||
{% include 'partials/error_webring.html' %} | ||
|
||
{% include 'partials/error_footer_blog.html' %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<footer> | ||
{{ request.blog_user.subscribe_note_as_html|safe }} | ||
|
||
{% if request.blog_user.footer_note %} | ||
{{ request.blog_user.footer_note_as_html|safe }} | ||
{% endif %} | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% if request.blog_user.webring_prev_url or request.blog_user.webring_url or request.blog_user.webring_next_url %} | ||
<section class="webring"> | ||
{% if request.blog_user.webring_prev_url %} | ||
<a href="{{ request.blog_user.webring_prev_url }}">← Previous</a> | ||
{% endif %} | ||
<div> | ||
{% if request.blog_user.webring_url %} | ||
○ | ||
<a href="{{ request.blog_user.webring_url }}" class="webring-name"> | ||
{{ request.blog_user.webring_name|default_if_none:'Webring' }} | ||
</a> | ||
{% else %} | ||
{{ request.blog_user.webring_name|default_if_none:'' }} | ||
{% endif %} | ||
</div> | ||
{% if request.blog_user.webring_next_url %} | ||
<a href="{{ request.blog_user.webring_next_url }}">Next →</a> | ||
{% endif %} | ||
</section> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters