<% content_for :navigation do %>
  <nav class="nav nav-tabs align-self-end">
    <% @categories.each do |category| %>
      <div class="nav-item">
        <%= link_to [@district, @school, category, { year: @academic_year.range }], class: ["nav-link", current_page?([@district, @school, category, { year: @academic_year.range }]) ? "active" : ""] do %>
          <i class="<%= category.icon_class %> <%= category.icon_color_class if current_page?([@district, @school, category, { year: @academic_year.range }]) %> me-2" ></i>
          <%= category.name %>
        <% end %>
      </div>
    <% end %>
  </nav>
<% end %>

<h1 class="sub-header font-bitter color-red"><%= @category.name %></h1>
<p class="col-8 body-large"><%= @category.description %></p>

<% @category.subcategories(academic_year: @academic_year, school: @school).each do |subcategory| %>
  <%= render partial: "subcategory_section", locals: {subcategory: subcategory} %>
<% end %>
