<% provide(:title, 'Your diaries') %>

<div class="page-header">
  <h1>Your Diaries</h1>
</div>

<div class="row">
<% if @diaries.any? %>
  <div class="col-md-4">
    <div class="list-group">
      <% @diaries.each do |d| %>
          <%= link_to user_diary_url(d.user_id, d.id), class:'list-group-item' do %>
          <%= d.title %>
          <% if d.entries.any? %>
            <span class="badge"><%= d.entries.count %></span>
          <% end %>
          <% end %>
      <% end %>
    </div>
  </div>
<% else %>
  <p>You don't have any diaries</p>
<% end %>
</div>

<div class="row">
  <div class="col-md-8">
    <%= link_to 'Create a diary', new_user_diary_path, class: 'btn btn-primary' %>
  </div>
</div>

<% provide(:title, 'Your diaries') %>

<div class="page-header">
  <h1>Your Diaries</h1>
</div>

<div class="row">
  <div class="col-md-4">
    <% if @diaries.any? %>
    <div class="list-group">
      <% @diaries.each do |d| %>
          <%= link_to user_diary_url(d.user_id, d.id), class:'list-group-item' do %>
          <%= d.title %>
          <% if d.entries.any? %>
            <span class="badge"><%= d.entries.count %></span>
          <% end %>
          <% end %>
      <% end %>
    </div>
    <% else %>
    <p>You don't have any diaries. Why not
      <%= link_to 'make a start', new_user_diary_path(@user) %>?</p>
    <% end %>
  </div>
</div>

<div class="row">
  <div class="col-md-8">
    <%= link_to 'Create a diary', new_user_diary_path, class: 'btn btn-primary' %>
  </div>
</div>

Fix styling when no diaries are found
Fix styling when no diaries are found
