Пример #1
0
 def site_root():
     return [
         html.doctype('html'),
         html.html(
             html.head(),
             html.body(
                 g.blocks['body']
             )
         )
     ]
Пример #2
0
def test_nested_indentating():
    elements = [
        html.doctype('html'),
        html.html(lang='en', class_='no-js')(
            html.head(
                html.title('Hello')
            ),
            html.body(
                html.comment(' Body starts here '),
                html.p('Hello World!')
            )
        )
    ]

    assert render(elements) == """<!doctype html>
Пример #3
0
 def site_root():
     return [
         html.doctype('html'),
         html.html(
             html.head(
                 html.has_attr('description')(
                     html.meta(content=Attr('description'))
                 ),
                 html.has_attr('author')(
                     html.meta(content=Attr('author'))
                 )
             ),
             html.body()
         )
     ]