templates/blog/show.html.twig line 1

Open in your IDE?
  1. {% extends 'layout/layout-right-columns.html.twig' %}
  2. {% if article.videoPoster is empty %}
  3.     {% set video_poster = '/build/images/poster_default.png' %}
  4. {% else %}
  5.     {% set video_poster = '/uploads/videos/poster/' ~  article.videoPoster.src %}
  6. {% endif %}
  7. {% block column_center %}
  8.     <section class="mn-sec">
  9.         <div class="mn-vid-sc single_video">
  10.             <div class="vid-1">
  11.                 <div class="vid-pr">
  12.                     <video id="my-video" class="video-js" controls preload="auto" width="640" height="264" poster="{{ video_poster }}" data-setup="{}">
  13.                         <source src="/uploads/videos/{{ article.video.src }}" type="{{ article.video.mime }}"/>
  14.                     </video>
  15.                 </div>
  16.                 <!--vid-pr end-->
  17.                 <div class="vid-info">
  18.                     <h3>{{ article.video.title }}</h3>
  19.                 </div>
  20.                 <!--vid-info end-->
  21.             </div>
  22.             <!--vid-1 end-->
  23.             <div class="abt-mk">
  24.                 <div class="info-pr-sec">
  25.                     <div class="vcp_inf cr">
  26.                         <div class="vc_info pr">
  27.                             <span>Publié le :
  28.                                 {{ article.createdAt|date(config.dateFormat) }}</span>
  29.                         </div>
  30.                     </div>
  31.                     <!--vcp_inf end
  32.                     <ul class="df-list">
  33.                         <li>
  34.                             <button data-toggle="tooltip" data-placement="top" title="Share">
  35.                                 <i class="icon-share"></i>
  36.                             </button>
  37.                         </li>
  38.                     </ul>
  39.                     df-list end-->
  40.                     <div class="clearfix"></div>
  41.                 </div>
  42.                 <div class="clearfix"></div>
  43.                 <div class="about-ch-sec">
  44.                     <div class="abt-rw">
  45.                         <h4>Catégorie :
  46.                         </h4>
  47.                         <p>{{ article.category.title }}</p>
  48.                     </div>
  49.                     <div class="abt-rw">
  50.                         <h4>Description :
  51.                         </h4>
  52.                         <p>
  53.                             {{ article.video.description|raw }}
  54.                         </p>
  55.                     </div>
  56.                     {% if article.tags is not empty %}
  57.                         <div class="abt-rw tgs">
  58.                             <h4>Tags :
  59.                             </h4>
  60.                             <p>
  61.                                 {% for tag in article.tags %}
  62.                                     <span class="tag badge bg-info">#{{ tag.name }}</span>
  63.                                 {% endfor %}
  64.                             </p>
  65.                         </div>
  66.                     {% endif %}
  67.                 </div>
  68.                 <!--about-ch-sec end-->
  69.             </div>
  70.             <!--abt-mk end-->
  71.             {% if article.videoMarkers.count %}
  72.                 <div class="amazon">
  73.                     <div class="abt-amz">
  74.                         <div class="amz-hd">
  75.                             <h2>Documents relatifs</h2>
  76.                         </div>
  77.                         <!--amz-hd end-->
  78.                         <div class="clearfix"></div>
  79.                     </div>
  80.                     <!--abt-amz end-->
  81.                     <div class="amz-img-inf">
  82.                         <div id="videoMarker-list" class="row">
  83.                             {% for videoMarker in article.videoMarkers %}
  84.                                 <div class="col-lg-3 col-md-3 col-sm-6 col-6 full_wdth">
  85.                                     <div id="videoMarker-{{ videoMarker.id }}" class="videoMarker-item" data-timecode="{{ videoMarker.timecode }}" data-duration="{{ videoMarker.duration }}" data-title=" {{ videoMarker.title }} ">
  86.                                         
  87.                                         {% for attachment in videoMarker.attachments %}
  88.                                             {% if 'vnd.openxmlformats' in attachment.mime %}
  89.                                                 {% set icon = 'word.jpg' %}
  90.                                             {% elseif 'pdf' in attachment.mime %}
  91.                                                 {% set icon = 'pdf.png' %}
  92.                                             {% elseif 'vnd.ms-excel' in attachment.mime %}
  93.                                                 {% set icon = 'excel.jpg' %}
  94.                                             {% elseif 'vnd.ms-powerpoint' in attachment.mime %}
  95.                                                 {% set icon = 'powerpoint.jpg'%}
  96.                                             {% else %}
  97.                                                 {% set icon = 'txt.png' %}
  98.                                             {% endif %}
  99.                                             <div class="mg-inf">
  100.                                                 <div id="document-{{ attachment.id }}" class="document" data-media-src="{{ attachment.src }}" data-media-icon="{{ icon }}" data-media-title="{{ attachment.title }}" data-media-description="{{ attachment.description }}">
  101.                                                     <div class="img-sr">
  102.                                                         <a target="_blank" href="/uploads/documents/{{ attachment.src }}" title="{{ attachment.title }}">
  103.                                                             <img src="{{ asset('build/images/photos/' ~ icon) }}" alt="">
  104.                                                         </a>
  105.                                                     </div>
  106.                                                     <div class="info-sr">
  107.                                                         <h3>
  108.                                                             <a target="_blank" href="/uploads/documents/{{ attachment.src }}" title="{{ attachment.title }}">{{ attachment.title }}</a>
  109.                                                             <span class="document-timecode">
  110.                                                                 -
  111.                                                                 {{ videoMarker.timecode|timecode }}</span>
  112.                                                         </h3>
  113.                                                     </div>
  114.                                                 </div>
  115.                                             </div>
  116.                                         {% endfor %}
  117.                                     </div>
  118.                                     <!--mg-inf end-->
  119.                                 </div>
  120.                             {% endfor %}
  121.                         </div>
  122.                     </div>
  123.                     <!--amz-img-in-->
  124.                 </div>
  125.             {% endif %}
  126.             <!--amazon end-->
  127.         </div>
  128.     </section>
  129.     <!--mn-sec end-->
  130.     {{ encore_entry_script_tags('videojs') }}
  131. {% endblock %}
  132. {% block column_right %}
  133.     <div class="sidebar">
  134.         {% include "blog/_video_associated.html.twig" with articles %}
  135.         <!--videoo-list-ab end-->
  136.     </div>
  137.     <!--side-bar end-->
  138. {% endblock %}