This commit is contained in:
jomo
2013-10-09 22:06:36 +02:00
parent 292e1ae4bb
commit d4fb20d8c6
7 changed files with 77 additions and 18 deletions

View File

@@ -7,11 +7,11 @@
<%= link_to pluralize(p.comments.count, "Comment"), p %>
</span>
</div>
<span class="post-info">
<div class="post-info">
by <%= link_to p.author.name, p.author %> on <%= p.created_at.strftime("%e. %b %Y") %>
</span>
</div>
<div class="post-content">
<%= GitHub::Markdown.render_gfm(Sanitize.clean(p.content, Sanitize::Config::RESTRICTED)).html_safe %>
<%= Sanitize.clean(GitHub::Markdown.render_gfm(p.content), Sanitize::Config::RELAXED).html_safe %>
</div>
</div>
<% end %>

View File

@@ -2,13 +2,13 @@
<div class="post-title">
<h1><%= @post.title %></h1>
</div>
<span class="post-info"><%= link_to @post.author.name, @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
<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) %>
<%= link_to "edit", edit_blogpost_path(@post.id), class: "post-edit" %>
<% end %>
</span>
</div>
<div class="post-content">
<%= GitHub::Markdown.render_gfm(Sanitize.clean(@post.content, Sanitize::Config::RESTRICTED)).html_safe %>
<%= Sanitize.clean(GitHub::Markdown.render_gfm(@post.content), Sanitize::Config::RELAXED).html_safe %>
</div>
<div id="comments">
<% @post.comments.each do |c| %>