{# 設定卡片組件 ============ 參數: - title: 卡片標題 - icon: 標題圖標 (可選) - card_id: 卡片 ID (可選) - content: 卡片內容 (使用 caller() 傳入) 使用方式: {% call settings_card(title="介面設定", icon="🎨") %} {% endcall %} #} {% macro settings_card(title, icon="", card_id="") %}

{% if icon %}{{ icon }} {% endif %}{{ title }}

{{ caller() }}
{% endmacro %} {# 設定項目組件 ============ 參數: - label: 設定項目標籤 - description: 設定項目描述 - is_last: 是否為最後一個項目 (影響邊框顯示) - control: 控制元件內容 (使用 caller() 傳入) 使用方式: {% call setting_item(label="自動關閉頁面", description="提交回饋後自動關閉頁面") %}
{% endcall %} #} {% macro setting_item(label, description="", is_last=false) %}
{{ label }}
{% if description %}
{{ description }}
{% endif %}
{{ caller() }}
{% endmacro %}