Armed with a text editor

mu's views on program and recipe! design

#meta = manager.load_meta(document)
<div class="blog_entry" name="`&title`">
#if manager.command != 'atom':
<h2 class="title">`title` <span>Posted `date` (<a href="`link`">#</a>)</span></h2>
#pass
`body`
#if manager.command != 'atom':
#    if meta.get('categories'):
<div class="blog_categories">Categories:
#        for category in sorted(meta.get('categories', '').split()):
<a href="`manager.site`/category/`category`">`category`</a>
#        pass
</div>
#    pass
<div class="blog_trackbacks" name="trackbacks">
#    if meta['trackbacks_open'] or trackbacks:
<h3 id="trackbacks">Trackbacks:</h3>
#    if meta['trackbacks_open']:
<!--
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <rdf:Description
        rdf:about="`manager.uri`"
        dc:identifier="`manager.uri`"
        dc:title="`&title`"
        trackback:ping="`manager.uri + '?trackback'`" />
    </rdf:RDF>
-->
<h4 id="trackback_url">Trackback URL: `manager.uri + '?trackback'`</h4>
#    for trackback in trackbacks:
`manager.format_template('blog_trackback', trackback)`
#    pass
</div>
<div class="blog_comments" name="comments">
#    if comments:
<h3 id="comments">Comments:</h3>
#        for comment in comments:
`manager.format_template('blog_comment', comment)`
#    if preview:
<div class="blog_comment_preview" id="preview">
<b>Preview your comment:</b>
`manager.format_template('blog_comment', preview)`
#        if preview.get('name') and preview.get('email') and preview.get('comment'):
<form action="?comment#comments" method="post">
<input type="hidden" name="name" value="`&preview.get('name','')`"/>
<input type="hidden" name="email" value="`&preview.get('email','')`"/>
<input type="hidden" name="url" value="`&preview.get('url','')`"/>
<textarea style="display:none" name="comment">`&preview.get('comment','')`</textarea>
<input type="submit" name="save" value="Save Comment"/>
</form>
#        pass
</div>
#    if meta['comments_open']:
<h3>Add a comment</h3>
<form action="?comment#preview" method="post" class="blog_comment">
<table>
<tr><td>Name:</td><td><input type="text" name="name" value="`&preview.get('name','')`"/></td></tr>
<tr><td>URL (optional):</td><td><input type="text" name="url" value="`&preview.get('url','')`"/></td></tr>
<tr><td>Email (not shown):</td><td><input type="text" name="email" value="`&preview.get('email','')`"/></td></tr>
<tr><td>Comment:</td><td><textarea name="comment" rows="10" cols="35">`&preview.get('comment','')`</textarea></td></tr>
</table>
<input type="submit" name="preview" value="Preview"/>
</form>
<div id="help">Use [<a href="`manager.site`/wiki/WikiMarkup">WikiMarkup</a>] in your comment. <b>*bold*</b>, \*notbold\*, etc.</div>
#    pass
</div>
#pass
</div>