<% provide :title, t('.title', :period => @period_name) %>
<div id="post-popular">
  <h3>
    <% ["1d","1w","1m","1y"].each do |period| %>
      <% if params[:period] == period %>
        <%= @period_name.capitalize %>
      <% else %>
        <%= link_to period, :controller => "post", :action => "popular_recent", :period => period %>
      <% end %>
    <% end %>
  </h3>

  <%= render :partial => "posts", :locals => {:posts => @posts} %>
</div>

<% content_for :subnavbar do %>
  <li><%= link_to t('.popular._'), :controller => "post", :action => "popular_by_day", :year => @start.year, :month => @start.month, :day => @start.day %></li>
  <li><%= link_to t('.popular.week'), :controller => "post", :action => "popular_by_week", :year => @start.year, :month => @start.month, :day => @start.day %></li>
  <li><%= link_to t('.popular.month'), :controller => "post", :action => "popular_by_month", :year => @start.year, :month => @start.month %></li>
<% end %>

<%= render 'footer' %>
