<% content_for :title, "Posts by #{@user.username}" %>

<h1>Posts by <%= link_to @user.username, user_path(@user) %></h1>

<div class="button-list is-gutterless">
  <%= link_to 'Score', query_url(sort: 'score'), class: "button is-muted is-outlined " + (active_search?('score') ? "is-active" : "") %>
  <%= link_to 'Age', query_url(sort: 'age'), class: "button is-muted is-outlined " + (active_search?('age') ? "is-active" : "") %>
</div>

<div class="item-list">
  <% @posts.each do |post| %>
    <%= render 'posts/type_agnostic', post: post, show_type_tag: true, show_category_tag: true %>
  <% end %>
</div>

<%= will_paginate @posts, renderer: BootstrapPagination::Rails %>