templates/areas/projekte-teaser/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <div class="edit-box">
  3.         <h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
  4.         <div class="flex gap-20">
  5.             <div class="content flex column gap-20">
  6.                 <div class="content-box flex gap-20">
  7.                     <div class="item">
  8.                         <p class="edit-p">Anker Text:</p>
  9.                         {{ pimcore_input('anchor',{'placeholder':'Anker Text','width': 300 }) }}
  10.                     </div>
  11.                     <div class="item">
  12.                         <p class="edit-p">Custom Text für Button:</p>
  13.                         {{ pimcore_input('anchor-button',{'placeholder':'Benutzerdefinierter Text für Button','width': 300 }) }}
  14.                     </div>
  15.                 </div>
  16.                 <div class="content-box flex gap-20">
  17.                     <div class="item">
  18.                         <p class="edit-p">Headline:</p>
  19.                         {{ pimcore_input('headline',{'placeholder':'Headline','width': 650 }) }}
  20.                     </div>
  21.                 </div>
  22.                 <div class="content-box flex column gap-20">
  23.                     <div class="item">
  24.                         <p class="edit-p">Übersicht Dokument ablegen:</p>
  25.                         {{ pimcore_relation("ProjectsRelationSite",{
  26.                             "types": ["document"]
  27.                         }) }}
  28.                     </div>
  29.                     <div class="item">
  30.                         <p class="edit-p">Anker auf Projektübersicht Seite:</p>
  31.                         {{ pimcore_input('projectsOverviewDoc') }}
  32.                     </div>
  33.                 </div>
  34.             </div>
  35.             <div class="content flex column gap-20">
  36.                 <div class="content-box">
  37.                     <p class="edit-p">Projekte ablegen:</p>
  38.                     {{ pimcore_relations("ProjektTeaser", {
  39.                         "types": ["object"],
  40.                         "subtypes": {
  41.                             "object": ["object"]
  42.                         },
  43.                         "classes": ["Projekt"]
  44.                     }) }}
  45.                 </div>
  46.                 <div class="content-box">
  47.                     <div class="item">
  48.                         <p class="edit-p">Schattenbild oben ablegen:</p>
  49.                         {{ pimcore_relation("ShadowImage",{
  50.                             "reload": false,
  51.                             "types": ["asset"],
  52.                             "subtypes": {
  53.                                 "asset": ["image"]
  54.                             }
  55.                         }) }}
  56.                     </div>
  57.                     <div class="item">
  58.                         <p class="edit-p">Schattenbild unten ablegen:</p>
  59.                         {{ pimcore_relation("ShadowImage2",{
  60.                             "reload": false,
  61.                             "types": ["asset"],
  62.                             "subtypes": {
  63.                                 "asset": ["image"]
  64.                             }
  65.                         }) }}
  66.                     </div>
  67.                 </div>
  68.             </div>
  69.         </div>
  70.     </div>
  71. {% endif %}
  72. <section class="teaser-swiper news-teaser projekt-teaser" {% if not pimcore_input('anchor').isEmpty() %}id="{{ pimcore_input('anchor').getData() }}"{% endif %}>
  73.     {% if not pimcore_relation("ShadowImage").isEmpty() and not editmode %}
  74.         <div class="shadow-image-con teaser-image-shadow">
  75.             {{ pimcore_relation("ShadowImage").getElement().getThumbnail('ShadowImage').html({
  76.                 imgAttributes: {
  77.                     "class": "shadow-image"
  78.                 }
  79.             }) | raw }}
  80.         </div>
  81.     {% endif %}
  82.     {% if not pimcore_relation("ShadowImage2").isEmpty() and not editmode %}
  83.         <div class="shadow-image-con teaser-image-shadow teaser-image-shadow-2">
  84.             {{ pimcore_relation("ShadowImage2").getElement().getThumbnail('ShadowImage').html({
  85.                 imgAttributes: {
  86.                     "class": "shadow-image"
  87.                 }
  88.             }) | raw }}
  89.         </div>
  90.     {% endif %}
  91.     <div class="container teaser-container">
  92.         {% if editmode %}
  93.             <div style="text-align: center;">
  94.                 <h3>Hier kommen Projekte Teaser im Frontend</h3>
  95.             </div>
  96.         {% else %}
  97.             {% if not pimcore_input('headline').isEmpty() %}
  98.                 <h2>{{ pimcore_input('headline').getData() }}</h2>
  99.             {% else %}
  100.                 <h2>{{ 'Unsere_Projekte' | trans }}</h2>
  101.             {% endif %}
  102.             <div class="news-swiper-container projekt-swiper-container">
  103.                 <div class="swiper newsTeaserSwiper projektTeaserSwiper">
  104.                     <div class="swiper-wrapper">
  105.                         {% if pimcore_relations("ProjektTeaser") | length < 1 %}
  106.                             {% for projekt in projektList %}
  107.                                 {# news detail link #}
  108.                                 {% set detailLink = path('projekt', {
  109.                                     id: projekt.id,
  110.                                     title: toUri(projekt.maintitle),
  111.                                     path: 'projekt'
  112.                                 }) %}
  113.                                 {# news detail link #}
  114.                                 <div class="swiper-slide">
  115.                                     <div class="teaser">
  116.                                         {% if projekt.video %}
  117.                                             {% if projekt.video.type == 'youtube' %}
  118.                                                 <iframe width="100%" height="100%" src="https://www.youtube.com/embed/{{ projekt.video.data }}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  119.                                             {% else %}
  120.                                                 <video controls>
  121.                                                     <source src="{{ projekt.video.data }}" type="video/mp4">
  122.                                                     <source src="{{ projekt.video.data }}" type="video/ogg">
  123.                                                     Your browser does not support the video tag.
  124.                                                 </video>
  125.                                             {% endif %}
  126.                                         {% elseif projekt.image %}
  127.                                             <a href="{{ detailLink }}">
  128.                                                 {{ projekt.image.thumbnail('ProjektTeaser').html | raw }}
  129.                                             </a>
  130.                                         {% endif %}
  131.                                     </div>
  132.                                 </div>
  133.                             {% endfor %}
  134.                         {% else %}
  135.                             {% for projekt in pimcore_relations("ProjektTeaser") %}
  136.                                 {# news detail link #}
  137.                                 {% set detailLink = path('projekt', {
  138.                                     id: projekt.id,
  139.                                     title: toUri(projekt.maintitle),
  140.                                     path: 'projekt'
  141.                                 }) %}
  142.                                 {# news detail link #}
  143.                                 <div class="swiper-slide">
  144.                                     <div class="teaser">
  145.                                         {% if projekt.image %}
  146.                                             <a href="{{ detailLink }}">
  147.                                                 {{ projekt.image.thumbnail('ProjektTeaser').html | raw }}
  148.                                             </a>
  149.                                         {% elseif projekt.video %}
  150.                                             {% if projekt.video.type == 'youtube' %}
  151.                                                 <iframe width="100%" height="100%" src="https://www.youtube.com/embed/{{ projekt.video.data }}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  152.                                             {% else %}
  153.                                                 <video controls>
  154.                                                     <source src="{{ projekt.video.data }}" type="video/mp4">
  155.                                                     <source src="{{ projekt.video.data }}" type="video/ogg">
  156.                                                     Your browser does not support the video tag.
  157.                                                 </video>
  158.                                             {% endif %}
  159.                                         {% endif %}
  160.                                     </div>
  161.                                 </div>
  162.                             {% endfor %}
  163.                         {% endif %}
  164.                     </div>
  165.                     <div class="swipe-controls">
  166.                         <div class="newsTeaserSwiperNext"></div>
  167.                         <div class="newsTeaserSwiperPrev"></div>
  168.                     </div>
  169.                 </div>
  170.             </div>
  171.             {% if not pimcore_relation("ProjectsRelationSite").isEmpty() %}
  172.                 <div class="buttons-row flex">
  173.                     <button class="primary">
  174.                         <a href="{% if not pimcore_relation("ProjectsRelationSite").isEmpty() %}{{ pimcore_relation("ProjectsRelationSite").getElement().getFullPath() }}{% endif %}{% if not pimcore_input('projectsOverviewDoc').isEmpty() %}/#{{ pimcore_input('projectsOverviewDoc').getData() }}{% endif %}" target="_self" title="{{ 'Alle_Projekte' | trans }}">
  175.                             {% if not pimcore_input('anchor-button').isEmpty() %}
  176.                                 {{ pimcore_input('anchor-button').getData() }}
  177.                             {% else %}
  178.                                 {{ 'Alle_Projekte' | trans }}
  179.                             {% endif %}
  180.                             <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  181.                                 <g transform="translate(0 0.354)">
  182.                                     <g transform="translate(0)">
  183.                                         <path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none" stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
  184.                                         <path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)" fill="none" stroke="#b76e2b" stroke-width="1"/>
  185.                                     </g>
  186.                                 </g>
  187.                             </svg>
  188.                         </a>
  189.                     </button>
  190.                 </div>
  191.             {% endif %}
  192.         {% endif %}
  193.     </div>
  194. </section>