<% # This layout should be used when sign in flow is halted (due to e.g. password expiry, %>
<% # or some similar halt in sign-in chain) %>
<!DOCTYPE html>
<html>
  <head>
    <%= csp_meta_tag %>
    <meta data-hook="head-js">
    <title><%=t "head.title", title: (yield :head_title) %></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <style media="all">
      html, body { height: 100%; min-height: 100%; }
    </style>
    <script src="<%= global_constants_path(format: :js) %>"></script>

    <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
    <%= stylesheet_link_tag 'bootstrap_pack', media: 'all' %>
    <%= stylesheet_link_tag 'application_pack_styles', media: 'all' %>
    <%= javascript_include_tag 'jquery_bundle' %>
    <%= javascript_include_tag 'application' %>
    <%= javascript_include_tag 'application_pack' %>
    <%= stylesheet_link_tag 'application', media: 'all' %>

    <%= favicon_link_tag "favicon.ico" %>
    <%= favicon_link_tag "favicon-57x57.png", type: "image/png", size: "57x57" %>
    <%= favicon_link_tag "favicon-72x72.png", type: "image/png", size: "72x72" %>
    <%= favicon_link_tag "favicon-76x76.png", type: "image/png", size: "76x76" %>
    <%= favicon_link_tag "favicon-114x114.png", type: "image/png", size: "114x114" %>
    <%= favicon_link_tag "favicon-120x120.png", type: "image/png", size: "120x120" %>
    <%= favicon_link_tag "favicon-144x144.png", type: "image/png", size: "144x144" %>
    <%= favicon_link_tag "favicon-152x152.png", type: "image/png", size: "152x152" %>
    <%= favicon_link_tag "favicon-180x180.png", type: "image/png", size: "180x180" %>

    <%= csrf_meta_tags %>
  </head>
  <body class="<%= yield :body_class %>">
    <nav class="navbar navbar-default navbar-fixed-top navbar-sign-in-halt" id="main-nav">
      <div class="container-fluid">
        <div class="navbar-header">
          <span class="navbar-brand" title="<% t('nav.label.scinote') %>">
            <%= image_tag('scinote_logo.svg', id: 'logo') %>
          </span>
        </div>
        <% if user_signed_in? %>
          <div class="pull-right sign-in-halt-logout-button">
            <%= link_to main_app.destroy_user_session_path, class: 'btn btn-secondary', method: :delete do %>
              <%= t('nav.user.logout') %>
            <% end %>
          </div>
        <% end %>
      </div>
    </nav>

    <%= render partial: 'shared/flash_alerts', locals: { flash: flash, notice: notice, alert: alert } %>

    <div class="container sign-in-halt-container">
      <%= yield %>
    </div>
  </body>
</html>
