templates/module/page.html.twig line 1

Open in your IDE?
  1. {# @var module \App\Entity\ModulePage #}
  2. {% extends 'main/_tpl.html.twig' %}
  3. {% block javascripts_body %}
  4.     {{ parent() }}
  5.     {{ encore_entry_script_tags('module') }}
  6.     {{ encore_entry_link_tags('module') }}
  7. {% endblock %}
  8. {% block content %}
  9.     <div class="content">
  10.         <div class="content-head">
  11.             <div class="block">
  12.                 <div class="page-head">
  13.                     <ul class="breadcrumbs">
  14.                         <li class="breadcrumbs__entry breadcrumbs__entry_current"><a class="breadcrumbs__lnk" href="{{ path('home') }}">Главная</a></li>
  15.                         <li class="breadcrumbs__entry"><a class="breadcrumbs__lnk" href="{{ path('module_page.ru', {slug:module.slug}) }}">{{ module.title }}</a></li>
  16.                     </ul>
  17.                     <h1>{{ module.title }}</h1>
  18.                 </div>
  19.                 <p class="ta-center">{{ module.description|nl2br }}</p>
  20.                 {% if module.attachments|length %}
  21.                 <div class="content__main-slider">
  22.                     {% for attach in module.attachments %}
  23.                         <img src="{{ vich_uploader_asset(attach, 'imageFile') }}" alt="{{ module.title }}">
  24.                     {% endfor %}
  25.                 </div>
  26.                 {% endif %}
  27.             </div>
  28.         </div>
  29.         {% if module.capabilityTitle %}
  30.         <div class="content-text">
  31.             <div class="block block_padding">
  32.                 <h2>{{ module.capabilityTitle }}</h2>
  33.                 {{ module.capabilityText|raw }}
  34.             </div>
  35.         </div>
  36.         {% endif %}
  37.         {% if module.configureTitle %}
  38.         <div class="content-text">
  39.             <div class="block block_padding">
  40.                 <h2>{{  module.configureTitle }}</h2>
  41.                 {{  module.configureText|raw }}
  42.             </div>
  43.         </div>
  44.         {% endif %}
  45.         {% if module.featureText %}
  46.             <div class="content-feature">
  47.                 <div class="block">
  48.                     {% if module.featureYouTube %}
  49.                         <div class="feature__video">
  50.                             <iframe src="{{ module.featureYouTube|youtube_embed }}?controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  51.                         </div>
  52.                     {% elseif module.featureImage %}
  53.                         <img class="feature__img" src="{{ vich_uploader_asset(module, 'featureImageFile') }}" alt="">
  54.                     {% endif %}
  55.                     <div class="feature__text">
  56.                         {{ module.featureText|raw }}
  57.                         <a class="btn btn_blue" href="{{ path('register') }}" onclick="{{ YM.goal('free') }}">{{ module.featureBtnText|default('Попробовать бесплатно') }}</a>
  58.                     </div>
  59.                 </div>
  60.             </div>
  61.         {% endif %}
  62.         <div class="content-tariff">
  63.             <div class="block block_padding">
  64.                 <h2>Модуль доступен на&nbsp;тарифах</h2>
  65.                 <table class="tariff__tbl">
  66.                     <thead>
  67.                     <tr>
  68.                         <th></th>
  69.                         {% set tariffs = constant("App\\Entity\\ModulePage::TARIFFS") %}
  70.                         {% set tariffRows = '' %}
  71.                         {% for tariff,id in tariffs %}
  72.                             <th>{{ tariff }}</th>
  73.                             {% set tariffRows = tariffRows ~ '<td>'
  74.                                 ~ (id in module.tariffs ? '<span class="round"></span>': '<span class="cross"></span>')
  75.                                 ~ '</td>'
  76.                             %}
  77.                         {% endfor %}
  78.                     </tr>
  79.                     </thead>
  80.                     <tbody>
  81.                     <tr>
  82.                         <td>{{ module.title }}</td>
  83.                         {{ tariffRows|raw }}
  84.                     </tr>
  85.                     </tbody>
  86.                 </table>
  87.                 <div class="ta-center"><a class="btn btn_blue" href="{{ path('tariff.ru') }}">Посмотреть тарифы</a></div>
  88.             </div>
  89.         </div>
  90.     </div>
  91. {% endblock %}