<!DOCTYPE html>
<html>
  <%= render "layouts/shared/head" %>

  <body data-controller="lightbox local-time timezone-cookie" data-action="turbo:morph@window->local-time#refreshAll">
    <header id="header">
      <a href="#main-content" class="skip-navigation btn">Skip to main content</a>
      <%= yield :header %>
    </header>

    <% if notice = flash[:notice] || flash[:alert] %>
      <div class="flash" data-controller="element-removal" data-action="animationend->element-removal#remove">
        <div class="flash__inner shadow">
          <%= notice %>
        </div>
      </div>
    <% end %>

    <main id="main">
      <%= yield %>
    </main>

    <footer id="footer">
      <%= yield :footer %>

      <% if Current.user && !@hide_footer_frames %>
        <div id="footer_frames" data-turbo-permanent="true">
          <%= render "my/pins/tray" %>
          <%= render "commands/terminal" %>
          <%= render "notifications/tray" %>
        </div>
      <% end %>
    </footer>

    <%= render "layouts/lightbox" %>
  </body>
</html>
