Yablog-0.0.1.1: templates/article.hamlet
<ul .pager>
$maybe prev <- mprev
<li .previous>
<a href=@{articleLink prev}>
← #{makeSnippet 15 $ articleTitle prev}
$maybe next <- mnext
<li .next>
<a href=@{articleLink next}>
#{makeSnippet 15 $ articleTitle next} →
^{articleView Nothing article}
$if (not $ null trackbacks)
<h2>
<a name="trackbacks">
_{MsgTrackbacks}
<div>
Trackback URL:
<input type="url" value="#{render $ TrackbackR (YablogDay date) ident}">
<ul .trackbacks>
$forall t <- trackbacks
<li .trackback>
<a href="#{trackbackUrl t}">
#{fromMaybe (trackbackUrl t) $ trackbackTitle t}
$else
<h2>
<a name="trackbacks">
_{MsgNoTrackbacks}
<div>
Trackback URL:
<input type="url" value="#{render $ TrackbackR (YablogDay date) ident}">
$if (not $ null comments)
<h2>
<a name="comments">
_{MsgComments}
$forall c <- comments
<article .comment .well ##{commentAnchor c}>
<div .comment-body>
#{commentBody c}
<div .comment-desc>
<div .comment-author>
<i .icon-user>
#{commentAuthor c}
<div .comment-date>
<i .icon-calendar>
<a href="##{commentAnchor c}">
#{show $ commentCreatedAt c}
$else
<h2>
<a name="comments">
_{MsgNoComments}
$maybe (widget, enc) <- mCommentForm
<h2>_{MsgLeaveComment}
<form method=post action=@{CommentR (YablogDay date) ident} enctype=#{enc}>
^{widget}
<input type=submit>
<ul .pager>
$maybe prev <- mprev
<li .previous>
<a href=@{articleLink prev}>
← #{makeSnippet 15 $ articleTitle prev}
$maybe next <- mnext
<li .next>
<a href=@{articleLink next}>
#{makeSnippet 15 $ articleTitle next} →