templates/areas/sector-solutions-cards-brick/view.html.twig line 1

Open in your IDE?
  1. {# Defined as EditbleDialog field #}
  2. {% set sectors = sectors ?? pimcore_relations('sectors').getElements() %}
  3. {% embed 'app/area-brick-layout.html.twig' %}
  4.     {% block content %}
  5.         <section>
  6.             <div class="container py-10 md:py-14">
  7.                 {% if editmode or not pimcore_input('title').isEmpty() %}
  8.                     <h2 class="mb-10 text-2xl text-center md:text-4xl md:mb-20 max-w-[200px] md:max-w-none mx-auto">
  9.                         {{ pimcore_input('title', { placeholder: 'Titel' }) }}
  10.                     </h2>
  11.                 {% endif %}
  12.                 {% if editmode %}
  13.                     <div>
  14.                         {% if pimcore_relations('sectors') is empty %}
  15.                             <div class="alert alert-danger">
  16.                                 (Nog) geen sectoren gekoppeld.
  17.                             </div>
  18.                         {% endif %}
  19.                     </div>
  20.                 {% endif %}
  21.                 <div class="grid grid-cols-2 gap-3 font-bold md:gap-8 md:justify-center md:flex-wrap md:flex ">
  22.                     {% for sector in sectors %}
  23.                         <a
  24.                             href="{{ (sector.page.url ?? null) | trimUrl }}"
  25.                             class="flex flex-col items-center justify-center grid-cols-1 gap-2 transition-transform bg-white rounded-md md:w-1/3 lg:w-1/6 hover:drop-shadow-xl hover:text-blue aspect-square max-w-[186px] px-4"
  26.                         >
  27.                             {% if editmode %}
  28.                                 <div class="alert alert-danger">Geen gekoppelde pagina in huidige taal. Kaart is niet klikbaar.</div>
  29.                             {% endif %}
  30.                             {% if sector.icon %}
  31.                                 {{ sector.icon.thumbnail('sector-card-icon').html({
  32.                                     class: 'w-full',
  33.                                     pictureAttributes: {
  34.                                         class: ''
  35.                                     }
  36.                                 })|raw }}
  37.                             {% else %}
  38.                                 <div class="flex-grow"></div>
  39.                             {% endif %}
  40.                             <span class="leading-tight text-center">{{ sector.branchename ?: sector.key }}</span>
  41.                        </a>
  42.                     {% endfor %}
  43.                     {% if document.getProperty('sectorArchivePage') %}
  44.                         <a
  45.                             href="{{ document.getProperty('sectorArchivePage').url | trimUrl }}"
  46.                             class="flex flex-col items-center justify-center grid-cols-1 gap-5 text-white transition-transform rounded-md md:w-1/3 lg:w-1/6 bg-blue hover:drop-shadow-2xl aspect-square max-w-[186px] px-4"
  47.                         >
  48.                             <svg class="w-8 h-8" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
  49.                                 <path fill="#FFF" fill-rule="evenodd" d="M3.5 9a3.5 3.5 0 0 1 .192 6.995L3.5 16a3.5 3.5 0 0 1-.192-6.995L3.5 9Zm9 0a3.5 3.5 0 0 1 .192 6.995L12.5 16a3.5 3.5 0 0 1-.192-6.995L12.5 9Zm-9 1.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM3.5 0a3.5 3.5 0 0 1 .192 6.995L3.5 7A3.5 3.5 0 0 1 3.308.005L3.5 0Zm9 0a3.5 3.5 0 0 1 .192 6.995L12.5 7a3.5 3.5 0 0 1-.192-6.995L12.5 0Zm-9 1.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"/>
  50.                             </svg>
  51.                             <span class="leading-tight text-center">{{ "Bekijk alle sectoren"|trans }}</span>
  52.                         </a>
  53.                     {% elseif editmode %}
  54.                         <div class="alert alert-danger">
  55.                             Geen 'Sector Overzicht Pagina' (sectorArchivePage) property toegevoegd aan huidige taal.
  56.                         </div>
  57.                     {% endif %}
  58.                     </div>
  59.                 </div>
  60.             </div>
  61.         </section>
  62.     {% endblock %}
  63. {% endembed %}