templates/timeline.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ timeline.title }} | {{ parent() }}{% endblock %}
  3. {% block metas %}
  4.     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  5.     <meta name="viewport" content="width=device-width, initial-scale=1" />
  6.     <meta property="og:site_name" content="{{ timeline.title }} | RCmag Live" />
  7.     <meta property="og:url" content="https://www.rcmag.live/{{ timeline.slug }}" />
  8.     <meta property="og:image" content="https://www.rcmag.live/img/header/{{ timeline.header }}" />
  9. {% endblock %}
  10. {% block stylesheets %}
  11.     {{ parent() }}
  12.     <link href="{{ asset('css/timeline.css') }}" rel="stylesheet" />
  13. {% endblock %}
  14. {% block javascripts %}
  15.     {{ parent() }}
  16.     <script src="{{ asset('js/timeline.js') }}"></script>
  17. {% endblock %}
  18. {% block header %}
  19. <header style="background-image: url({{ vich_uploader_asset(timeline, 'headerFile') }});">
  20.     <div class="container-fluid">
  21.         <div></div>
  22.         <div class="row header-text">
  23.             <div class="col-md-4"><a class="logo" href="/">RCmag Live</a></div>
  24.             <div class="col-md-8"><h1>{{ timeline.title }}</h1></div>
  25.         </div>
  26.     </div>
  27. </header>
  28. {% endblock %}
  29. {% block body %}
  30. <div class="container-fluid">
  31.     <ul class="timeline">
  32.         {% for article in timeline.articles %}
  33.         <li{% if (loop.index % 2) == 0 %} class="timeline-inverted"{% endif %}>
  34.             <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>
  35.             <div class="timeline-panel">
  36.                 {% if article.videoHost %}<a class="timeline-video" target="_blank" href="https://www.youtube.com/watch?v={{ article.videoId }}">{% endif %}
  37.                 {% if article.picture %}
  38.                     <img class="img-fluid" src="{{ vich_uploader_asset(article, 'pictureFile') }}" />
  39.                 {% elseif article.videoHost == 'youtube' %}
  40.                     <img class="img-fluid" src="https://img.youtube.com/vi/{{ article.videoId }}/maxresdefault.jpg" />
  41.                 {% endif %}
  42.                 {% if article.videoHost %}</a>{% endif %}
  43.                 <div class="timeline-heading">
  44.                     <h4 class="timeline-title">{{ article.title }}</h4>
  45.                 </div>
  46.                 {% if article.text != '<p>&nbsp;</p>' %}<div class="timeline-body">
  47.                     {{ article.text | raw }}
  48.                 </div>{% endif %}
  49.             </div>
  50.         </li>
  51.         {% endfor %}
  52.         <li class="clearfix" style="float: none;"></li>
  53.     </ul>
  54. </div>
  55. {% endblock %}