{% extends 'base.html.twig' %}
{% block title %}{{ 'PRODUCT'|trans }}{% endblock %}
{% block head %}
{{ parent() }}
<meta name="description" content="{{ 'PRODUCT_META_DESCRIPTION'|trans}}">
<meta name="keywords" content="{% for product in productPaginator.result %}{{ product.title }}, {% endfor %}">
{% endblock %}
{% block body %}
<main>
<section class="komili-home-hero owl-carousel">
{% for item in sliderItemPaginator.result %}
<div class="hero-item">
<a {% if item.pathUrl %}href="{{ item.pathUrl }}"{% else %}href="javascript:;" {% endif %}>
<img src="{{ item.image.url }}" alt="{{ item.image.originalName }}">
</a>
</div>
{% endfor %}
</section>
<section class="komili-home-products">
<div class="komili-wrapper">
<h1 class="text-center bold text-color-p mb-24 h2">{{ 'PRODUCTS' | trans }}</h1>
<div class="komili-home-products-slider komili-product-page-products">
{% for product in productPaginator.result %}
<div class="komili-home-products-item">
<a href="{{ path('product_item', {'categorySlug': product.slug }) }}">
<figure>
<img src="{{ product.image.url }}" alt={{ product.title }} width="200" height="200" loading="lazy">
</figure>
<div class="text">
<h3 class="bold text-color-p h4 mb-10">{{ product.title }}</h3>
<p class="text-black mb-0">{{ product.shortContent }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{% for product in productPaginator.result %}
<div itemscope itemtype="http://schema.org/Product">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="{{ url('product_item', {'categorySlug': product.slug }) }}"/>
<meta itemprop="headline" content="{{ product.title }}">
<h3 itemprop="author" itemscope itemtype="https://schema.org/Person">
<meta itemprop="name" content="Komili">
</h3>
<meta itemprop="description" content="{{ product.shortContent }}"/>
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="{{ product.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="{{ product.createdAt|date('Y-m-d') }}T{{ product.createdAt|date('H:s') }}"/>
<meta itemprop="dateModified" content="{{ product.updatedAt|date('Y-m-d') }}T{{ product.updatedAt|date('H:s') }}"/>
</div>
{% endfor %}
</main>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
$(".komili-home-hero").owlCarousel({
loop: true,
nav: true,
lazyLoad: true,
margin: 0,
items: 1,
autoplay: true,
autoplayTimeout: 6000,
autoplayHoverPause: true
});
</script>
{% endblock %}