templates/snippets/testimonials.html.twig line 1

Open in your IDE?
  1. {% extends "layout-snippets.html.twig" %}
  2. {% block snippets %}
  3.     <section class="apk-snippet-testimonials">
  4.         <div class="uk-container apk-container-1200">
  5.             {% if editmode %}
  6.                 <hr />
  7.                 <div>
  8.                     <strong>Type</strong> de heading pour le titre ?
  9.                     <br>
  10.                     {{ pimcore_select("content-heading", {
  11.                         "store" : [
  12.                             ['span', 'span'],
  13.                             ['h2', 'Heading 2'],
  14.                             ['h3', 'Heading 3'],
  15.                             ['h4', 'Heading 4'],
  16.                             ['h5', 'Heading 5'],
  17.                             ['h6', 'Heading 6']
  18.                         ],
  19.                         "defaultValue" : "h2"
  20.                     }) }}
  21.                 </div>
  22.                 <div>
  23.                     <strong>Style</strong> du heading pour le titre ?
  24.                     <br>
  25.                     {{ pimcore_select("content-heading-style", {
  26.                         "store" : [
  27.                             ['h2', 'Heading 2'],
  28.                             ['h3', 'Heading 3'],
  29.                             ['h4', 'Heading 4'],
  30.                             ['h5', 'Heading 5'],
  31.                             ['h6', 'Heading 6']
  32.                         ],
  33.                         "defaultValue" : "h2"
  34.                     }) }}
  35.                 </div>
  36.                 <h2 class="uk-h2 uk-text-center">{{ pimcore_textarea("title",{"nl2br" : true}) }}</h2>
  37.             {% else %}
  38.                 <div class="uk-text-center uk-margin-medium-bottom">
  39.                     {% if not pimcore_textarea("title").isEmpty %}
  40.                         {% if pimcore_select("content-heading").getData() == 'span' %}
  41.                             <span class="uk-h2">
  42.                                 {{ pimcore_textarea("title", {
  43.                                 "nl2br" : true}) }}
  44.                             </span>
  45.                         {% else %}
  46.                             {% set content_heading = pimcore_select("content-heading").getData() ?: 'h2' %}
  47.                             {% if content_heading == 'h1' %}
  48.                                 {% set content_heading = 'h2' %}
  49.                             {% endif %}
  50.                             <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  51.                                 {{ pimcore_textarea("title", {
  52.                                 "nl2br" : true}) }}
  53.                             </{{ content_heading }}>
  54.                         {% endif %}
  55.                     {% endif %}
  56.                 </div>
  57.             {% endif %}
  58.                 <div class="uk-slider" uk-slider="autoplay: true; finite: false; autoplay-interval: 5000">
  59.                     <div class="uk-position-relative uk-visible-toggle" tabindex="-1">
  60.                         <ul class="uk-slider-items uk-grid uk-child-width-1-2@s uk-child-width-1-3@m uk-grid-large" uk-grid uk-height-match="target: blockquote">
  61.                             {% for testimonial in testimonials %}
  62.                             <li>
  63.                                 <div>
  64.                                     <blockquote>
  65.                                         {{ testimonial.quote }}
  66.                                         <img src="/static/img/pictos/icon-quote.svg" class="uk-preserve apk-testimonial-icon-quote" width="32" alt="" uk-svg />
  67.                                     </blockquote>
  68.                                     <div class="apk-testimonial-author">
  69.                                         <div class="uk-grid uk-grid-small" uk-grid>
  70.                                             <div class="uk-width-auto">
  71.                                                 {% if testimonial.picture is empty %}
  72.                                                 {% else %}
  73.                                                 <img src="{{ testimonial.picture.thumbnail('global-image') }}" class="uk-border-circle" width="60" height="60" alt="{{ testimonial.fullname }}" loading="lazy" decoding="async" />
  74.                                                 {% endif %}
  75.                                             </div>
  76.                                             <div class="uk-width-expand">
  77.                                                 <strong>{{ testimonial.fullname }}</strong><br />
  78.                                                 <span>{{ testimonial.position }}</span><br />
  79.                                                 <span>{{ testimonial.company }}</span>
  80.                                             </div>
  81.                                         </div>
  82.                                     </div>
  83.                                     <div class="apk-testimonial-actions uk-flex uk-margin-small">
  84.                                         {#
  85.                                         <a href="/{{ app.request.locale }}/references/references-and-testimonials">{{"View all"|trans}}</a>
  86.                                         <img src="/static/img/pictos/icon-arrow-right.svg" alt="" uk-svg />
  87.                                     #}
  88.                                     </div>
  89.                                 </div>
  90.                             </li>
  91.                             {% endfor %}
  92.                         </ul>
  93.                         <a class="uk-position-center-left uk-position-small uk-hidden-hover" href="#" uk-slidenav-previous uk-slider-item="previous"></a>
  94.                         <a class="uk-position-center-right uk-position-small uk-hidden-hover" href="#" uk-slidenav-next uk-slider-item="next"></a>
  95.                     </div>
  96.                     <ul class="uk-slider-nav uk-dotnav uk-flex-center uk-margin"></ul>
  97.                 </div>
  98.         </div>
  99.     </section>
  100. {% endblock snippets %}