From 371fe326625c7594bffe660d1b738d2cd4211049 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 10 Jun 2023 10:46:30 +0200 Subject: [PATCH] Make old-doc headers easily configurable --- docs/source/_templates/layout.html | 26 ++++++++++++++++---------- docs/source/conf.py | 6 +++++- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index a79fff0ca0..aa4adc925b 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -169,22 +169,19 @@ {%- block body_tag %}{% endblock %} {%- block header %} + {% if current_is_legacy %} +
+

Note

+

You are reading an old version of the Evennia documentation. The latest version is here

. +
+ {% endif %} + {% endblock %} {%- block relbar1 %}{{ relbar() }}{% endblock %} {%- block content %} - {% if legacy_versions %} - {% if release in legacy_versions %} -
-

Note

-

You are reading an old version of this documentation.

-
- - {% endif %} - {% endif %} - {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
@@ -210,7 +207,16 @@ {%- block relbar2 %}{{ relbar() }}{% endblock %} {%- block footer %} + + {% if current_is_legacy %} +
+

Note

+

You are reading an old version of the Evennia documentation. The latest version is here

. +
+ {% endif %} +