templates/includes/partials/hero_content.html.twig line 1

Open in your IDE?
  1. {% set showButtonComment = pimcore_input('buttonComment').getData() | default() %}
  2. {% set showForm = pimcore_checkbox('showRentalForm').isChecked()  %}
  3. {% set showBottom = pimcore_checkbox('showRentalForm').isChecked() or pimcore_link('secondary-link').getHref()|default() or editmode or showButtonComment %}
  4. {% if (editmode) %}
  5.     {{ pimcore_image('label-icon') }}
  6.     <p>{{ pimcore_input('pre_title') }}</p>
  7.     <h1 class="mb-3 md:mb-4 text-[26px] leading-8 lg:text-[42px] lg:leading-[49px]">{{ pimcore_input('title') }}</h1>
  8.     <p class="text-base md:mb-8 md:text-lg lg:max-w-[470px]">{{ pimcore_textarea('description') }}</p>
  9. {% else %}
  10.     {% if pimcore_input('pre_title').getData() %}
  11.         <p class="flex text-[14px] max-w-max mb-3 md:mb-4 px-3 py-2 text-xs text-blue text-center bg-gray-100 rounded-full whitespace-nowrap">
  12.             {% if not pimcore_image('label-icon').isEmpty() %}
  13.                 {{ pimcore_image('label-icon').getThumbnail('sector-card-icon-small').html({
  14.                     pictureAttributes: {class: 'mr-2'},
  15.                 }) | raw }}
  16.             {% endif %}
  17.             {{ pimcore_input('pre_title').getData() }}
  18.         </p>
  19.     {% endif %}
  20.     <h1 class="mb-3 md:mb-4 text-[26px] leading-8 lg:text-[42px] lg:leading-[49px]">{{ pimcore_input('title').getData() ?: titleDefault ?? '' }}</h1>
  21.     <p class="text-base {% if showBottom %} md:mb-8 {% endif %} md:text-lg lg:max-w-[470px]">{{ pimcore_textarea('description').getData() ?: (defaultValue ?? "") }}</p>
  22. {% endif %}
  23. {% if showBottom %}
  24. <div class="flex flex-col sm:flex-row mt-6 gap-2 relative {% if showButtonComment %} mb-4 {% endif %}">
  25.     {% if showForm %}
  26.         {% include 'includes/partials/_rental-form.html.twig' with {
  27.             buttonText: pimcore_input('customButtonLabel').getData()|default('Offerte aanvragen') | trans,
  28.             buttonClass: 'button button__green group',
  29.             trackButtonId: 'conversion_requestquote',
  30.             requestUrl: data.request.url ?? null,
  31.         } %}
  32.     {% endif %}
  33.     {% if pimcore_link('secondary-link').getHref()|default() or editmode %}
  34.         {{ pimcore_link('secondary-link', {
  35.             class: 'button button__secondary group ' ~ (showForm  ? '' : '!pl-0'),
  36.             textSuffix: '<span class="flex items-center justify-center w-6 h-6 ml-3 transition-all bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white"><svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="currentColor" d="m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z"/></svg></span>'
  37.         }) }}
  38.     {% endif %}
  39.     {% if showButtonComment %}
  40.         <div class="flex items-start justify-center mt-2 ml-2 text-xs md:ml-0 md:my-0 md:left-0 md:absolute text-blue whitespace-nowrap md:-bottom-8">
  41.             <span class="hidden md:absolute md:block -top-10 -left-10">
  42.                 <img src="/static/img/icons/comment.svg" alt="">
  43.             </span>
  44.             <span class="md:hidden">
  45.                 <svg width="22" height="20" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="107118525210612011410197100"><path d="M12.01 0v18.086H0V0h12.01Z"/></clipPath><clipPath id="53121112112521191031055798"><path d="M11.341 0c.201.002.4.104.54.286a.664.664 0 0 1 .094.604c-.166.581-.432 1.06-.679 1.58-.449.82-.819 1.6-.889 2.583a.724.724 0 0 1-.285.53l-.082.05c-.081.039-.202.098-.362-.023a.633.633 0 0 1-.636-.69c.039-.902.327-1.682.664-2.38C3.883 5.828.71 11.463 1.425 17.332a.66.66 0 1 1-1.309.185c-.802-6.418 2.6-12.55 8.86-16.115-.57.028-1.148.053-1.768.063-.401-.004-.7-.308-.677-.67.004-.401.309-.7.67-.676.663.027 1.346-.007 2.03-.04a64.742 64.742 0 0 1 2.11-.08Z"/></clipPath><clipPath id="5353105120011210011111656"><path d="M12.01 0v18.086H0V0h12.01Z"/></clipPath></defs><g clip-path="url(#107118525210612011410197100)" transform="rotate(-57 9.275 5.036)"><g clip-path="url(#53121112112521191031055798)"><g clip-path="url(#5353105120011210011111656)"><path fill="#0071BA" d="M0 0h12.009v18.086H0V0z"/></g></g></g></svg>
  46.             </span>
  47.             <span class="py-2 md:py-0">{{ pimcore_input('buttonComment').getData() }}</span>
  48.         </div>
  49.     {% endif %}
  50. </div>
  51. {% endif %}