{#
macros/interactive.html - Interactive UI component macros for APEP.
Import with: {% from "apep/macros/interactive.html" import btn, hero_btn, download_btn,
theme_switch, toast_container %}
Macros:
btn(label, variant, size, url, disabled)
hero_btn(label, url, subtitle, variant)
download_btn(label, file_path, variant)
theme_switch(variant, position)
toast_container(position)
Author: sora7672
#}
{% from "apep/macros/helper.html" import alert %}
{#
Renders a button or anchor using the APEP color component attribute system.
No CSS classes. Colors via bgcolor/txtcolor/bordercolor from base_color_components.css.
Hover via bgcolor-hover/txtcolor-hover/bordercolor-hover - no JS needed.
Variants:
primary - yellow bg, dark text on hover darkens
secondary - blue bg, light cream text, hover darkens
ghost - transparent bg + blue border, hover fills blue
danger - red bg, light text, hover darkens
@param label {string} - button text
@param variant {string} - "primary" | "secondary" | "ghost" | "danger", default "primary"
@param size {string} - "sm" | "md" | "lg", default "md"
@param url {string} - renders as when set and not disabled. Optional.
@param disabled {bool} - disables interaction. Forces