<% if current_admin %>
  <%= link_to 'New Article', new_article_path, class: 'btn btn-default' %>
<% end %>

<% @articles.each do |article| %>

  <div class="panel panel-default article clickable" onclick="location.href='<%= article_path(article) %>'" >

    <div class="panel-heading">
      <h3 class="panel-title article-title"><%= article.title %></h3>
    </div>
    <div class="panel-body article-text">
      <% if article.content.length > 500 %>
        <%= simple_format article.content[0..500] + '...' %>
      <% else %>
      <%= simple_format article.content %>
    <% end %>
  </div>
</div>

<% end %>

<% if current_admin %>
  <%= link_to 'New Article', new_article_path, class: 'btn btn-default' %>
<% end %>

<% @articles.order(created_at: :desc).each do |article| %>

  <div class="panel panel-default article clickable" onclick="location.href='<%= article_path(article) %>'" >

    <div class="panel-heading">
      <h3 class="panel-title article-title"><%= article.title %></h3>
    </div>
    <div class="panel-body article-text">
      <% if article.content.length > 500 %>
        <%= simple_format article.content[0..500] + '... <a>(more)</a>' %>
      <% else %>
      <%= simple_format article.content %>
    <% end %>
  </div>
</div>

<% end %>

Make the articles index more intuitive.
Make the articles index more intuitive.

* Articles are sorted by recency
* Article previews end with a "(more)" link.
