<%
const navbarToolsClass = (nav.navbar && nav.navbar.right) ? 'quarto-navbar-tools' : 'quarto-navbar-tools ms-auto';
%>


<% /* Container that holds search results (when using the non-floating style.) */ %>
<div id="quarto-search-results"></div>

  
  <% /* The header will hold the navbar (if present) and/or a container for the collapsed sidebar */ %>
  <% if (nav.navbar || nav.sidebar) { %>  
  <header id="quarto-header" class="headroom fixed-top">

  <% if (nav.navbar) { %>  
    <nav class="navbar navbar-expand<%- nav.navbar["collapse-below"] %> navbar-dark <%- nav.navbar.background === "none" || nav.navbar.background === "body" ? "border-bottom" : "" %>">
      <div class="navbar-container container-fluid">
      <% partial('navbrand.ejs', {
        navbar: nav.navbar
      }) %>
      <% if (nav.navbar.left || nav.navbar.right) { %>  
        <% if (nav.navbar.collapse) { %>
          <% if (nav.navbar.search) { %>
            <% partial('navsearch.ejs',  { classes: '', language: nav.language }) %>
          <% } %>
          <% partial('navtoggle.ejs', { language: nav.language }) %>
          <% partial('navcollapse.ejs') %>
            <% partial('navitems.ejs', { align: 'start', items: nav.navbar.left}) %>
            <% partial('navitems.ejs', { align: 'end', items: nav.navbar.right }) %>
            <% partial('navtools.ejs', { align: 'end', tools: nav.navbar.tools, darkToggle: nav.navbar.darkToggle, readerToggle: nav.navbar.readerToggle, search: false, className: navbarToolsClass, language: nav.language }) %>
          </div> <!-- /navcollapse -->
        <% } else { %>
          <% partial('navitems.ejs', { align: 'start', items: nav.navbar.left}) %>
          <% partial('navitems.ejs', { align: 'end', items: nav.navbar.right }) %>
          <% partial('navtools.ejs', { align: 'end', tools: nav.navbar.tools, darkToggle: nav.navbar.darkToggle, readerToggle: nav.navbar.readerToggle, search: false, className: navbarToolsClass, language: nav.language }) %>
          <% if (nav.navbar.search) { %>
            <% partial('navsearch.ejs',  { classes: '', language: nav.language }) %>
          <% } %>
        <% } %> 
      <% } else { %>
        <% partial('navtools.ejs', { align: 'end', tools: nav.navbar.tools, darkToggle: nav.navbar.darkToggle, readerToggle: nav.navbar.readerToggle, search: false, className: navbarToolsClass, language: nav.language }) %>
        <% if (nav.navbar.search) { %>
          <% partial('navsearch.ejs',  { classes: '', language: nav.language }) %>
        <% } %>
      <% } %>

      </div> <!-- /container-fluid -->
    </nav>
<% } %>

<% if (nav.sidebar && nav.layout) { %>
  <nav class="quarto-secondary-nav">
    <div class="container-fluid d-flex">
      <button type="button" class="quarto-btn-toggle btn"
      data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" 
      aria-controls="quarto-sidebar" aria-expanded="false" aria-label="<%- nav.language['toggle-sidebar'] %>"
      onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
        <i class="bi bi-layout-text-sidebar-reverse"></i>
      </button>
      <h1 class="quarto-secondary-nav-title"></h1>
      <a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" 
      aria-controls="quarto-sidebar" aria-expanded="false" aria-label="<%- nav.language['toggle-sidebar'] %>"
      onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">      
      </a>
      <% if (nav.sidebar && nav.sidebar.search) { %>
      <button type="button" class="btn quarto-search-button" aria-label="<%- nav.language['search'] %>" onclick="window.quartoOpenSearch();">
        <i class="bi bi-search"></i>
      </button>
      <% } %>
    </div>
  </nav>
<% } %>

</header>
<% } %> 

<% if (nav.layout) { %>

<!-- content -->
<% 
let gridClasses = "";
if (nav.layout === "article" || nav.layout === "full") {
  gridClasses = " page-columns page-rows-contents";
} 
%>
<div id="quarto-content" class="quarto-container<%- gridClasses %> page-layout-<%- nav.layout %><%- nav.navbar ? ' page-navbar': ''%>">

<!-- sidebar -->
<% if (nav.sidebar || nav['toc-location'] === "left") { %>
  <% partial('sidebar.ejs', { sidebar: nav.sidebar, sidebarStyle: nav.sidebarStyle, navbar: !!nav.navbar, toc: nav['toc-location'] === "left", language: nav.language }) %>
<% } %>

<!-- margin-sidebar -->
<% if (nav.layout === "article" || nav.layout === "full") { %>
    <div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
      <% if (nav.hasToc && nav['toc-location'] === "right") { %>
        <div id="quarto-toc-target"></div>
      <% } %>
    </div>
<% } %>

<!-- main -->
<% if (nav.layout !== "custom") { %>
<main class="content" id="quarto-document-content">
<% } %>

<% } %>




