{% extends 'HitsoCommonBundle::layout.html.twig' %}
{% set related = related_articles(article, 4) %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('bundles/hitsocommon/hitsox-default-theme/source/css/article-critical.css') }}">
<link rel="preload" as="style" href="{{ preload(asset('bundles/hitsocommon/hitsox-default-theme/source/css/article-critical.css')) }}">
<link rel="preload" href="{{ preload(asset('bundles/hitsocommon/hitsox-default-theme/source/css/article.css')) }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
{% endblock %}
{% block body_class %}{{ parent() }} page--article{% endblock %}
{% block content %}
<main class="main">
{% cache cache_hash('article_main_' ~ article.version) {time: 3600} %}
<article class="article">
{% block articleMeta %}{% endblock %}
{% block articleHeader %}
{% set dateRendered = article.publishedAt|localizeddate('none', 'none', sites.current.locale, null, "d MMMM Y 'godz.' hh:mm") %}
<div class="article__head">
<h1 class="article__head-title" itemprop="name headline" id="article_title">
{{ article.title }}
</h1>
<div class="article__meta">
<!-- authors -->
{% if article.authors|length > 0 %}
{% for contentAuthor in article.authors %}
{% if contentAuthor.user is defined %}{% set author = contentAuthor.user %}{% else %}{% set author = contentAuthor.author %}{% endif %}
<div class="article__author" itemscope itemprop="author" itemtype="http://schema.org/Person">
{% if author is not null %}
{% if author.avatar is not null %}
<div class="article__author-avatar"></div>
{% endif %}
<span class="article__author-name" itemprop="name">{% spaceless %}{{ contentAuthor.header }} {{ author.name }}{% endspaceless %}</span>
{% endif %}
</div>
{% endfor %}
{% endif %}
<!-- publication date -->
<time class="article__meta-date">{{ dateRendered }}</time>
</div>
</div>
{% endblock %}
{% block articleCover %}
<div class="article__photo">
{% if article.photo is not empty %}
{% set imageUrl = article.photo|image_url('content_cover') %}
{% set altText = article.photoAlt|default %}
<picture class="article__photo-picture">
<source media="(max-width: 360px)" srcset="{{ article.photo|image_url('content_cover_small') }}">
<source media="(max-width: 760px)" srcset="{{ article.photo|image_url('content_cover_medium') }}">
<source media="(max-width: 1024px)" srcset="{{ article.photo|image_url('content_cover_large') }}">
<img class="article__photo-img" itemprop="image" alt="{{ altText }}" src="{{ imageUrl }}"/>
</picture>
{% if article.photoCaption is not empty %}
<div class="article__photo-caption">
{{ article.photoCaption }}
</div>
{% endif %}
{% endif %}
</div>
{% endblock %}
{% block articleLead %}
<div class="article__lead">
<p>
{{ article.lead|raw }}
</p>
</div>
{% endblock %}
{% block articleContent %}
<div class="article__content">
{% for element in article.elements %}
{% include "HitsoContentBundle:Front/Article/Elements:#{element.typeName}.html.twig" %}
{% endfor %}
</div>
{% endblock %}
{% block articleFooter %}
{% set dateRendered = article.publishedAt|localizeddate('none', 'none', sites.current.locale, null, "d MMMM Y 'godz.' hh:mm") %}
<!-- article footer -->
<div class="article__footer">
<div class="article__meta">
<!-- author -->
{% if article.authors|length > 0 %}
{% for contentAuthor in article.authors %}
{% if contentAuthor.user is defined %}{% set author = contentAuthor.user %}{% else %}{% set author = contentAuthor.author %}{% endif %}
<div class="article__author">
{% if author is not null %}
{% if author.avatar is not null %}
<div class="article__author-avatar"></div>
{% endif %}
<span class="article__author-name">{% spaceless %}{{ contentAuthor.header }} {{ author.name }}{% endspaceless %}</span>
{% endif %}
</div>
{% endfor %}
{% endif %}
<!-- publication date -->
{# <time class="article__meta-date">{{ dateRendered }}</time>#}
</div>
</div>
{% endblock %}
{% block articleComments %}
{# {% if article.commentAllowed %}#}
{# {% include 'HitsoContentBundle:Front/Article/Partials:comments.html.twig' %}#}
{# {% endif %}#}
{% endblock %}
{{ json_ld(article) }}
</article>
{% endcache %}
{% block related_articles %}
{# {% if related.count %}#}
{# <!-- hr -->#}
{# <div class="section-hr"></div>#}
{# <!-- entries showcase -->#}
{# <section class="entries_showcase">#}
{# <div class="entries_showcase__header">#}
{# <div class="section section--center">#}
{# <h2 class="section-title section-title--h1">#}
{# Want to know more about us?#}
{# </h2>#}
{# <p class="section-lead">#}
{# Visit our blog and learn more about technology and hitso#}
{# </p>#}
{# </div>#}
{# </div>#}
{# <div class="entries_showcase__grid entries" itemscope itemtype="http://schema.org/ItemList">#}
{# {% for entry in related %}#}
{# <div class="entry" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">#}
{# <meta itemprop="position" content="{{ loop.index }}"/>#}
{# <a href="{{ dynamic_url(entry.route.id) }}" class="entry__body" itemprop="url">#}
{# {% if entry.photo is not empty %}#}
{# {% set imageUrl = entry.photo|image_url('content_cover') %}#}
{# {% set altText = entry.photo.altText|default %}#}
{# <picture class="entry__photo">#}
{# <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="{{ imageUrl }}" class="entry__photo-img lazyload" alt="{{ entry.title }}"/>#}
{# </picture>#}
{# {% endif %}#}
{# <div class="entry__content">#}
{# <time class="entry__content-time" datetime="{{ entry.publishedAt|date('Y-m-d') }}">{{ entry.publishedAt|localizeddate('medium', 'none', app.request.locale) }}</time>#}
{# <strong class="entry__content-title" itemprop="name">#}
{# {{ entry.title }}#}
{# </strong>#}
{# <div class="entry__content-lead">#}
{# {{ entry.lead|striptags }}#}
{# </div>#}
{# </div>#}
{# </a>#}
{# </div>#}
{# {% endfor %}#}
{# </div>#}
{# <a href="{{ dynamic_url(article.category.route.id) }}" class="entries_showcase-cta btn btn--warning">visit our blog</a>#}
{# </section>#}
{# {% endif %}#}
{% endblock %}
{% block contact %}
{# {% include 'HitsoContentBundle:Front/Article/Partials:contact.html.twig' %}#}
{% endblock %}
</main>
{% endblock %}
{% block meta %}
{{ parent() }}
{% for entry in related %}
<meta property="og:see_also" content="{{ absolute_dynamic_url(entry.route.id) }}" />
{% endfor %}
{% endblock %}
{% block footer_javascripts %}
{# <script src="{{ asset('bundles/hitsocommon/hitsox-default-theme/source/js/article.js') }}"></script>#}
{% endblock %}