haskellblog / src / templates / post.st

$pagestart(pagetitle=post.title)$
$metainfoline(divclass="metainfo";post=post;categories=categories)$
<h1 class="posttitle">$post.title$</h1>
<div class="post">
  $post.full:noescape()$
</div>

<div class="comments">
  <h1 id="comments">Comments <a class="anchor" href="#comments">&sect;</a></h1>
  $if(hasComments)$
    <div>
    $comments:{ $comment(comment=it)$ }$
    </div>
  $else$
    <p>No comments.</p>
  $endif$
</div>

$if(post.commentsOpen)$
  <div id="addcomment">
    <h1>Add comment</h1>
    $if(commentPreview)$
      <div class="commentpreview">
        <p>Comment preview:</p>
        $comment(comment=newComment)$
      </div>
    $endif$

    $if(commentAccepted)$
      <div class="accepted">
        Comment added, thank you.
      </div>
    $endif$

    $if(commentInvalid)$
      <div class="validationerror">
      <ul>
        $commentErrors:{ <li>$it.1$</li> }$
      </ul>
      </div>
    $endif$

    <form method="post" action="#addcomment">
      <table>
        <tr>
          <td>$nameLabel:noescape()$</td>
          <td>$nameWidget:noescape()$</td>
        </tr>
        <tr>
          <td>$emailLabel:noescape()$</td>
          <td>$mailWidget:noescape()$</td>
        </tr>
        <tr>
          <td>$formatLabel:noescape()$</td>
          <td>$formatWidget:noescape()$</td>
        </tr>
      </table>
      <div>$messageWidget:noescape()$</div>
      <div>
        <input type="submit" name="submit" value="Submit" />
        <input type="submit" name="preview" value="Preview" />
      </div>
    </form>
  </div>
$else$
  <hr />
  <p>Closed for comments.</p>
$endif$

$if(hasRelated)$
  <div class="related">
    <h1 id="related">Related: <a class="anchor" href="#related">&sect;</a></h1>
    <ul>
    $related:{
      <li><a href="$it.url$">$it.title$</a></li>
    }$
    </ul>
  </div>
$endif$
$pageend()$
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.