diff options
author | Alan Pearce | 2024-05-29 16:01:03 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-29 16:01:03 +0200 |
commit | 99423f57f79499f13d021970c1efb4529072006b (patch) | |
tree | aab3b0280ba6eabddb8ce8589538f9efb080a271 /templates/nav.html | |
parent | dea01a9d2d2853af740aff8d11f573a70e7c4962 (diff) | |
download | zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.tar.lz zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.tar.zst zola-bearblog-99423f57f79499f13d021970c1efb4529072006b.zip |
improve whitespace generation in output files
Diffstat (limited to 'templates/nav.html')
-rw-r--r-- | templates/nav.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/templates/nav.html b/templates/nav.html index ba9f543..47a4254 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -1,17 +1,17 @@ -{% set current_lang = config.default_language %} -{% if page %} - {% set current_lang = page.lang %} -{% elif section %} - {% set current_lang = section.lang %} -{% endif %} +{%- set current_lang = config.default_language %} +{%- if page %} + {%- set current_lang = page.lang %} +{%- elif section %} + {%- set current_lang = section.lang %} +{%- endif %} {%- if config.extra.main_menu %} {%- for item in config.extra.main_menu %} - {% if current_lang == config.default_language %} - {% set title = item.name %} - {% else %} - {% set language_key = 'name_' ~ current_lang %} - {% set title = item[language_key] %} - {% endif %} + {%- if current_lang == config.default_language %} + {%- set title = item.name %} + {%- else %} + {%- set language_key = 'name_' ~ current_lang %} + {%- set title = item[language_key] %} + {%- endif %} {%- if item.url is matching("https?://") %} <a href="{{ item.url }}">{{ title }}</a> {%- else %} |