♻️ refactor(series): simplify page_or_section logic

This commit is contained in:
welpo 2024-11-07 23:07:53 +01:00
parent 5c4ae35ef4
commit a07c234113
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6

View file

@ -1,9 +1,5 @@
{%- set page_or_section = page | default(value=section) -%}
{# Quick navigation buttons #}
{%- if page -%}
{%- set_global page_or_section = page -%}
{%- elif section -%}
{%- set_global page_or_section = section -%}
{%- endif -%}
{% if macros_settings::evaluate_setting_priority(setting="quick_navigation_buttons", page=page_or_section, default_global_value=false) == "true" %}
<div id="button-container">
{# Button to go show a floating Table of Contents #}