<% title("#{t('achievements.title')} #{t('achievements.overview')}") %> <% description("Automatically track your character's achievements and discover how to obtain new ones.") %>
<%= button_tag fa_icon('filter', text: t('filters')), data: { toggle: 'modal', target: '#filters'}, type: 'button', class: 'btn btn-secondary btn-sm modal-toggle ml-auto' %>
<%= render 'shared/filters' %>
<% @types.each do |type| %>
<%= link_to type.name, achievement_type_path(type), class: 'unstyled' %>
<%= render 'shared/progress', value: achievement_count(@achievements[type.id], @collection_ids), min: 0, max: @achievements[type.id].size, text: 'complete' %>
<%= render 'shared/progress', value: point_count(@achievements[type.id], @collection_ids), min: 0, max: @achievements[type.id].pluck(:points).sum, text: 'achievements.points', alt: true %>
<% end %>