<!DOCTYPE html>
<html lang="en">
<head>
  <title><%= yield :thredded_page_title %> | Notebook.ai</title>
  <%= render 'layouts/common_head' %>

  <%= stylesheet_link_tag 'thredded', 'data-turbolinks-track': 'reload' %>
  <%= csrf_meta_tag %>
  <%# javascript_include_tag :application %>
  <%= javascript_include_tag 'thredded',
                             async: !Rails.application.config.assets.debug,
                             defer: true %>
  <%== Gravatar.prefetch_dns %>
</head>
<body data-in-app="true" class="<%= 'has-fixed-sidenav' if user_signed_in? %> <%= 'dark' if user_signed_in? && current_user.dark_mode_enabled? %>">
  <%= render 'layouts/sidenav' if user_signed_in? %>
  <%= render 'layouts/recent_edits_sidenav' if user_signed_in? %>
  <%= render 'layouts/navbar' %>

  <main>
    <%= yield :full_width_page_header %>
    <div class="container-fluid">
      <div class="row">
        <div class="col s12">
          <%# todo: move these to toasts and/or make dismissable %>
          <%= render 'cards/ui/alert' %>
          <%= render 'cards/ui/notice' %>
        </div>
      </div>
      <div class="row">
        <div class="col s12">
          <%= yield %>
        </div>
      </div>
    </div>

    <%= render 'layouts/ganalytics' %>

  </main>

  <%= react_component("Footer") unless defined?(@show_footer) && !@show_footer %>
  <%= render 'layouts/quick_add_fab' unless defined?(@show_footer) && !@show_footer %>
  <%= render partial: 'content/keyboard_controls_help_modal' %>

  <script type="text/javascript">
    <%= yield :javascript %>
  </script>

</body>
</html>
