{% extends 'base.html.twig' %}
{% block head %}
{{ parent() }}
<meta name="description" content="{{ 'BLOG_META_DESCRIPTION'|trans}}">
<meta name="keywords" content="{% for blog in blogPaginator.result %}{{ blog.title }}, {% endfor %}">
{% endblock %}
{% block title %}{{ 'BLOG'|trans }}{% endblock %}
{% block body %}
<main>
<section class="komili-home-blog">
<div class="komili-wrapper">
<h2 class="text-center bold text-color-p">{{ 'BLOG'|trans }}</h2>
<ul class="komili-home-blog-posts">
{% for blog in blogPaginator.result %}
<li>
<a href="{{ path('blog_detail', {'titleSlug': blog.slug}) }}">
<figure class="mb-16">
<img src="{{ blog.image.url }}" alt="{{ blog.title }}" loading="lazy" width="350"
height="350">
</figure>
<h4 class="h6 bold text-color-p mb-10">{{ blog.title }}</h4>
<p class="text-14 mb-0 text-black">{{ blog.shortContent }}</p>
</a>
</li>
{% endfor %}
</ul>
<ul class="komili-pagination mt-60">
{% for i in 1..blogPaginator.lastPage %}
<li>
<a href="{{ path('blog_page', {'page': i}) }}" {% if blogPaginator.currentPage == i %} class="active" {% endif %}>{{ i }}</a>
</li>
{% endfor %}
</ul>
</div>
{% for blog in blogPaginator.result %}
<div itemscope itemtype="http://schema.org/NewsArticle">
<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="{{ url('blog_detail', {'titleSlug': blog.slug}) }}"/>
<meta itemprop="headline" content="{{ blog.title }}">
<h3 itemprop="author" itemscope itemtype="https://schema.org/Person">
<meta itemprop="name" content="Komili">
</h3>
<meta itemprop="description" content="{{ blog.shortContent }}"/>
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="{{ blog.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="{{ blog.createdAt|date('Y-m-d') }}T{{ blog.createdAt|date('H:s') }}"/>
<meta itemprop="dateModified" content="{{ blog.updatedAt|date('Y-m-d') }}T{{ blog.updatedAt|date('H:s') }}"/>
</div>
{% endfor %}
</section>
</main>
{% endblock %}