templates/blog/post.html.twig line 1

Open in your IDE?
  1. {% extends 'main/_tpl.html.twig' %}
  2. {% block javascripts_body %}
  3.     {{ parent() }}
  4.     {{ encore_entry_script_tags('blog') }}
  5.     {{ encore_entry_link_tags('blog') }}
  6. {% endblock %}
  7. {% block content %}
  8.     <div class="blog blog-page">
  9.         <div class="block block_padding_top">
  10.             <div class="page-head">
  11.                 <ul class="breadcrumbs">
  12.                     <li class="breadcrumbs__entry"><a class="breadcrumbs__lnk" href="{{ path('home') }}">Главная</a></li>
  13.                     <li class="breadcrumbs__entry"><a class="breadcrumbs__lnk" href="{{ path('blog_index.ru') }}">Блог</a>
  14.                     <li class="breadcrumbs__entry"><a class="breadcrumbs__lnk" href="{{ path('blog_post', {slug:post.slug}) }}">{{ post.title }}</a></li>
  15.                 </ul>
  16.             </div>
  17.             <div class="colgroup">
  18.                 <div class="col col_left col_body">
  19.                     <img class="blog-page__main-img" src="{{ vich_uploader_asset(post, 'posterImageFile') }}" alt="{{ post.title }}">
  20.                     <h1>{{post.title}}</h1>
  21.                     {% if post.description %}
  22.                         <p>{{ post.description }}</p>
  23.                     {% endif %}
  24.                     <div class="entry__top">
  25.                         <div class="entry__tags">
  26.                             {% for tag in post.tags %}
  27.                                 <a href="{{ path('blog_tag', {slug: tag.slug}) }}" class="tags__lnk">#{{ tag.name }}</a>
  28.                             {% endfor %}
  29.                         </div>
  30.                         <div class="entry__date">{{ post.createdAt|date('d.m.Y') }}</div>
  31.                     </div>
  32.                     {% for contentBlock in post.blogContents %}
  33.                     <div>
  34.                         <h2>{{ contentBlock.title }}</h2>
  35.                         {{ contentBlock.text|raw }}
  36.                         <img src="{{ vich_uploader_asset(contentBlock, 'imageFile') }}" alt="">
  37.                     </div>
  38.                         {% if contentBlock.videoLink|length %}
  39.                             <div class="blog__video">
  40.                                 <iframe src="{{ contentBlock.videoLink }}" frameborder="0" allowfullscreen></iframe>
  41.                             </div>
  42.                         {% endif %}
  43.                     {% endfor %}
  44.                     {% if post.buttonText and post.buttonLink %}
  45.                     <div class="btn-container">
  46.                         <a href="{{ post.buttonLink }}" class="btn btn_blue">{{ post.buttonText }}</a>
  47.                     </div>
  48.                     {% endif %}
  49.                 </div>
  50.                 <div class="col col_right col_aside">
  51.                     {% if similar|length %}
  52.                     <div class="blog-more">
  53.                         <div class="blog-more__title">Больше интересного:</div>
  54.                         <div class="blog__list">
  55.                             {% for p in similar %}
  56.                             <div class="blog__entry">
  57.                                 <a href="{{ path('blog_post', {slug: p.slug}) }}" class="entry__lnk"></a>
  58.                                 <img class="entry__photo" src="{{ vich_uploader_asset(p, 'posterImageFile') }}" alt="{{ post.title }}">
  59.                                 <div class="entry__top">
  60.                                     <div class="entry__date">{{ p.createdAt|date('d.m.Y') }}</div>
  61.                                     <div class="entry__tags">
  62.                                         {% for tag in p.tags %}
  63.                                             <a href="{{ path('blog_tag', {slug: tag.slug}) }}" class="tags__lnk">#{{ tag.name }}</a>
  64.                                         {% endfor %}
  65.                                     </div>
  66.                                 </div>
  67.                                 <div class="entry__title">{{ p.title }}</div>
  68.                             </div>
  69.                             {% endfor %}
  70.                         </div>
  71.                     </div>
  72.                     {% endif %}
  73.                     <div class="tags">
  74.                         {% for tag in tags %}
  75.                             <a href="{{ path('blog_tag', {slug: tag.slug}) }}" class="tags__lnk">#{{ tag.name }}</a>
  76.                         {% endfor %}
  77.                     </div>
  78.                 </div>
  79.             </div>
  80.         </div>
  81.         <div class="block block_padding_bottom">
  82.             <div class="tgbanner">
  83.                 <div class="tgbanner__title">Подпишитесь на&nbsp;наш
  84.                     <nobr>Telegram-канал,</nobr>
  85.                 </div>
  86.                 <p>чтобы быть в&nbsp;курсе новостей&nbsp;GetMeBack раньше&nbsp;всех</p>
  87.                 <div class="tgbanner__btn-container">
  88.                     <a href="https://t.me/getmeback_russia" target="_blank" class="btn btn_white">Подписаться</a>
  89.                 </div>
  90.             </div>
  91.         </div>
  92.     </div>
  93. {% endblock %}