<%#
# Navigation

This partial is used to display the navigation in Administrate.
By default, the navigation contains navigation links
for all resources in the admin dashboard,
as defined by the routes in the `admin/` namespace
%>

<nav class="navigation" role="navigation">
  <%= link_to(
    "⇦ Back to site",
    root_path,
    class: "navigation__link button",
    style: "color: #f6f7f7; background-color: #293f54; font-size: 15pt;",
    "data-turbolinks": "false"
  ) %>

  <% Administrate::Namespace.new(namespace).resources_with_index_route.each do |resource| %>
    <%= link_to(
      display_resource_name(resource),
      resource_index_route(resource),
      class: "navigation__link navigation__link--#{nav_link_state(resource)}"
    ) if valid_action?(:index, resource) && show_action?(:index, model_from_resource(resource)) %>
  <% end %>
</nav>
