This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
redstoner.com/app/views/blogposts/show.html.erb
2014-04-28 03:01:33 +02:00

21 lines
965 B
Plaintext

<%= link_to "News", blogposts_path %> → <%= link_to @post.title %>
<div class="item-group post with-avatar" id="post-<%= @post.id %>">
<div class="header">
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
</div>
<div class="items">
<div class="item content">
<h2 class="headline"><%= link_to truncate(@post.title, length: 60, omission: " …"), p %></h2>
<%= render_md(@post.content).html_safe %>
</div>
</div>
</div>
<div id="comments">
<h3><%= "#{pluralize(@post.comments.length, 'comment')}." %></h3>
<% @post.comments.each do |c| %>
<%= render "comments/comment", c: c %>
<% end %>
<%= render "comments/new" %>
</div>