From b32c51b71acc4ca345389a8e53c1aa899f738c07 Mon Sep 17 00:00:00 2001 From: David Lapshin Date: Tue, 21 May 2024 16:23:18 +0300 Subject: [PATCH] Make source_url and issues_url optional and adapt content if not set --- templates/404.html | 6 ++++-- templates/article.html | 4 +++- templates/partials/footer.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/404.html b/templates/404.html index 212fe7c..6d4b986 100644 --- a/templates/404.html +++ b/templates/404.html @@ -8,10 +8,12 @@

Page Not Found

-

The requested page could not be found. If you feel this is not normal, then you can create an issue on the issue tracker.

+

The requested page could not be found.{% if config.extra.issues_url %} If you feel this is not normal, then you can create an issue on the issue tracker.{% endif %}

Go Back - File an Issue + {% if config.extra.issues_url %} + File an Issue + {% endif %}

{% endblock content %} diff --git a/templates/article.html b/templates/article.html index 832af87..594df90 100644 --- a/templates/article.html +++ b/templates/article.html @@ -105,6 +105,8 @@

Go to Top - File an Issue + {% if config.extra.issues_url %} + File an Issue + {% endif %}

{% endblock content %} diff --git a/templates/partials/footer.html b/templates/partials/footer.html index 888d0cf..e7cff95 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -21,7 +21,7 @@

© {{ config.title }}, {{ now() | date(format="%Y") }}

{% endif %} - {% if config.extra.footer.show_source %} + {% if config.extra.source_url and config.extra.footer.show_source %}

Website source