<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>{% block title %}Knowledge Base{% endblock %}</title>
  {% if project_description %}
  <meta name="description" content="{{ project_description }}">
  <meta property="og:description" content="{{ project_description }}">
  <meta property="twitter:description" content="{{ project_description }}">
  {% endif %}
  {% if project_image_url %}
  <meta property="og:image" content="{{ project_image_url }}">
  <meta property="twitter:image" content="{{ project_image_url }}">
  {% endif %}
  {% load static %}
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
  <link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
  {% block head %}{% endblock %}
</head>

<body>
  <nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container">
      <a class="navbar-brand" href="/">Book Club</a>
      <div class="collapse navbar-collapse">
        <ul class="navbar-nav ms-auto">
          {% if user.is_authenticated %}
            <li class="nav-item">
              <a class="nav-link" href="{% url 'club_list' %}">Clubs</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#">Hi, {{ user.username }}</a>
            </li>
            <li class="nav-item">
              <form action="{% url 'logout' %}" method="post">
                {% csrf_token %}
                <button type="submit" class="btn btn-link nav-link">Logout</button>
              </form>
            </li>
          {% else %}
            <li class="nav-item">
              <a class="nav-link" href="{% url 'login' %}">Login</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="{% url 'signup' %}">Sign Up</a>
            </li>
          {% endif %}
        </ul>
      </div>
    </div>
  </nav>

  {% block content %}{% endblock %}
</body>

</html>
