templates/areas/hero-projects-with-text-and-button-brick/view.html.twig line 1

Open in your IDE?
  1. {% include 'includes/partials/hero_usp_bar.html.twig' %}
  2. {% embed 'app/area-brick-layout.html.twig' %}
  3.     {% block content %}
  4.         <!-- Text + Cards 2 columns -->
  5.         <section class="relative text-white bg-blue-300">
  6.             {# Defined as Dialog field. #}
  7.             {% if not pimcore_image('background-image').isEmpty() %}
  8.                 {# Doing getThumbnail() instead of direct echo so image also gets rendered in editmode. #}
  9.                 {{ pimcore_image('background-image').getThumbnail('projects-hero-background-image').html({
  10.                     pictureAttributes: {class: 'z-0 absolute top-1/2 -translate-y-1/2'}
  11.                 }) | raw }}
  12.             {% endif %}
  13.             <div
  14.                 class="container relative z-10 flex flex-wrap items-center gap-6 py-10 pr-0 mx-auto overflow-hidden md:py-20 lg:pr-20 lg:flex-nowrap">
  15.                 <div class="w-full pr-5 lg:w-5/12">
  16.                     <span class="inline-block mb-3 text-base font-bold md:text-lg">
  17.                         {{ pimcore_input('subtitle', { placeholder: 'Subtitel' }) }}
  18.                     </span>
  19.                     <h2 class="mb-4 text-3xl lg:text-5xl">
  20.                         {{ pimcore_input('title', { placeholder: 'Titel' }) }}
  21.                     </h2>
  22.                     <p class="mb-8 text-lg">
  23.                         {{ pimcore_textarea('text', { placeholder: 'Tekst' }) }}
  24.                     </p>
  25.                     {{ pimcore_link('link', {
  26.                         placeholder: 'Link',
  27.                         class: 'button button__primary',
  28.                     }) }}
  29.                 </div>
  30.                 <div class="mt-6 lg:w-7/12 lg:mt-0">
  31.                     <div class="swiper project-swiper">
  32.                         <div class="swiper-wrapper lg:flex">
  33.                             {# Defined in Brick as editableContent fields #}
  34.                             {% for project in pimcore_relations('projects') %}
  35.                                 {# Also see areas/projects-card-slider-brick/card.html.twig #}
  36.                                 {% set page = project.page() %}
  37.                                 <a href="{{ page ? (page.url | trimUrl) : '' }}" class="!w-11/12 lg:!w-6/12 swiper-slide pr-6">
  38.                                     {% set image = project.visuals.current() %}
  39.                                     {% if image %}
  40.                                         <div class="relative">
  41.                                             {{ image.getThumbnail('projects-hero-1').html({
  42.                                                 pictureAttributes: {class: 'inline-block mb-5 overflow-hidden rounded-md'}
  43.                                             })|raw }}
  44.                                         </div>
  45.                                     {% endif %}
  46.                                     <span
  47.                                         class="block mb-3 text-lg">{{ (project.meta_description ?: (project.webdesq_content|striptags|slice(0, 38) ~ '...'))|raw }}</span>
  48.                                     <h3 class="text-2xl leading-7">{{ project.title }}</h3>
  49.                                 </a>
  50.                             {% endfor %}
  51.                         </div>
  52.                         <div class="flex items-center justify-between gap-6 mt-6 mr-5 lg:hidden">
  53.                             <div class="flex items-center custom-swiper-pagination"></div>
  54.                             <div class="flex gap-2.5 items-center text-white">
  55.                                 <div class="arrow-swiper-button-prev">
  56.                                     <svg width="24px" height="18px" xmlns="http://www.w3.org/2000/svg"><g id="&gt;-Klimaatbeheersing-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" ><g id="coolworld-product-category-vd-375-v02.3" transform="translate(-296 -3452)" fill="currentColor"><g id="Group-4" transform="translate(0 3333)"><g id="components/navigation/mobile/carousel" transform="translate(21 116)"><g id="icons/ui/arrow-line-right-copy" transform="translate(275 3)"><path d="M22.659 7.643H5.095L9.92 2.817A1.328 1.328 0 1 0 8.044.939L.707 8.277a1 1 0 0 0 0 1.414l7.337 7.338a1.328 1.328 0 0 0 1.878-1.878l-4.827-4.826h17.564a1.341 1.341 0 0 0 0-2.682Z" id="arrow-line-left" transform="matrix(1 0 0 -1 0 17.968)"/></g></g></g></g></g></svg>
  57.                                 </div>
  58.                                 <div class="arrow-swiper-button-next">
  59.                                     <svg width="24px" height="18px" xmlns="http://www.w3.org/2000/svg"><g id="&gt;-Klimaatbeheersing-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="coolworld-product-category-vd-375-v02.3" transform="translate(-332 -3452)" fill="currentColor"><g id="Group-4" transform="translate(0 3333)"><g id="components/navigation/mobile/carousel" transform="translate(21 116)"><g id="icons/ui/arrow-line-right" transform="translate(311 3)"><path d="M22.659 7.643H5.095L9.92 2.817A1.328 1.328 0 1 0 8.044.939L.707 8.277a1 1 0 0 0 0 1.414l7.337 7.338a1.328 1.328 0 0 0 1.878-1.878l-4.827-4.826h17.564a1.341 1.341 0 0 0 0-2.682Z" id="arrow-line-right" transform="matrix(-1 0 0 1 24 0)"/></g></g></g></g></g></svg>
  60.                                 </div>
  61.                             </div>
  62.                         </div>
  63.                     </div>
  64.                 </div>
  65.             </div>
  66.         </section>
  67.     {% endblock %}
  68. {% endembed %}