<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="<% settings.charset %>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
    <title>Danceyland Blog</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
  </head>
  <body>
    <div class="container">
      <nav class="navbar navbar-expand-lg bg-body-tertiary">
      <div class="container-fluid">
        <a class="navbar-brand" href="<% request.uri_for('/') %>">Danceyland Blog</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
          <div class="navbar-nav">
            <a class="nav-link" href="<% request.uri_for('/') %>">List All Entries</a>
            <a class="nav-link" href="<% request.uri_for('/create') %>">Create New Entry</a>
            <% IF session.user %>
            <a class="nav-link" href="<% request.uri_for('/logout') %>">Logout</a>
            <% END %>
          </div>
        </div>
      </div>
    </nav>
      <% IF vars.missing %>
      <div class="alert alert-warning" id="missing">
          <b>Missing parameters: <% vars.missing | html_entity %></b>
      </div>
      <% END %>
      <% IF error_message %>
      <div class="alert alert-danger" id="error">
          <b>Error: <% vars.error_message | html_entity %></b>
      </div>
      <% END %>
      <% content %>
      <div id="footer">
        <hr>
        Powered by <a href="https://perldancer.org/">Dancer2</a> <% dancer_version %>
      </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
  </body>
</html>

