{% extends 'base.html.twig' %}
{% block title %}{{ timeline.title }} | {{ parent() }}{% endblock %}
{% block metas %}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta property="og:site_name" content="{{ timeline.title }} | RCmag Live" />
<meta property="og:url" content="https://www.rcmag.live/{{ timeline.slug }}" />
<meta property="og:image" content="https://www.rcmag.live/img/header/{{ timeline.header }}" />
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link href="{{ asset('css/timeline.css') }}" rel="stylesheet" />
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src="{{ asset('js/timeline.js') }}"></script>
{% endblock %}
{% block header %}
<header style="background-image: url({{ vich_uploader_asset(timeline, 'headerFile') }});">
<div class="container-fluid">
<div></div>
<div class="row header-text">
<div class="col-md-4"><a class="logo" href="/">RCmag Live</a></div>
<div class="col-md-8"><h1>{{ timeline.title }}</h1></div>
</div>
</div>
</header>
{% endblock %}
{% block body %}
<div class="container-fluid">
<ul class="timeline">
{% for article in timeline.articles %}
<li{% if (loop.index % 2) == 0 %} class="timeline-inverted"{% endif %}>
<div class="timeline-badge"><a href="#" data-toggle="tooltip" data-placement="{% if (loop.index % 2) == 0 %}left{% else %}right{% endif %}" title="{{ article.addedAt | date('d/m/Y H:i') }}"><i class="far fa-dot-circle"></i></a></div>
<div class="timeline-panel">
{% if article.videoHost %}<a class="timeline-video" target="_blank" href="https://www.youtube.com/watch?v={{ article.videoId }}">{% endif %}
{% if article.picture %}
<img class="img-fluid" src="{{ vich_uploader_asset(article, 'pictureFile') }}" />
{% elseif article.videoHost == 'youtube' %}
<img class="img-fluid" src="https://img.youtube.com/vi/{{ article.videoId }}/maxresdefault.jpg" />
{% endif %}
{% if article.videoHost %}</a>{% endif %}
<div class="timeline-heading">
<h4 class="timeline-title">{{ article.title }}</h4>
</div>
{% if article.text != '<p> </p>' %}<div class="timeline-body">
{{ article.text | raw }}
</div>{% endif %}
</div>
</li>
{% endfor %}
<li class="clearfix" style="float: none;"></li>
</ul>
</div>
{% endblock %}