{% extends "front/storeFront.html" %}
{% load mptt_tags %}
{% load static %}
{% load crispy_forms_tags %}
{% load pos_filters %}

{% block content %}
{% if results %}
<h1 class='text-center mt-4 mb-4'>Search Results</h1>
<div class='card-columns'>
{% for r in results %}
<div class="card">
    {% if  r|className == "Post" %}
    <img src="{{ r.featureImage.url }}" class="card-img-top" alt="...">
    <div class="card-body">
        <h5 class="card-title">
            <a href="{% url "front:viewPost"   pid=r.id  %}?cstr={{ r.store.id }}">{{ r.title }}</a>
        </h5>
        <p class="card-text">
        {{ r.description }}</p>
        <p class="card-text"><small class="text-muted">{{ r.created_at }}</small></p>
    </div>
    {% endif %}
</div>
{% endfor %}
</div>
{% else %}
<h1 class='text-center mt-4 mb-4'>Your Search not Matched any Records</h1>
{% endif %}
{% endblock %}
