{% extends "base/base.html" %}
{% block content %}
    {% if form_field is not defined %}
        {% from 'base/_formhelpers.html' import form_field %}
    {% endif %}
    <div class="container-full">
        <div class="container-fluid top-section section">
            <h1> {{ grid_header }}</h1>
        </div>
        <div class="container-fluid mid-section section">
            {% block mid_grid_section %}{% endblock %}
        </div>
        <div class="container-fluid bottom-section-griditem section section
            text-center">
            <div class="card-deck" id="grid-items">
                {% for object in objects %}
                    <div class="col-sm-6 col-md-4 col-lg-3">
                        <a href="{{ url_for('projects.show', object_id=object._id) }}"
                           class="d-block mb-4">
                            <div class="thumbnail mb-4">
                                <img src="{{ url_for('projects_base.img_render',
                                    filename=object.image) }}" alt="Item">
                                <div class="caption">
                                    <h3 class="card-title"
                                        style="word-wrap: break-word;">
                                        {{ object.name }}
                                    </h3>
                                    <p class="card-text">
                                    <p class="card-text">
                                        {{ object.description }}
                                    </p>
                                </div>
                            </div>
                        </a>
                    </div>
                {% endfor %}
            </div>
        </div>
    </div>
{% endblock %}
