<% provide :title, title %>
<% provide :main_class, "sdg-goals-index" %>

<% if header.present? %>
  <%= render "shared/header", header: header %>
<% else %>
  <header class="section-header">
    <h1><%= title %></h1>
  </header>
<% end %>

<%= render Shared::BannerComponent.new("sdg") %>

<%= link_list(*goal_links, class: "sdg-goal-list") %>

<% phases.each do |phase| %>
  <section class="sdg-phase" id="sdg_phase_<%= phase.kind %>">
    <header>
      <h2 class="title"><%= phase.title %></h2>
    </header>

    <%= render "shared/cards", cards: phase.cards.sort_by_order %>
  </section>
<% end %>
