templates/areas/news-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>
  12.                 <div class="content-box flex column gap-20">
  13.                     <div class="item">
  14.                         <p class="edit-p">Übersicht Dokument ablegen:</p>
  15.                         {{ pimcore_relation("ProjectsRelationSite",{
  16.                             "types": ["document"]
  17.                         }) }}
  18.                     </div>
  19.                     <div class="item">
  20.                         <p class="edit-p">Anker auf Projektübersicht Seite:</p>
  21.                         {{ pimcore_input('projectsOverviewDoc') }}
  22.                     </div>
  23.                 </div>
  24.             </div>
  25.             <div class="content flex gap-20">
  26.                 <div class="content-box flex gap-20">
  27.                     <div class="item">
  28.                         <p class="edit-p">Headline:</p>
  29.                         {{ pimcore_input('headline',{'placeholder':'Headline','width': 650 }) }}
  30.                     </div>
  31.                 </div>
  32.             </div>
  33.         </div>
  34.     </div>
  35. {% endif %}
  36. <section class="teaser-swiper news-teaser" {% if not pimcore_input('anchor').isEmpty() %}id="{{ pimcore_input('anchor').getData() }}"{% endif %}>
  37.     <div class="container teaser-container">
  38.         {% if not editmode %}
  39.             {% if not pimcore_input('headline').isEmpty() %}
  40.                 <h2>{{ pimcore_input('headline').getData() }}</h2>
  41.             {% else %}
  42.                 <h2>{{ 'News_' | trans }}</h2>
  43.             {% endif %}
  44.         {% endif %}
  45.         {% if editmode %}
  46.             <div style="text-align: center;">
  47.                 <h3>Hier kommen News Teaser im Frontend</h3>
  48.             </div>
  49.         {% else %}
  50.             <div class="news-swiper-container">
  51.                 <div class="swiper newsTeaserSwiper">
  52.                     <div class="swiper-wrapper">
  53.                         {% for news in newsList %}
  54.                             {# news detail link #}
  55.                             {% set detailLink = path('newslist', {
  56.                                 id: news.id,
  57.                                 headline: toUri(news.headline),
  58.                                 path: 'news-url-path'|trans
  59.                             }) %}
  60.                             {# news detail link #}
  61.                             <div class="swiper-slide">
  62.                                 <div class="teaser">
  63.                                     <a href="{{ detailLink }}">{{ news.teaserImage.thumbnail('NewsTeaser').html | raw }}</a>
  64.                                     <div class="content">
  65.                                         <div class="date flex gap-10">
  66.                                             <svg width="13" height="14.333" viewBox="0 0 13 14.333">
  67.                                                 <g id="Icon_feather-calendar" data-name="Icon feather-calendar"
  68.                                                    transform="translate(0.5 0.5)">
  69.                                                     <path id="Pfad_4321" data-name="Pfad 4321"
  70.                                                           d="M5.833,6h9.333A1.33,1.33,0,0,1,16.5,7.328V16.62a1.33,1.33,0,0,1-1.333,1.328H5.833A1.33,1.33,0,0,1,4.5,16.62V7.328A1.33,1.33,0,0,1,5.833,6Z"
  71.                                                           transform="translate(-4.5 -4.615)" fill="none"
  72.                                                           stroke="#6b675d"
  73.                                                           stroke-linecap="round" stroke-linejoin="round"
  74.                                                           stroke-width="1"/>
  75.                                                     <path id="Pfad_4322" data-name="Pfad 4322" d="M24,3V5.771"
  76.                                                           transform="translate(-15.333 -3)" fill="none" stroke="#6b675d"
  77.                                                           stroke-linecap="round" stroke-linejoin="round"
  78.                                                           stroke-width="1"/>
  79.                                                     <path id="Pfad_4323" data-name="Pfad 4323" d="M12,3V5.771"
  80.                                                           transform="translate(-8.667 -3)" fill="none" stroke="#6b675d"
  81.                                                           stroke-linecap="round" stroke-linejoin="round"
  82.                                                           stroke-width="1"/>
  83.                                                     <path id="Pfad_4324" data-name="Pfad 4324" d="M4.5,15h12"
  84.                                                           transform="translate(-4.5 -9.667)" fill="none"
  85.                                                           stroke="#6b675d"
  86.                                                           stroke-linecap="round" stroke-linejoin="round"
  87.                                                           stroke-width="1"/>
  88.                                                 </g>
  89.                                             </svg>
  90.                                             <p>{{ news.date | date('d.m.Y') }}</p>
  91.                                         </div>
  92.                                         <p class="teaser-headline"><a href="{{ detailLink }}">{{ news.headline | u.truncate(50, '...') }}</a></p>
  93.                                         <div class="lead">
  94.                                             <a href="{{ detailLink }}"><p>{{ news.intro | u.truncate(110, '...') }}</p></a>
  95.                                         </div>
  96.                                         <button class="primary accent">
  97.                                             <a href="{{ detailLink }}">{{ 'Mehr'|trans }}
  98.                                                 <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  99.                                                     <g transform="translate(0 0.354)">
  100.                                                         <g transform="translate(0)">
  101.                                                             <path class="line" d="M7.5,18h15"
  102.                                                                   transform="translate(-7.5 -13)" fill="none"
  103.                                                                   stroke="#b76e2b" stroke-linejoin="round"
  104.                                                                   stroke-width="1"/>
  105.                                                             <path class="arrow" d="M18,7.5l5.026,5L18,17.5"
  106.                                                                   transform="translate(-8.027 -7.5)" fill="none"
  107.                                                                   stroke="#b76e2b" stroke-width="1"/>
  108.                                                         </g>
  109.                                                     </g>
  110.                                                 </svg>
  111.                                             </a>
  112.                                         </button>
  113.                                     </div>
  114.                                 </div>
  115.                             </div>
  116.                         {% endfor %}
  117.                     </div>
  118.                     <div class="swipe-controls">
  119.                         <div class="newsTeaserSwiperNext"></div>
  120.                         <div class="newsTeaserSwiperPrev"></div>
  121.                     </div>
  122.                 </div>
  123.             </div>
  124.         {% if not pimcore_relation("ProjectsRelationSite").isEmpty() %}
  125.             <div class="buttons-row flex">
  126.                 <button class="primary">
  127.                     <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_News' | trans }}">{{ 'Alle_News' | trans }}
  128.                         <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  129.                             <g transform="translate(0 0.354)">
  130.                                 <g transform="translate(0)">
  131.                                     <path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none"
  132.                                           stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
  133.                                     <path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)"
  134.                                           fill="none" stroke="#b76e2b" stroke-width="1"/>
  135.                                 </g>
  136.                             </g>
  137.                         </svg>
  138.                     </a>
  139.                 </button>
  140.             </div>
  141.         {% endif %}
  142.         {% endif %}
  143.     </div>
  144. </section>