def alert_factory(is_long, title, *content): ''' Returns the HTML code for a generic alert message. Really only to be used internally, use alert() or long_alert() ''' return classed_div(ALERT_CLASS, *content, prepend=[classed_button(CLOSE_CLASS, { "type": BUTTON_CLASS, "data-dismiss": ALERT_CLASS }, "x" ), strong(title) if is_long else h4(title)], )
def alert_factory(is_long, title, *content): ''' Returns the HTML code for a generic alert message. Really only to be used internally, use alert() or long_alert() ''' return classed_div( ALERT_CLASS, *content, prepend=[ classed_button(CLOSE_CLASS, { "type": BUTTON_CLASS, "data-dismiss": ALERT_CLASS }, "x"), strong(title) if is_long else h4(title) ], )
def caret_button(): """ Returns the HTML code for a caret indicating a dropdown/dropup menu. """ return classed_button([BUTTON_CLASS, DROPDOWN_TOGGLE_CLASS], toggle(DROPDOWN_CLASS), classed_span("caret"))
def zm_button(text): ''' Returns the HTML code for a Twitter Bootstrap-ready button. ''' return classed_button(BUTTON_CLASS, *content)
def caret_button(): ''' Returns the HTML code for a caret indicating a dropdown/dropup menu. ''' return classed_button([BUTTON_CLASS, DROPDOWN_TOGGLE_CLASS], toggle(DROPDOWN_CLASS), classed_span("caret"))