<% page_title @page.page_title  %>
<!-- MAIN CONTENT -->
<div class="bg-gray-100 py-4">
  <div class="container mx-auto px-4">
    <div class="flex flex-wrap items-center">
      <div class="w-full md:w-1/2">
        <h2 class="text-2xl font-bold text-gray-800">
          <%= @page.main_link.link_title %>
        </h2>
      </div>
      <div class="w-full md:w-1/2">
        <nav class="flex" aria-label="Breadcrumb">
          <ol class="inline-flex items-center space-x-1 md:space-x-3">
            <li class="inline-flex items-center">
              <a href="/" class="text-gray-700 hover:text-blue-600">
                <%= I18n.t("webContentSections.home") %>
              </a>
            </li>
            <li>
              <div class="flex items-center">
                <svg class="w-6 h-6 text-gray-400" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
                <span class="ml-1 text-gray-500 md:ml-2">
                  <%= @page.main_link.link_title %>
                </span>
              </div>
            </li>
          </ol>
        </nav>
      </div>
    </div>
  </div>
</div>
<div class="container mx-auto px-4 py-8">
  <% @page_contents_for_edit.each_with_index do |page_content, index| %>
    <div class="w-full mb-6" <%= "data-pwb-page-part=#{page_content.page_part_key}".html_safe if params[:edit_mode] == 'true' %>>
      <% if page_content.is_rails_part %>
        <%= render partial: "pwb/components/#{page_content.page_part_key}", locals: {} rescue nil %>
      <% else %>
        <%== @content_to_show[index] %>
      <% end %>
    </div>
  <% end %>
</div>
