templates/areas/unique-selling-point-brick/view.html.twig line 1

Open in your IDE?
  1. {% embed 'app/area-brick-layout.html.twig' %}
  2.     {% block content %}
  3.         {% set textColor = brickBackgroundColor is not defined or brickBackgroundColor == 'bg-white' or brickBackgroundColor == 'bg-blue-200' ? 'text-black' : 'text-white' %}
  4.         <section class="container unique-selling-point-brick {{ textColor }} {{ sectionPadding is defined ? sectionPadding : 'py-10 md:py-20' }}">
  5.             <div class="grid grid-cols-12 md:gap-6 ">
  6.                 <div class="col-span-12 md:col-span-6">
  7.                     <h2 class="mb-4 text-2xl md:text-3xl lg:text-4xl">
  8.                         {% include 'areas/unique-selling-point-brick/partials/_title.html.twig' %}
  9.                     </h2>
  10.                 </div>
  11.                 {% if hideWysiwyg is not defined or hideWysiwyg is false %}
  12.                     <div class="col-span-12 mb-4 md:col-span-6 md:mb-6">
  13.                         {% include 'includes/partials/_wysiwyg.html.twig' with {
  14.                             'fieldName': textFieldName ?? "text-bold-align-left-text",
  15.                             'defaultWysiwyg': textDefaultInput ?? null,
  16.                             'defaultWysiwygInfo' : textDefaultInput ?? "Vul Tekst in" } %}
  17.                     </div>
  18.                 {% endif %}
  19.             </div>
  20.             {% include 'areas/unique-selling-point-brick/partials/edit/_usps-iterator-notice.html.twig' %}
  21.        
  22.             {% set uspsBlock = pimcore_block('usps', {manual: true}) %}
  23.             {% do uspsBlock.start() %}
  24.                 <div class="grid grid-cols-12 gap-6 pt-5 md:pt-10">
  25.                     {% for i in uspsBlock.iterator %}
  26.                         {% do uspsBlock.blockConstruct() %}
  27.                             <div class="flex col-span-12 gap-4 text-left md:col-span-6 border-blue
  28.                                 {{ align is defined and align is same as('left') ? '' : 'md:block' }}
  29.                                 {{ columns is defined and columns is same as(3) ? 'lg:col-span-4' : 'lg:col-span-3' }}
  30.                             ">
  31.                                 {% do uspsBlock.blockStart() %}
  32.                                     <div>
  33.                                         <div class="inline-block mb-4 md:mb-5">
  34.                                             {{ pimcore_image("image", {
  35.                                                 "title": "Sleep een afbeelding hierheen.",
  36.                                                 'thumbnail': 'default',
  37.                                                 'pictureAttributes': {class: 'w-8 h-8 md:h-14 md:w-14 mx-auto block'}
  38.                                                 }
  39.                                             ) }}
  40.                                         </div>
  41.                                     </div>
  42.                                     <div>
  43.                                         {% if editmode %}
  44.                                             <h3>{{ pimcore_input('title', {'placeholder': "Unique Selling Point titel"}) }}</h3>
  45.                                         {% endif %}
  46.                                         {% if not editmode and pimcore_input('title') is not empty %}
  47.                                             <h3 class="mb-0 text-lg font-bold lg:mb-1 md:text-xl">{{ renderOrDefault(pimcore_input('title'),defaultTitle ?? "") }}</h3>
  48.                                         {% endif %}
  49.                                         <span class="{{ textColor === 'text-black' ? 'text-gray-800' : textColor }}">
  50.                                             {{ pimcore_wysiwyg('content', {'placeholder': "Unique Selling Point content"}) }}
  51.                                         </span>
  52.                                     </div>
  53.                                 {% do uspsBlock.blockEnd() %}
  54.                             </div>
  55.                         {% do uspsBlock.blockDestruct() %}
  56.                     {% endfor %}
  57.                 </div>
  58.             {% do uspsBlock.end() %}
  59.         </section>
  60.         {% include 'areas/unique-selling-point-brick/partials/edit/_edit-styling.html.twig' %}
  61.     {% endblock %}
  62. {% endembed %}