{% load static %}
<html lang="en">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
      integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/style.css' %}" media="all">
<head>
    <meta charset="UTF-8">
</head>
<body>

<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="{% url 'index' %}">МАГАЗИН</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarScroll"
            aria-controls="navbarScroll" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarScroll">
        <ul class="navbar-nav mr-auto my-2 my-lg-0 navbar-nav-scroll" style="max-height: 100px;">
            {% if user.is_authenticated %}
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'index' %}">Главная </a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'logout' %}">Выход</a>
            </li>
            {% else %}
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'index' %}">Главная </a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'register' %}">Регистрация </a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="{% url 'login' %}">Вход </a>
            </li>
            {% endif %}
        </ul>
        <form class="d-flex">
            <input class="form-control mr-2" type="search" placeholder="Search" aria-label="Search">
            <button class="btn btn-outline-success" type="submit">Search</button>
        </form>
    </div>
</nav>

<div class="jumbotron jumbotron-fluid">
  <div class="container">
    <h1 class="display-4">Название фирмы</h1>
    <p class="lead"> О фирме</p>
  </div>
</div>
<div>
    <a class="nav-link" href="{% url 'profile' %}">Профиль</a>
    <a class="nav-link" href="{% url 'products' %}">Все товары</a>
    <div class="row">
        <span class="border">
            <div class="card" style="width: 18rem;">
                <img src={{product.foto.url}} class="card-img-top" alt="...">
                <div class="card-body">
                    <h5 class="card-title">{{product.title}}</h5>
                    <p class="card-text">{{product.info_product}}</p>
                    <a href="#" class="btn btn-primary">Подробнее</a>
                    <a href="{% url 'basket_add' product.id%}" class="btn btn-primary">В корзину</a>
                </div>
            </div>
        </span>
    </div>
</div>
</body>
</html>