Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sass import *
- def make_template():
- css = VoidTag('link', None, (('href', 'style.css'), ('rel', 'stylesheet'), ('type', 'text/css')))
- content = None
- with Tag('div', None, (('id', 'root'),)) as root:
- with Tag('div', root, (('id', 'header'),)) as header:
- Content("Read Only", Tag('h1', header))
- Content("A Little Writer's Space", Tag('h2', header))
- with Tag('div', root, (('id', 'body'),)) as body:
- content = Tag('div', Tag('div', body, (('id', 'content-wrapper'),)), (('id', 'content'),))
- with Menu(Tag('div', body, (('id', 'menu'),)), Tag('div', None, (('class', 'link'),))) as menu:
- items = (('Home', 'index'), ('Stories', 'stories'), ('About', 'about'))
- for title, url in items:
- MenuItem(title, url, menu)
- Tag('div', body, (('class', 'clear'),))
- with Tag('div', root, (('id', 'footer'),)) as footer:
- Content("There's probably some copyright and reserved rights.\nIf you want to contact the webmaster, please check the ", footer)
- Content('About', InlineTag('a', footer, (('href', 'about.html'),)))
- Content(" page.", footer)
- return Template(root, content, menu, css)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement