<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <% title = yield(:title) %>
    <title><%= title || "#{community_qualified_name}" %></title>
    <% unless internal_navigation? %>
      <meta name="last-updated" content="<%= Time.current %>">
      <meta name="user-signed-in" content="<%= user_signed_in? %>">
      <meta name="algolia-public-id" content="<%= ApplicationConfig["ALGOLIASEARCH_APPLICATION_ID"] %>">
      <meta name="algolia-public-key" content="<%= ALGOLIASEARCH_PUBLIC_SEARCH_ONLY_KEY %>">
      <meta name="environment" content="<%= Rails.env %>">
      <%= render "layouts/styles" %>
      <style>
        .home {
          overflow: hidden;
          position: relative;
          margin: auto;
          max-width: 1250px;
        }
      </style>
      <% unless user_signed_in? %>
        <%= javascript_packs_with_chunks_tag "Search", defer: true %>
      <% end %>
      <%= javascript_include_tag "base", defer: true %>
      <% if user_signed_in? %>
        <%= javascript_packs_with_chunks_tag "Search", "onboardingRedirectCheck", "contentDisplayPolicy", defer: true %>
      <% end %>
      <%= yield(:page_meta) %>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <%= favicon_link_tag SiteConfig.favicon_url %>
      <link rel="apple-touch-icon" href="<%= cloudinary(SiteConfig.logo_png, 180, "png") %>">
      <link rel="apple-touch-icon" sizes="152x152" href="<%= cloudinary(SiteConfig.logo_png, 152, "png") %>">
      <link rel="apple-touch-icon" sizes="180x180" href="<%= cloudinary(SiteConfig.logo_png, 180, "png") %>">
      <link rel="apple-touch-icon" sizes="167x167" href="<%= cloudinary(SiteConfig.logo_png, 167, "png") %>">
      <link href="<%= cloudinary(SiteConfig.logo_png, 192, "png") %>" rel="icon" sizes="192x192" />
      <link href="<%= cloudinary(SiteConfig.logo_png, 128, "png") %>" rel="icon" sizes="128x128" />
      <meta name="apple-mobile-web-app-title" content="<%= ApplicationConfig["APP_DOMAIN"] %>">
      <meta name="application-name" content="<%= ApplicationConfig["APP_DOMAIN"] %>">
      <meta property="fb:pages" content="568966383279687" />
      <meta name="theme-color" content="#000000" />
      <link rel="manifest" href="/manifest.json" />
      <link rel="search" href="<%= app_url("search.xml") %>" type="application/opensearchdescription+xml" title="<%= community_qualified_name %>" />
    <% end %>
  </head>
  <% unless internal_navigation? %>
    <% cache(cache_key_heroku_slug("top-html-and-config--#{user_signed_in?}")) do %>
      <body data-user-status="<%= user_logged_in_status %>" data-pusher-key="<%= ApplicationConfig["PUSHER_KEY"] %>">
        <div id="body-styles"></div>
        <% if user_signed_in? %>
          <%= render "layouts/user_config" %>
        <% end %>
        <div id="audiocontent" data-podcast="">
          <%= yield(:audio) %>
        </div>
        <%= render "layouts/top_bar" %>
        <div id="message-notice"></div>
        <div class="app-shell-loader">
          loading...
        </div>
    <% end %>
    <!-- End Top Shell -->
  <% end %>
