<!doctype html>
<html lang="<%= controller_name == 'languages' ? accept_language : I18n.locale %>">
  <head>
    <title><%= content_for?(:title) ? yield(:title) : t(:project_name) %></title>
    
    <meta charset="utf-8">
    
    <%= tag :meta, name: 'description', content: content_for?(:meta_description) ? yield(:meta_description) : (@node.present?? @node.page_description : '') %>
    
    <meta name="viewport" content="width=device-width,initial-scale=1">
    
    <meta name="turbo-prefetch" content="false">
    <meta name="turbo-cache-control" content="no-cache">
    
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>    
    
    <link rel="apple-touch-icon" href="/ikea-favicon-300x300.png">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" sizes="16x16 32x32">
    <link rel="icon" sizes="192x192" href="/ikea-favicon-300x300.png">    

    <%= stylesheet_link_tag "application" %>

    <%= javascript_include_tag 'gsap/gsap.min.js' %>
    <%= frontend_javascript_importmap_tags %w'application @hotwired/turbo-rails @hotwired/stimulus locale_controller image_controller' %>    
  </head>
  <body>
    <header>
      <%= link_to svg('ikea-foundation-203x22'), url_for(controller: 'languages', action: (I18n.default_locale == I18n.locale ? 'index' : 'show')) %>      
    </header>
    
    <main>
      <%= yield %>
    </main>

    <footer><span>© Inter IKEA Systems B.V. 2025</span></footer>
  </body>
</html>
