{% extends 'base.html.twig' %}
{% block title %}{{ product.title }}{% endblock %}
{% block body %}
<main>
<section class="komili-home-hero owl-carousel">
<div class="hero-item">
<img src="{{ asset('img/product-hero.jpg') }}" alt="">
</div>
</section>
<section class="komili-home-products cat-products">
<div class="komili-wrapper">
<h1 class="text-center bold text-color-p mb-32 h2">{{ product.title }}</h1>
<div class="komili-cat-products">
{% for item in itemPaginator.result %}
<div class="komili-cat-products-item">
{% if item.itemTypes|length > 0 %}
<a href="{{ path('product_item_type', { 'categorySlug': product.slug, 'itemSlug': item.slug}) }}">
{% else %}
<a href="{{ path('product_item_show', { 'categorySlug': product.slug, 'itemSlug': item.slug}) }}">
{% endif %}
<figure class="mb-16">
<img src="{{ item.image.url }}" alt={{ item.title }} width="" height="" class="m-auto" loading="lazy">
</figure>
<div class="text">
<h3 class="bold text-color-p h4">{{ item.title }}</h3>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{% for item in itemPaginator.result %}
<div itemscope itemtype="http://schema.org/Product">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="{{ url('product_item_show', { 'categorySlug': product.slug, 'itemSlug': item.slug}) }}"/>
<meta itemprop="headline" content="{{ item.title }}">
<h3 itemprop="author" itemscope itemtype="https://schema.org/Person">
<meta itemprop="name" content="Komili">
</h3>
<meta itemprop="description" content="{{ item.shortContent }}"/>
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="{{ item.image.url }}">
</div>
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="{{ absolute_url('/img/komili-logo.svg') }}">
</div>
<meta itemprop="name" content="Komili">
</div>
<meta itemprop="datePublished" content="{{ item.createdAt|date('Y-m-d') }}T{{ item.createdAt|date('H:s') }}"/>
<meta itemprop="dateModified" content="{{ item.updatedAt|date('Y-m-d') }}T{{ item.updatedAt|date('H:s') }}"/>
</div>
{% endfor %}
</main>
{% endblock %}