Example #1
0
        ), id='sidebar', width='38%', float='left'
    )
    main = Group(components=(
        Header(Text('Header of the page', fontsize=50, color='red')),
        Article(Text('This is a text. ' * 40)),
        Header(Text('Another header')),
        Article(Text('This is another text. ' * 20)),
        ), id='main', width='60%', float='left'
    )
    contact = Group(components=(
        Header(Text('Contact', fontsize=50), name='Contact'))
    )
    components = (
        Page(name='index', components=(main, sidebar), style=style),
        Page(name='contact', components=(contact, sidebar), style=style)
    )
    t = Theme(components)
    hb = HtmlBuilder()
    for page in t.pages:
        page.build(hb) # Clear the builder and build the HTML for page
        hb.save('/Library/WebServer/Documents/xierpa3/%s.html' % page.name)
        print hb.getResult()
        print
        print

    sb = SassBuilder()
    t.build(sb)
    sb.save('/Library/WebServer/Documents/xierpa3/style.scss')
    print sb.getResult()