templates/includes/modals.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <!-- Font Awesome lokalisiert WBR 06.10.2022 -->
  3.     <link rel="stylesheet" href="{{ asset('/static/fonts/fontawesome-pro-6.3.0-web/css/all.min.css') }}"/>
  4.     <link rel="stylesheet" href="{{ asset('/dist/style.css') }}"/>
  5.     <link rel="stylesheet" href="{{ asset('/static/css/editmode.css') }}"/>
  6.     <script type="text/javascript" src="{{ asset('/dist/index.js') }}" defer></script>
  7.     <div class="flex flex-wrap overflow-hidden">
  8.             <div class="p-5 overflow-hidden w-1/2">
  9.                 <p>Modals für den Headerbereich</p>
  10.                 {{ pimcore_relations("headermodals", {
  11.                     "types": ["document"],
  12.                     "subtypes": {
  13.                         "document": ["page","link"]
  14.                     }
  15.                 }) }}
  16.             </div>
  17.         </div>
  18.     </div>
  19. {% else %}
  20.     {% if not pimcore_relations("headermodals").isEmpty() %}
  21.         <div x-data="{}" x-cloak>
  22.         {% for element in pimcore_relations("headermodals") %}
  23.             {% if element.getType() == 'page' and element.getTitle() != "Suche"%}
  24.                 <!-- Modal-Fenster {{ element.getTitle() }} -->
  25.                 <div
  26.                 x-show="$store.mainMenu.showModal==='{{ element.getTitle() }}'"
  27.                 class="fixed z-10 inset-0 overflow-y-auto"
  28.                 aria-labelledby="{{ element.getTitle() }}"
  29.                 role="dialog"
  30.                 aria-modal="true">
  31.                     <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
  32.                         <div @click="$store.mainMenu.showModal = null" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="false"></div>
  33.                         <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
  34.                         <div x-show="$store.mainMenu.showModal==='{{ element.getTitle() }}'"
  35.                             class="absolute w-full flex flex-wrap top-[3.5rem] lg:top-[10rem] overflow-hidden mb-8 sm:align-middle"
  36.                             x-transition:enter="ease-out duration-300"
  37.                             x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
  38.                             x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100"
  39.                             x-transition:leave="ease-in duration-200"
  40.                             x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
  41.                             x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95">
  42.                             <div class="w-full mx-auto bg-white lg:pt-10">
  43.                                 <div class="text-left">
  44.                                     {{ render(element) }}
  45.                                 </div>
  46.                             </div>
  47.                             <div class="w-full mx-auto bg-gray-50 py-3 px-5 sm:flex sm:flex-row-reverse">
  48.                                 {#
  49.                                 Mögliche Werte:
  50.                                 'backColor' ... white, black, red-600, blue-600
  51.                                 'action' ... modal oder ganz weglassen
  52.                                 #}
  53.                                 {% include 'widgets/button.html.twig' with { name: 'schließen', backColor: 'black', action: 'modal' } %}
  54.                             </div>
  55.                         </div>
  56.                     </div>
  57.                 </div>
  58.             {% elseif element.getType() == 'page' and element.getTitle() == "Suche"%}
  59.                 <div
  60.                     x-show="$store.mainMenu.showModal==='{{ element.getTitle() }}'"
  61.                     class="fixed z-10 inset-0 vue-wrapper overflow-y-auto"
  62.                     aria-labelledby="{{ element.getTitle() }}"
  63.                     role="dialog"
  64.                     aria-modal="true">
  65.                     <div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
  66.                         <div @click="$store.mainMenu.showModal = null" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="false"></div>
  67.                         <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
  68.                         <div x-show="$store.mainMenu.showModal==='{{ element.getTitle() }}'"
  69.                              class="absolute w-full flex flex-wrap top-[2.5rem] lg:top-[10rem] overflow-hidden mb-8 sm:align-middle"
  70.                              x-transition:enter="ease-out duration-300"
  71.                              x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
  72.                              x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100"
  73.                              x-transition:leave="ease-in duration-200"
  74.                              x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
  75.                              x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95">
  76.                             <div class="w-full mx-auto vue-wrapper bg-white lg:pt-6">
  77.                                 <search :host="'{{ meilisearch_host }}'" :token="'{{ meilisearch_public_key }}'"></search>
  78.                             </div>
  79.                         </div>
  80.                     </div>
  81.                 </div>
  82. {#                    <div#}
  83. {#                        x-show="$store.mainMenu.showModal==='{{ element.getTitle() }}'"#}
  84. {#                        class="fixed z-10 inset-0 overflow-y-auto "#}
  85. {#                        aria-labelledby="{{ element.getTitle() }}"#}
  86. {#                        role="dialog"#}
  87. {#                        x-transition:enter="ease-out duration-300"#}
  88. {#                        x-transition:enter-start="opacity-0 "#}
  89. {#                        x-transition:enter-end="opacity-100 "#}
  90. {#                        x-transition:leave="ease-in duration-200"#}
  91. {#                        x-transition:leave-start="opacity-100 "#}
  92. {#                        x-transition:leave-end="opacity-0 "#}
  93. {#                        aria-modal="true">#}
  94. {#                        <div  aria-hidden="false"  class="flex relative items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">#}
  95. {#                            <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>#}
  96. {#                            <div#}
  97. {#                                class="absolute h-full w-full z-20 inset-0 bg-gray-500 bg-opacity-75 transition-opacity duration-300" ></div>#}
  98. {#                                <div class="absolute vue-wrapper w-full z-20 inset-0 overflow-y-auto p-4 sm:p-6 md:p-20 " >#}
  99. {#                                        <Search :host="'{{ meilisearch_host }}'" :token="'{{ meilisearch_public_key }}'"></Search>#}
  100. {#                                </div>#}
  101. {#                        </div>#}
  102. {#                    </div>#}
  103.             {% endif %}
  104.         {% endfor %}
  105.         </div>
  106.     {% endif %}
  107. {% endif %}