Source

haskellblog / src / templates / post.st

Full commit
Luke Plant 5626918 
Luke Plant 84786d2 
Luke Plant 97c0958 
Luke Plant 5626918 
Luke Plant 3558136 
Luke Plant 5626918 

















Luke Plant 9b6c8a2 
Luke Plant 5626918 










Luke Plant 49a0a85 
Luke Plant 5626918 


Luke Plant fbbb971 
Luke Plant 5626918 

Luke Plant 126cf66 

Luke Plant 5626918 

Luke Plant 126cf66 

Luke Plant 5626918 

Luke Plant 126cf66 
Luke Plant 3558136 
Luke Plant 5626918 

Luke Plant 126cf66 


Luke Plant c797d00 
Luke Plant c24d4c8 



Luke Plant 379fc75 

Luke Plant f518518 
Luke Plant 379fc75 

Luke Plant c797d00 
Luke Plant 5626918 








Luke Plant 26f1d0e 
Luke Plant 5626918 



Luke Plant c24d4c8 
Luke Plant 5626918 

$pagestart(pagetitle=post.title)$
$metainfoline(divclass="metainfo";post=post;categories=categories)$
<h1 class="posttitle" id="top">$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)$
      $displayerrors(errors=commentErrors)$
    $endif$

    <form method="post" action="#addcomment">
    $csrffield:noescape()$
      <table>
        <tr>
          <td><label for="id_name">Name:</label></td>
          <td><input type="text" name="name" value="$commentData.name$" id="id_name" maxlength="100" size="20" /></td>
        </tr>
        <tr>
          <td><label for="id_email">Email:</label></td>
          <td><input type="text" name="email" value="$commentData.email$" id="id_email" maxlength="320" size="20" /></td>
        </tr>
        <tr>
          <td>Format:</td>
          <td>$formatWidget:noescape()$</td>
        </tr>
      </table>

      <div><textarea name="message" id="id_message" cols="80" rows="25">$commentData.text_raw$</textarea></div>
      <div><input type="hidden" id="id_spamcheck" name="spamcheck" value="$commentExtra$">
      </div>
      <div>
        <input type="submit" name="submit" value="Submit" />
        <input type="submit" name="preview" value="Preview" />
      </div>
      <div class="note">
      <ul>
        <li>Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!</li>
        <li>I reserve the right to moderate comments.</li>
      </ul>
      </div>
    </form>
  </div>
$else$
  <hr />
  <p>Closed for comments.</p>
$endif$

$if(hasRelated)$
  <div class="related">
    <h1 id="related">Possibly related: <a class="anchor" href="#related">&sect;</a></h1>
    <ul>
    $related:{
      <li><a href="$it.url$">$it.title$</a></li>
    }$
    </ul>
  </div>
$endif$
$pageend()$