<!DOCTYPE html>
<html>
  <head>
    <title><%= @tenant ? @tenant.site_name : @page_title %></title>

    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="turbolinks-cache-control" content="no-cache">

    <%= render 'layouts/set_js_locale' %>

    <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>

    <%= favicon_link_tag asset_pack_path('media/images/favicon.png') %>
  </head>

  <body>
    <% if @tenant %>
      <%= render 'layouts/header' %>
    <% end %>
    
    <%= render 'layouts/alerts' %>
    
    <div class="container">
      <%= yield %>
    </div>
  </body>
</html>
