{% extends 'base.html.twig' %}
{% block title %}Category{% endblock %}
{% block body %}
{% include('partials/_breadcrumbs.html.twig') with {
hero_title: "Category",
hero_title_breadcrumb: "Category"
} %}
<section class="mt-5 mb-5">
<div class="container" style="height: auto;">
<div class="container-fluid" style="min-height: 10em;">
<div data-controller="carousel" class="swiper swiper-container"
data-carousel-options-value='{ "navigation": { "nextEl": ".swiper-button-next", "prevEl": ".swiper-button-prev" } }'>
<div class="swiper-wrapper">
{% set slug = app.request.attributes.get('slug') %}
{% for categories in slides %}
{% for category in categories %}
<div class="swiper-slide" >
<a href="{{ path('category', {
slug: category.slug
}) }}" style="overflow: visible;">
<div class="{% if category.slug == slug %}bg-btn5 {% endif %}s-block p-3"
data-tilt data-tilt-max="5" data-tilt-speed="1000">
{% for block in category.content.blocks %}
{% if block.type == "image" %}
<div class="s-card-icon mx-auto my-2">
<img src="{{ asset(block.data.file.url) }}"
alt="{{ category.slug }}" class="img-fluid"/>
</div>
{% endif %}
{% endfor %}
<h4 class="h5{% if category.slug == slug %} text-white{% endif %}">
{{ category.name|length > 30 ? category.name|slice(0, 30) ~ '...' : category.name }}</h4>
</div>
</a>
</div>
{% endfor %}
{% endfor %}
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</div>
<div class="container bg-light mt-4 rounded shadow-sm">
{% if products is empty %}
<div class="row align-content-center rounded" style="height: 20em;">
<div class="col justify-content-center text-center">
<h4 class="h5">No items found in this category.</h4>
<p>please select a different category or try later.</p>
</div>
</div>
{% else %}
<div class="row upset link-hover shape-num justify-content-center">
{% for product in products %}
<div class="col-lg-4 col-md-6 border-light">
<div class="pricing-table best-plan mt60 mb60 bg-gradient">
<div class="inner-table mb40">
<span class="title">{{ product.name }}</span>
<p class="title-sub">{{ product.metadata }}</p>
<h2>${{ product.price }}</h2>
<p class="duration">Monthly Package</p>
</div>
<div class="row">
<a href="{{ path('product' , {
slug: product.slug
}) }}" class="btn-main bg-btn3 lnk col-12 text-white">
View Product
<i class="fas fa-chevron-right fa-icon"></i>
<span class="circle"></span>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
{# <div class="card border-light shadow-sm"> #}
{# <div class="row justify-content-center mt-3 ml-3 mr-3"> #}
{# <ul class="nav nav-pills"> #}
{# <li class="nav-item"> #}
{# <a class="nav-link active">Category 1</a> #}
{# </li> #}
{# <li class="nav-item"> #}
{# <a class="nav-link">Category 2</a> #}
{# </li> #}
{# <li class="nav-item"> #}
{# <a class="nav-link">Category 3</a> #}
{# </li> #}
{# <li class="nav-item"> #}
{# <a class="nav-link">Category 4</a> #}
{# </li> #}
{# </ul> #}
{# </div> #}
{# <div class="card-body ml-2 mr-2 mb-2 border rounded"> #}
{# Item Cards go here. #}
{# </div> #}
{# </div> #}
</div>
</section>
{% endblock %}