<!DOCTYPE html>
<html>
  <head>
    <title><%= content_for(:title) || "Highway to Undercity" %></title>
    
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <%= yield :head %>

    <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
    <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>

    <link rel="icon" href="/highwaystar.png" type="image/png">
    <%# <link rel="icon" href="/icon.svg" type="image/svg+xml"> %>
    <link rel="apple-touch-icon" href="/icon.png">

    <%# Includes all stylesheet files in app/assets/stylesheets %>
    <%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
    <%= javascript_importmap_tags %>
    <script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
    <script defer data-domain="highway.hackclub.com" src="https://plausible.io/js/script.js"></script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Knewave&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
  </head>

  <body>
    <%= render partial: "shared/audio" %>
    <main class=""> 
      <%= render "shared/topbar" %>
      <% if show_sidebar? %>
        <%# render "shared/sidebar" %>
          <%= yield %>
      <% else %>
        <div class="">
          <%= yield %>
        </div>
      <% end %>

    </main>
  </body>
</html>
