19 lines
640 B
Plaintext
19 lines
640 B
Plaintext
<div class="post">
|
|
<div class="post-title">
|
|
<h1><%= @post.title %></h1>
|
|
</div>
|
|
<div class="post-info"><%= link_to @post.author.name, @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
|
|
<% if mod? %>
|
|
<%= link_to "edit", edit_blogpost_path(@post.id), class: "post-edit" %>
|
|
<% end %>
|
|
</div>
|
|
<div class="post-content">
|
|
<%= Sanitize.clean(GitHub::Markdown.render_gfm(@post.content), Sanitize::Config::RELAXED).html_safe %>
|
|
</div>
|
|
<div id="comments">
|
|
<% @post.comments.each do |c| %>
|
|
<%= render "comments/comment", :c => c %>
|
|
<% end %>
|
|
<%= render "comments/new" %>
|
|
</div>
|
|
</div> |