{# ============================================ Help System Macros Reusable tooltip and help panel components ============================================ #} {# --------------------------------------------- TOOLTIP MACRO Wraps text with hover tooltip Parameters: - label: The visible text to display - tip: The tooltip text shown on hover - position: 'top' (default), 'right', 'left', 'bottom' --------------------------------------------- #} {% macro tooltip(label, tip, position='top') %} {{ label }} {%- endmacro %} {# --------------------------------------------- LABEL WITH TOOLTIP MACRO Renders a label where the text itself has a tooltip Parameters: - label_text: The label text (will have tooltip on hover) - tooltip_text: The tooltip text shown on hover - for_id: The ID of the input (for label's 'for' attribute) - position: Tooltip position --------------------------------------------- #} {% macro label_with_tooltip(label_text, tooltip_text, for_id=none, position='top') %} {%- endmacro %} {# --------------------------------------------- HELP PANEL MACRO Renders a collapsible help panel Parameters: - panel_id: Unique ID for the panel - title: Panel title - icon: FontAwesome icon (default: 'question-circle') - collapsed: Start collapsed (default: true) - dismissible: Show "don't show again" option (default: false) Usage: {% call help_panel('research-how', 'How Research Works') %}
Your content here...
{% endcall %} --------------------------------------------- #} {% macro help_panel(panel_id, title, icon='question-circle', collapsed=true, dismissible=false) %}{{ description }}
{{ description }}