scribeengine/scribeengine/templates/blog/search.mako

34 lines
1.4 KiB
Mako

<%inherit file="/base.mako"/>
<%include file="/flash.mako"/>
<h2 class="title">Searching for: &quot;${c.querystring}&quot;</h2>
% if len(c.posts) > 0:
% for post in c.posts:
<div class="post">
<h3 class="title"><a href="${h.url_for_post(post)}">${post.title}</a></h3>
<div class="entry">
${h.literal(h.teaser(post.body))}
</div>
<p class="meta">
<span class="byline">Posted by ${post.user.nick} on ${post.created.strftime('%B %d, %Y')}</span>
<a href="${h.url_for_post(post)}" class="read-more">Read more</a>
% if len(post.comments) == 0:
<a href="${h.url_for_post(post)}#comments" class="comments">No comments</a>
% elif len(post.comments) == 1:
<a href="${h.url_for_post(post)}#comments" class="comments">1 comment</a>
% else:
<a href="${h.url_for_post(post)}#comments" class="comments">${len(post.comments)} comments</a>
% endif
</p>
</div>
% endfor
% else:
<div class="post"><p>Sorry, there seem to be no results for your search query.</p></div>
<h3>Search tips:</h3>
<ul>
<li>Words should be space-separated.</li>
<li>Use quotes (&quot;) to group phrases.</li>
<li>Use plus (+) to make words/phrases mandatory.</li>
<li>Use minus (-) to exclude posts with those words/phrases.</li>
</ul>
% endif