templates/areas/imageflipbox/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2. <div class="bg-gray-100 p-5">
  3.     {% include 'areaHeadAndFooter.html.twig' with { 'header': 'STWH: Bilder Flipbox' } %}
  4.     {% include 'padding.html.twig' %}
  5.     {% include 'headline-editmode.html.twig' with {'name': 'headline' } %}
  6.     {% for card in pimcore_block('cards').iterator %}
  7.         <div class="flex flex-wrap overflow-hidden xl:-mx-3">
  8.             <div class="w-1/2 my-3 px-3">
  9.                 Bild Vorderseite:
  10.                 {{ pimcore_image('front-image', {'width': '250'}) }}
  11.             </div>
  12.             <div class="w-1/2 my-3 px-3">
  13.                 Text Vorderseite:
  14.                 {{ pimcore_input('title') }}
  15.             </div>
  16.         </div>
  17.         <div class="flex flex-wrap overflow-hidden xl:-mx-3">
  18.             <div class="w-1/2 my-3 px-3">
  19.                 Bild Rückseite:
  20.                 {{ pimcore_image('back-icon', {'width': '250'}) }}
  21.             </div>
  22.             <div class="w-1/2 my-3 px-3">
  23.                 Text Rückseite:
  24.                 {{ pimcore_textarea('back-text') }}
  25.             </div>
  26.         </div>
  27.         <div class="flex flex-wrap overflow-hidden xl:-mx-3">
  28.             <div class="w-1/2 my-3 px-3">
  29.                 Button mit Link:
  30.                 {{ pimcore_link('link') }}
  31.             </div>
  32.             <div class="w-1/2 my-3 px-3">
  33.                 {% include 'color-selector.html.twig' with {'name': 'bg-button-color', 'description': 'Farbe Button' } %}
  34.                 {% include 'color-selector.html.twig' with {'name': 'bg-button-color-hover', 'description': 'Farbe Button Hover' } %}
  35.                 {% include 'color-selector.html.twig' with {'name': 'text-button-color', 'description': 'Textfarbe Button' } %}
  36.                 {% include 'color-selector.html.twig' with {'name': 'text-button-color-hover', 'description': 'Textfarbe Button Hover' } %}
  37.             </div>
  38.         </div>
  39.         <hr>
  40.     {% endfor %}
  41. </div>
  42. {% else %}
  43.     <section class="md:px-6 py-8 overflow-x-hidden" id="{{ pimcore_input('anchor').getData() }}">
  44.         {% if not pimcore_input('headline-headline').isEmpty() %}
  45.             <div class="container flex flex-wrap w-full mx-auto px-4">
  46.                 {% include 'headline.html.twig' with {'name': 'headline', 'input_name': 'headline-headline', 'classes': 'my-4 font-bold text-3xl'} %}
  47.             </div>
  48.         {% endif %}
  49.         <div class="container flex flex-wrap w-full mx-auto px-4">
  50.             {% for cad in pimcore_block('cards').iterator %}
  51.                 <div class="flip-card  flex flex-col items-stretch bg-transparent w-full min-h-flip xl:w-1/3  md:w-1/2 xl:px-12 md:px-6 my-4 relative">
  52.                     <div class="flip-card-inner flex-auto items-stretch flex shadow-xl w-full relative">
  53.                         <div class="flip-card-front bg-white z-10 w-full h-full absolute flex items-center lg:p-6 p-2 justify-center flex-col border-gray-300 border shadow-flip-boxes lazy">
  54.                             <img data-src="{{ pimcore_image('front-image').getThumbnail('icon-flipbox-front') }}"
  55.                                  alt="{{ pimcore_image('front-image').getAlt() }}" class="lazy">
  56.                             <h3 class="font-bold flex items-center break-all text-st-gray flex-wrap my-3 lg:text-3xl text-4xl">
  57.                                 {{ pimcore_input('title').getData() }}
  58.                             </h3>
  59.                         </div>
  60.                         <div class="flip-card-back z-50 justify-between bg-white shadow-flip-boxes w-full flex-auto flex-col flex items-stretch border-gray-300 border px-6 py-8">
  61.                             <div class="flex">
  62.                                 <h3 class="font-bold {% if not pimcore_image('back-icon').isEmpty() %}w-2/3{% else %}w-full{% endif %} flex items-center break-all text-st-gray justify-between my-2 lg:text-3xl text-4xl">
  63.                                     {{ pimcore_input('title').getData() }}
  64.                                 </h3>
  65.                                 {% if not pimcore_image('back-icon').isEmpty() %}
  66.                                 <img class="w-1/3 lazy"
  67.                                      data-src="{{ pimcore_image('back-icon').getThumbnail('image-flipbox-back') }}"
  68.                                      alt="{{ pimcore_image('back-icon').getAlt() }}">
  69.                                 {% endif %}
  70.                             </div>
  71.                             <p class="my-2">
  72.                                 {{ pimcore_textarea('back-text').getData() }}
  73.                             </p>
  74.                             {% if pimcore_link("link") != '' %}
  75.                             <a href="{{ pimcore_link('link').getHref() }}"
  76.                                target="{{ pimcore_link('link').getTarget() }}">
  77.                                 <div class="w-full
  78.                                 flex
  79.                                 justify-center
  80.                                 bg-{{ pimcore_select('bg-button-color').getData() }}
  81.                                 py-2
  82.                                 px-6
  83.                                 text-{{ pimcore_select('text-button-color').getData() }}
  84.                                 hover:bg-{{ pimcore_select('bg-button-color-hover').getData() }}
  85.                                 hover:text-{{ pimcore_select('text-button-color-hover').getData() }}
  86.                                 border
  87.                                 hover:border-{{ pimcore_select('bg-button-color-hover').getData() }}
  88.                                 transition-all
  89.                                 duration-300
  90.                                 ease-in-out text-lg">
  91.                                     {{ pimcore_link('link').getText() }}
  92.                                 </div>
  93.                             </a>
  94.                             {% endif %}
  95.                         </div>
  96.                     </div>
  97.                 </div>
  98.             {% endfor %}
  99.         </div>
  100.     </section>
  101. {% endif %}