def long_error_alert(title, *content): ''' Returns the HTML code for a long, red error message. ''' return long_alert( title, *extract_attributes(classes(ALERT_ERROR_CLASS), *content) )
def long_info_alert(title, *content): ''' Returns the HTML code for a long, light-blue info message. ''' return long_alert( title, *extract_attributes(classes(ALERT_INFO_CLASS), *content) )
def long_success_alert(title, *content): ''' Returns the HTML code for a long, green success message. ''' return long_alert( title, *extract_attributes(classes(ALERT_SUCCESS_CLASS), *content) )
def media(img_url, title, link_url, *content): ''' Returns the HTML for a basic formatter for a "media object" like a video or something. It kind of looks like a Facebook post. ''' return classed_div(MEDIA_CLASS, *media_content(img_url, title, link_url, *content ) def media_list(*content): ''' A list that handles media items (even nested!) gracefully. Use media_list_item to generate them. ''' return classed_ul(MEDIA_LIST_CLASS, *content) def media_list_item(img_url, title, link_url, *content): ''' A single list item in a media list (see media_list() for something that is designed to gracefully hold them). ''' return classed_li(MEDIA_CLASS, *media_content(img_url, title, link_url, *content) ) def media_content(img_url, title, link_url, *content): ''' Returns the content to a media block. Should only be used internally, use media() or media_list() + media_list_item(). ''' return [ classed_a(PULL_LEFT, href(link_url), img({"src": img_url, "class": MEDIA_OBJECT_CLASS}) ), classed_div(MEDIA_BODY_CLASS, h4(classes(MEDIA_HEADING_CLASS), title), *content ) ]
def pills(*content): ''' Returns the HTML code for a set of "pill" navigaiton elements using the set of given tabs. ''' return generic_nav(classes(NAV_PILLS_CLASS), *content)
def small_pagination(*content): ''' Returns the HTML for a small pagination element. Fill with an unordered list to display properly. ''' return pagination(classes(PAGINATION_SMALL_CLASS), *content)
def mini_pagination(*content): ''' Returns the HTML for a tiny pagination element. Fill with an unordered list to display properly. ''' return pagination(classes(PAGINATION_MINI_CLASS), *content)
def important_label(*content): ''' Returns the HTML code for a red AHHHHHHHHH! label. ''' return default_label(classes(LABEL_IMPORTANT_CLASS), *content)
def large_pagination(*content): ''' Returns the HTML for a huge pagination element. Fill with an unordered list to display properly. ''' return pagination(classes(PAGINATION_LARGE_CLASS), *content)
def long_error_alert(title, *content): ''' Returns the HTML code for a long, red error message. ''' return long_alert( title, *extract_attributes(classes(ALERT_ERROR_CLASS), *content))
def vertical_button_group(*content): ''' Returns the HTML code for a vertical button group that contains the given buttons. ''' return button_group(classes(BUTTON_GROUP_CLASS), *content)
def info_badge(*content): ''' Returns the HTML code for a light blue info badge. ''' return default_badge(classes(BADGE_INFO_CLASS), *content)
def inverse_badge(*content): ''' Returns the HTML code for a black badge with a white number. ''' return default_badge(classes(BADGE_INVERSE_CLASS), *content)
def warning_badge(*content): ''' Returns the HTML code for an orange warning badge. ''' return default_badge(classes(BADGE_WARNING_CLASS), *content)
def important_badge(*content): ''' Returns the HTML code for a red AHHHHHHHHH! badge. ''' return default_badge(classes(BADGE_IMPORTANT_CLASS), *content)
def success_badge(*content): ''' Returns the HTML code for a successfully-green coloured badge. ''' return default_badge(classes(BADGE_SUCCESS_CLASS), *content)
def inverse_label(*content): ''' Returns the HTML code for a black label with white text. ''' return default_label(classes(LABEL_INVERSE_CLASS), *content)
def info_label(*content): ''' Returns the HTML code for a light blue info label. ''' return default_label(classes(LABEL_INFO_CLASS), *content)
def stacked(): return classes(NAV_STACKED_CLASS)
def success_label(*content): ''' Returns the HTML code for a successfully-green coloured label. ''' return default_label(classes(LABEL_SUCCESS_CLASS), *content)
def long_success_alert(title, *content): ''' Returns the HTML code for a long, green success message. ''' return long_alert( title, *extract_attributes(classes(ALERT_SUCCESS_CLASS), *content))
def long_info_alert(title, *content): ''' Returns the HTML code for a long, light-blue info message. ''' return long_alert(title, *extract_attributes(classes(ALERT_INFO_CLASS), *content))
def warning_label(*content): ''' Returns the HTML code for an orange warning label. ''' return default_label(classes(LABEL_WARNING_CLASS), *content)