Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (57 sloc) 1.6 KB
---
filter:
- erb
---
<%# pass in a tag if it's a tag page so we can bold the tag %>
<% tag ||= '' -%>
<div class="post" id="<%= p.filename %>-posthead">
<div class="posthead" >
<% if p.title -%>
<h2 class="posttitle">
<% if displaycontents -%>
<%= link_to_page(p) %>
<% else -%>
<%= link_to( p.title, "#"+p.filename ) %>
<% end -%>
</h2>
<% end -%>
<% if prev != p.created_at.strftime('%Y%m%d') -%>
<%= tumblog_date(p.created_at) %>
<% end -%>
<div class="postmeta">
<span class="post-comment"><a href="<%= p.url %>#disqus_thread">Comments</a></span>&nbsp;
<span class="post-filed">
<%= "Tags: " if p.tags %>
<%= p.tags.collect{ |t|
if t==tag
"<u><a href='/tags/"+t+".html'><strong>"+t+"</strong></a></u>"
else
"<a href='/tags/"+t+".html'>"+t+"</a>"
end
}.join(", ") if p.tags %>
</span>
</div>
</div> <!-- end posthead -->
<div class="postcontents" id="<%= p.filename %>-content" <%= "style=\"display:none\"" if !displaycontents %> >
<% if c == '' -%>
<% render(p) unless p.excerpt -%>
<% if p.excerpt -%>
<%= RedCloth.new(p.excerpt).to_html%>
<div class="readmore"><a href='<%= p.url %>'>Read more...</a></div>
<% else -%>
<%= render(p) %>
<% end -%>
<% else -%>
<%= c %>
<% end -%>
<% if !displaycontents -%>
<script type="text/javascript">
//<![CDATA[
$('#<%= p.filename %>-posthead').click(function(){
$('#<%= p.filename %>-content').slideToggle('slow');
});
//]]>
</script>
<% end -%>
</div>
</div>