)
$vcontent_scroll|(1,0,a)
$vcontent_scroll|(1,10px,a)
# Footer
$define(footer,a_content=) # Has fixed size or ratio
$footer|(b)
# ==========
# Form macros
# Text input
$define(tinput,a_id a_placeholder=
)
$tinput|(1,1)
# Text input with labels
$define(tinput_label,a_id a_placeholder a_label=
$a_label()
)
$tinput_label|(1,1,1)
# Number input
$define(ninput,a_id a_placeholder=
)
$ninput|(1,1)
# Number input with labels
$define(ninput_label,a_id a_placeholder a_label=
)
$swap_button_group|(id,Hello World,John doe)
# Swappable items
# second argument or target parent should be same with parent div, element or _contents id
$define(swap_item,a_id a_parent_id a_content=
)
$card|(id,title,content)
# Card with image
$define(card_img,a_id a_title a_image a_content=
$a_title()
$a_content()
)
$card|(id,src,title,content)
# collection, simply collection of aligned div items
# collection doesnt expand but srhik while list view can be expanded with scroll bars
# coll(id ,loopCount, content)
$define(coll,a_id a_count a_content=
)
$bot_right|(content)
# MISC
# There were too much things to modify I just forced full html tags bc, why not
$define(screen_touch,a_id a_content=
$a_content()
)
$screen_touch|(id,content)
# Sidebar
# Sidebar Left
$define(sidebar_left,a_id a_content=
$a_content()
)
$sidebar_left|(id,content)
# Sidebar Right
$define(sidebar_right,a_id a_content=
$a_content()
)
$sidebar_right|(id,content)
# ==========
# Style modifier
# Css tyle and js script can use this modifier html tag to modify
# element that comes next to the modifier
$define(style_next,a_mdf_classes=)
$style_next|(1,2,4,5,6)
# ==========
# Scripts
# Add callback for event
# Origin id, eventType, callbackMacro
$define(add_call,a_id a_event_type a_content
=addCallback("$a_id()", "$a_event_type()",(ev) => {$a_content()}))
# Add tooltip to element
$define(add_tooltip,a_id a_tooltip
=setProperties("$a_id()",{"data-bs-toggle":"tooltip","data-bs-placement":"top","title":"$a_tooltip()"}))
# Call alert function
# e.g. add_call(alert, click, call_alert(This is new text))
$define(call_alert,a_id
=alert("$a_id()"))
# Call element toggle function
$define(call_toggle,a_id=toggleElement("$a_id()"))
# Call sync value function, while this says value but it syncs text
$define(call_sync_text,a_id=syncText("$a_id()",ev))
# Go to url
$define(call_visit,a_id=window.location="$a_id()")
# Call specific event on target
$define(call_event,a_id a_event_type=triggerEvent("$a_id()" , "$a_event_type()"))
# Call update, or say set properties on target
$define(call_update,a_id a_prop_name a_prop_value=setProperties("$a_id()",{"$a_prop_name()" : "$a_prop_value()"}))
# Show Modal
$define(call_modal,a_id=callModal("$a_id()"))
# Show Modal
$define(hide_modal,a_id=hideModal("$a_id()"))
# Toggle sidebar
$define(call_sidebar,a_id=toggleSidebar("$a_id()"))
# Toggle floatmenu
$define(call_float_menu,a_id=toggleFloatMenu("$a_id()"))