{# To trigger whether the TOC and its button show up #}
{% set page_toc = generate_toc_html() %}
{# Start copy from buttons.html -#}
{# Utility macros we'll re-use below -#}
{% macro render_tooltip_metadata(tooltip, tooltip_placement) -%}
data-toggle="tooltip"
data-placement="{{ tooltip_placement }}"
title="{{ translate(tooltip) }}"
{%- endmacro %}
{% macro render_inner_html(icon, text) %}
{# used across multiple button types #}
{% if icon -%}
{% if icon.startswith("fa") -%}
{% else %}
{% endif -%}
{% endif %}
{%- if text %}{{ translate(text) }}{% endif -%}
{% endmacro %}
{% macro render_link_button(url, tooltip=None, icon=None, text=None, label=None, tooltip_placement="bottom") -%}
{{ render_inner_html(icon, text) }}
{% endmacro %}
{% macro render_js_button(javascript, tooltip=None, icon=None, text=None, label=None, tooltip_placement="bottom") %}
{% endmacro %}
{% macro render_label_input_button(for_input, tooltip=None, icon=None, text=None, label=None, tooltip_placement="bottom") -%}
{% endmacro %}
{# Modified from original buttons.html to add a text option -#}
{% macro render_button_group(buttons, icon=None, text=None, tooltip=None, label=None) %}