{% endmacro %}
{# Determine whether or not to use the hover ToC #}
{% set use_hover_toc = not theme_toc_global and theme_toc_hover %}
{% if use_hover_toc and theme_navbar_left_links|length != 0 %}
{# Extract active navbar entries #}
{% set dropdown_link = theme_navbar_left_links|selectattr("active") | map(attribute="name") | list %}
{% endif %}
{% if use_hover_toc and dropdown_link|length == 0 %}
{# The project wordmark provides a hover TOC #}
{{ hover_toc(wordmark(), pathto(theme_navbar_home_link, 1), "navbar-brand") }}
{% else %}
{{ wordmark() }}
{% endif %}
{% if theme_toc_global %}
{% endif %}
{% for link in theme_navbar_left_links %}
{% if link.active %}
{% if link.name in dropdown_link %}
{# The active navbar link provides a hover TOC #}
{{ hover_toc(link.name, link.href, "", True) }}
{% else %}