zoom.html module¶
zoom.html
-
zoom.html.a(content, *args, **kwargs)¶ generate an anchor tag
>>> a('home', href='/home') '<a href="/home">home</a>'
-
zoom.html.div(*content, **kwargs)¶ generates an HTML div tag
Content can be any number of items that support str conversion. Named arguments are used as tag attributes for the div tag.
>>> div('some content') '<div>some content</div>'
>>> div('some', ' content') '<div>some content</div>'
>>> div('') '<div></div>'
>>> div(Class='header') '<div class="header"></div>'
-
zoom.html.glyphicon(icon, **kwargs)¶ generates a glpyhicon span
>>> glyphicon('heart') '<span aria-hidden="true" class="glyphicon glyphicon-heart"></span>'
>>> glyphicon('heart', Class="special") '<span aria-hidden="true" class="glyphicon glyphicon-heart special"></span>'
>>> t = ( ... '<span aria-hidden="true" class="glyphicon ' ... 'glyphicon-heart special" style="color:red"></span>' ... ) >>> glyphicon('heart', Class="special", style="color:red") == t True
-
zoom.html.h1(text)¶ h1 tag
>>> h1('my heading') '<h1>my heading</h1>'
-
zoom.html.h2(text)¶ h2 tag
>>> h2('my subheading') '<h2>my subheading</h2>'
-
zoom.html.h3(text)¶ h3 tag
>>> h3('my subsubheading') '<h3>my subsubheading</h3>'
-
zoom.html.img(src, **kwargs)¶ HTML Image Tag
>>> img('/static/images/no_image.png', typed='standard-image') '<img src="/static/images/no_image.png" type="standard-image" />'
-
zoom.html.input(*args, **kwargs)¶
-
zoom.html.li(items)¶ generate list items
>>> li(['this','that']) '<li>this</li><li>that</li>'
-
zoom.html.ol(items)¶ generate an ordered list
>>> ol(['this','that']) '<ol><li>this</li><li>that</li></ol>'
-
zoom.html.pre(content)¶
-
zoom.html.span(content='', **kwargs)¶ generates an div tag
>>> span('some content') '<span>some content</span>'
>>> span('') '<span></span>'
>>> span(Class='header') '<span class="header"></span>'
-
zoom.html.table(rows)¶ returns rows wrapped in an HTML table
-
zoom.html.tag(element, *args, **kwargs)¶ generates an HTML tag
>>> tag('div', 'some content', classed='content-card') '<div class="content-card">some content</div>'
>>> tag('a', href='http://www.google.com') '<a href="http://www.google.com"></a>'
-
zoom.html.ul(items)¶ generate an unordered list
>>> ul(['this','that']) '<ul><li>this</li><li>that</li></ul>'