<div class="span12" id="featured">
  <div class="span6" id="featured-text">
    <h2>Featured Petition</h2>
    <h3><%= @featured.title %></h3>
    <%= link_to 'Learn more', petitions_path(@featured.id), class: "btn btn-success" %>
  </div>
  <div class="span6">
    <%= image_tag('driving.jpg') %>
  </div>
  <br/>
</div>
<div class="container-fluid">
<h2>Petitions Close to Threshold</h2>
<% @top_9.in_groups_of(3, false) do |petitions| %>
  <ul class="thumbnails">
    <% petitions.each do |petition| %>
      <li class="span4">
      <div class="thumbnail">
        <%= link_to petition.title, petitions_path(petition.id) %>
        <br/>
        <br/>
        <div class="progress progress-info">
          <% percentage =  number_to_percentage((petition.signature_count.to_f / petition.signature_threshold) * 100) %>
          <div class="bar" style="width: <%="#{percentage}" %>"></div>
        </div>
        Signatures needed: <%= number_with_delimiter(petition.signatures_needed)  %>
        <br/>
        Signature count: <%= number_with_delimiter(petition.signature_count) %>
        <br/>
      <% end %>
    </div>
    </li>
  </ul>
<% end %>
</div>

<div class="span12" id="featured">
  <div class="span6" id="featured-text">
    <h2>Featured Petition</h2>
    <h3><%= @featured.title %></h3>
    <%= link_to 'Learn more', petitions_path(@featured.id), class: "btn btn-success" %>
  </div>
  <div class="span6">
    <%= image_tag('driving.jpg') %>
  </div>
  <br/>
</div>
<div class="container-fluid">
<h2>Petitions Close to Threshold</h2>
<% @top_9.in_groups_of(3, false) do |petitions| %>
  <ul class="thumbnails">
    <% petitions.each do |petition| %>
      <li class="span4">
      <div class="thumbnail">
        <%= link_to petition.title, petitions_path(petition.id) %>
        <br/>
        <br/>
        <div class="progress progress-info">
          <% percentage =  number_to_percentage((petition.signature_count.to_f / petition.signature_threshold) * 100) %>
          <div class="bar" style="width: <%="#{percentage}" %>"></div>
        </div>
        Signatures needed: <%= number_with_delimiter(petition.signatures_needed)  %>
        <br/>
        Signature count: <%= number_with_delimiter(petition.signature_count) %>
        <br/>
        Time left: <%= distance_of_time_in_words(DateTime.now, petition.deadline) %>
        <br/>
      <% end %>
    </div>
    </li>
  </ul>
<% end %>
</div>

Add time left to the home page
Add time left to the home page
