Attempt to reduce duplication in the docs nav bar

This commit is contained in:
MKLeb 2023-08-25 19:12:20 -04:00 committed by Pedro Algarvio
parent e9abf73960
commit 1cddd88ef5

View file

@ -2,10 +2,16 @@
<!DOCTYPE html>
{%- endblock %}
{% set xxx = rellinks.extend([
{%- set link_text = [] %}
{%- for link_tuple in rellinks %}
{%- set xxx = link_text.append(link_tuple[3]) %}
{%- endfor %}
{%- for rellink_add in [
('glossary', 'Glossary', 'g', 'Glossary'),
('contents', 'Table of Contents', 't', 'Table of Contents'),
]) %}
] %}
{%- if rellink_add[3] not in link_text %}{% set xxx = rellinks.append(rellink_add) %}{% endif %}
{%- endfor %}
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}