{% extends 'base.html.twig' %}
{% block title %}{{ item.title }}{% endblock %}
{% block body %}
<main>
<section class="komili-product-detail">
<div class="komili-wrapper">
<div class="komili-product-detail-box">
{% if item.properties|length > 0 %}
<figure>
<a href="#komili-modal-product-big" rel="modal:open">
<img id="komili_cover_image" src="{{ item.properties[0].file.url }}" alt="{{ item.properties[0].title }}" class="m-auto">
</a>
</figure>
{% else %}
<figure>
<a href="#komili-modal-product-big" rel="modal:open">
<img src="{{ item.image.url }}" alt="{{ item.title }}" class="m-auto">
</a>
</figure>
{% endif %}
<div class="text">
<h1 class="bold text-color-p mb-32">{{ item.title }}</h1>
{% if item.properties|length > 0 %}
<ul class="komili-product-amount">
{% for key,p in item.properties %}
<li>
<a href="javascript:;" {% if key == 0 %} class="selected" {% endif %} data-image="{{ p.file.url }}">{{ p.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
<p>{{ item.content|raw }}</p>
</div>
</div>
</div>
</section>
<div itemscope itemtype="http://schema.org/Product">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="{{ url('product_item_show', { 'categorySlug': item.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.content }}"/>
<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>
</main>
{% if item.properties|length == 0 %}
<div class="modal" id="komili-modal-product-big">
<div class="w-100" style="display: flex; justify-content: center">
<img src="{{ item.image.url }}" alt="{{ item.title }}">
</div>
</div>
{% endif %}
{% endblock %}