templates/areas/text-and-links-brick/view.html.twig line 1

Open in your IDE?
  1. {% set style = style ?? pimcore_select('style').getData() %}
  2. {% embed 'app/area-brick-layout.html.twig' %}
  3.     {% block content %}
  4.         {% if style == 'normal' %}
  5.             <!-- Contact Full Width -->
  6.             <section class="{{ defaultBackgroundColor ?? null }} relative">
  7.                 <div class="{{ containerClasses ?? 'container relative py-10 md:py-20 z-20' }}">
  8.                     <div class="{{ elementClasses ?? '' }} relative flex flex-col lg:flex-row gap-6 p-6 md:p-10 text-white bg-blue-300 rounded-md">
  9.                         <div>
  10.                             {{ pimcore_image('image', {
  11.                                 thumbnail: 'text-and-link-icon',
  12.                                 width: 52,
  13.                                 height: 52,
  14.                                 imgAttributes: {class: 'rounded-full'},
  15.                                 pictureAttributes: {class: 'w-full'},
  16.                             }) }}
  17.                         </div>
  18.                         <div class="grow">
  19.                             <span class="block mb-2 text-xl font-bold md:leading-5 md:text-lg ">
  20.                                 {{ pimcore_input('title', { placeholder: 'Titel' }) }}
  21.                             </span>
  22.                             <span class="text-base">
  23.                                 {{ pimcore_input('subtitle', { placeholder: 'Subtitel' }) }}
  24.                             </span>
  25.                         </div>
  26.                         <div class="flex flex-col items-center lg:flex-row justify-top d">
  27.                             {{ pimcore_link('main-link', { class: 'button button__primary' }) }}
  28.                             {{ pimcore_link('secondary-link', {
  29.                                 class: 'button button__secondary button__secondary--white group ',
  30.                                 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>'
  31.                             }) }}
  32.                         </div>
  33.                     </div>
  34.                 </div>
  35.             </section>
  36.         {% elseif style == 'small' %}
  37.             {{ pimcore_inc(document.getProperty('contactCardSnippet')) }}
  38.         {% elseif style == 'full-width-thin' %}
  39.             {% set showAsUrgent = pimcore_checkbox('showAsUrgent').data %}
  40.             <!-- Quick Contact -->
  41.             <section class="text-base leading-tight text-white bg-green">
  42.                 <div class="container flex items-center mx-auto {{ editmode ? 'flex-row' : 'gap-2 justify-between' }}">
  43.                     <span class="inline-flex items-center shrink-0">
  44.                         {{ pimcore_image('image', {
  45.                             thumbnail: 'text-and-link-icon',
  46.                             width: 32,
  47.                             height: 32,
  48.                             imgAttributes: {class: 'rounded-full w-8 h-8'},
  49.                             pictureAttributes: {class: 'hidden sm:inline-block mr-3 my-2 flex-auto shrink-0'},
  50.                         }) }}
  51.                         <div class="flex flex-row items-center gap-1 my-4">
  52.                             <strong>{{ pimcore_input('title', { placeholder: 'Titel' }) }}</strong>
  53.                             <span class="{{ editmode ? '' : 'hidden lg:inline' }}">{{ pimcore_input('subtitle', { placeholder: 'Subtitel' }) }}</span>
  54.                         </div>
  55.                     </span>
  56.                     {% if showAsUrgent is defined and pimcore_checkbox('showAsUrgent').data %}
  57.                         {% set 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 14 14"><path fill="currentColor" fill-rule="evenodd" d="m13.47 9.12-2.8-.7a.703.703 0 0 0-.752.292L8.126 11.4A11.959 11.959 0 0 1 2.6 5.874l2.688-1.792a.7.7 0 0 0 .291-.752l-.7-2.8A.7.7 0 0 0 4.2 0H.7a.7.7 0 0 0-.7.7C.01 8.042 5.958 13.99 13.3 14a.7.7 0 0 0 .7-.7V9.8a.7.7 0 0 0-.53-.68Z"/></svg></span>' %}
  58.                     {% else %}
  59.                         {% set 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="w-2.5 h-2.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>' %}
  60.                     {% endif %}
  61.                     {{ pimcore_link('secondary-link', {
  62.                         class: 'button button__secondary button__secondary--white !w-auto !px-0 !justify-end group ',
  63.                         textSuffix: textSuffix,
  64.                     }) }}
  65.                 </div>
  66.             </section>
  67.             {% if editmode %}
  68.                 <label>
  69.                     {{ pimcore_checkbox('showAsUrgent', { reload: true }) }}
  70.                     <span>Show telephone icon after link.</span>
  71.                 </label>
  72.             {% endif %}
  73.         {% elseif style == 'full-width-thick' %}
  74.             <!-- Sticky CTA -->
  75.             <section class="container flex flex-col items-center justify-between py-4 lg:flex-row">
  76.                 <h2 class="mb-4 text-3xl leading-8 grow lg:mb-0">
  77.                     <span class="text-blue">{{ pimcore_input('title', { placeholder: 'Titel' }) }}</span> {{ pimcore_input('subtitle', { placeholder: 'Subtitel' }) }}
  78.                 </h2>
  79.                 <div class="flex flex-col lg:flex-row">
  80.                     {{ pimcore_link('main-link', { class: 'button button__primary' }) }}
  81.                     {{ pimcore_link('secondary-link', {
  82.                         class: 'button button__secondary group',
  83.                         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>'
  84.                     }) }}
  85.                 </div>
  86.             </section>
  87.         {% endif %}
  88.     {% endblock %}
  89. {% endembed %}