templates/news/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/layout.html.twig' %}
  2. {% block content %}
  3.     <section class="content-header projects-header news-detail beige">
  4.         <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  5.         <script type="text/javascript">
  6.             window.shareHeadline = '{{ newsDetail.headline }}';
  7.         </script>
  8.         {% if newsDetail.getShadowImage() %}
  9.             <div class="shadow-image-container project-detail" id="shadow-image-container">
  10.                 {{ newsDetail.shadowImage.thumbnail('ProjectDetailShadow').html({
  11.                     'imgAttributes': {
  12.                         'class':'detail-shadow'
  13.                     }
  14.                 }) | raw }}
  15.             </div>
  16.         {% endif %}
  17.         <div class="container">
  18.             <div class="content-container">
  19.                 <div class="date flex gap-10">
  20.                     <svg width="13" height="14.333" viewBox="0 0 13 14.333">
  21.                         <g id="Icon_feather-calendar" data-name="Icon feather-calendar"
  22.                            transform="translate(0.5 0.5)">
  23.                             <path id="Pfad_4321" data-name="Pfad 4321"
  24.                                   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"
  25.                                   transform="translate(-4.5 -4.615)" fill="none"
  26.                                   stroke="#6b675d"
  27.                                   stroke-linecap="round" stroke-linejoin="round"
  28.                                   stroke-width="1"/>
  29.                             <path id="Pfad_4322" data-name="Pfad 4322" d="M24,3V5.771"
  30.                                   transform="translate(-15.333 -3)" fill="none" stroke="#6b675d"
  31.                                   stroke-linecap="round" stroke-linejoin="round"
  32.                                   stroke-width="1"/>
  33.                             <path id="Pfad_4323" data-name="Pfad 4323" d="M12,3V5.771"
  34.                                   transform="translate(-8.667 -3)" fill="none" stroke="#6b675d"
  35.                                   stroke-linecap="round" stroke-linejoin="round"
  36.                                   stroke-width="1"/>
  37.                             <path id="Pfad_4324" data-name="Pfad 4324" d="M4.5,15h12"
  38.                                   transform="translate(-4.5 -9.667)" fill="none"
  39.                                   stroke="#6b675d"
  40.                                   stroke-linecap="round" stroke-linejoin="round"
  41.                                   stroke-width="1"/>
  42.                         </g>
  43.                     </svg>
  44.                     <p>{{ newsDetail.date | date('d.m.Y') }}</p>
  45.                 </div>
  46.                 {% if newsDetail.headline %}
  47.                     <h1 class="light dark">{{ newsDetail.headline | nl2br }}</h1>
  48.                 {% endif %}
  49.                 {% if newsDetail.intro %}
  50.                     <div class="colored lead">
  51.                         <p>{{ newsDetail.intro | nl2br }}</p>
  52.                     </div>
  53.                 {% endif %}
  54.             </div>
  55.         </div>
  56.     </section>
  57.     {% for contentItem in newsDetail.content.items %}
  58.         {% if contentItem.type == "Text" %}
  59.             <section class="content-type-text beige news-detail">
  60.                 <div class="container">
  61.                     <div class="content-container">
  62.                         <div class="item-lead {{ contentItem.TextType | lower }} {{ contentItem.TextWidth }} {{ contentItem.marginTop }}">
  63.                             {{ contentItem.Text | raw }}
  64.                         </div>
  65.                     </div>
  66.                 </div>
  67.             </section>
  68.         {% endif %}
  69.         {% if contentItem.type == "Gallery" %}
  70.             {% if contentItem.GalleryImg | length > 1 %}
  71.             <section class="teaser-swiper news-teaser projekt-teaser detail-page beige news-detail-gallery">
  72.                 <div class="container teaser-container">
  73.                     <div class="news-swiper-container projekt-swiper-container detail-page">
  74.                             <div class="swiper newsTeaserSwiper projektTeaserSwiper">
  75.                                 <div class="swiper-wrapper">
  76.                                     {% for image in contentItem.GalleryImg %}
  77.                                         <div class="swiper-slide">
  78.                                             <div class="teaser">
  79.                                                 {{ image.thumbnail('ProjektTeaser').html | raw }}
  80.                                             </div>
  81.                                         </div>
  82.                                     {% endfor %}
  83.                                 </div>
  84.                                 <div class="swipe-controls">
  85.                                     <div class="newsTeaserSwiperNext"></div>
  86.                                     <div class="newsTeaserSwiperPrev"></div>
  87.                                 </div>
  88.                             </div>
  89.                     </div>
  90.                 </div>
  91.             </section>
  92.             {% else %}
  93.                 <section class="content-type-text beige news-detail-single-image">
  94.                     <div class="container">
  95.                         <div class="content-container">
  96.                             {{ newsDetail.teaserImage.thumbnail('FullHD').html | raw }}
  97.                         </div>
  98.                     </div>
  99.                 </section>
  100.             {% endif %}
  101.         {% endif %}
  102.     {% endfor %}
  103.     <section class="content-type-text beige buttons-section news-detail-page">
  104.         <div class="container">
  105.             <div class="buttons-row flex project-detail-site">
  106.                 <div class="buttons-back flex">
  107.                     <button class="primary">
  108.                         <a href="/service/kontakt" target="_self" title="{{ 'Kontakt' | trans }}">
  109.                             {{ 'Kontakt' | trans }}
  110.                             <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  111.                                 <g transform="translate(0 0.354)">
  112.                                     <g transform="translate(0)">
  113.                                         <path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none" stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
  114.                                         <path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)" fill="none" stroke="#b76e2b" stroke-width="1"/>
  115.                                     </g>
  116.                                 </g>
  117.                             </svg>
  118.                         </a>
  119.                     </button>
  120.                     <button class="primary">
  121.                         <a onclick="window.history.back()" target="_self" title="{{ 'Zurück' | trans }}">
  122.                             {{ 'Zurück' | trans }}
  123.                             <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  124.                                 <g transform="translate(0 0.354)">
  125.                                     <g transform="translate(0)">
  126.                                         <path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none" stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
  127.                                         <path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)" fill="none" stroke="#b76e2b" stroke-width="1"/>
  128.                                     </g>
  129.                                 </g>
  130.                             </svg>
  131.                         </a>
  132.                     </button>
  133.                 </div>
  134.                 <div class="flex gap-20">
  135.                 <p class="share-label flex align-center">SHARE</p>
  136.                 <div class="share-buttons">
  137.                     <a class="resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u={{ app.request.uri }}" target="_blank" rel="noopener" aria-label="">
  138.                         <div class="resp-sharing-button resp-sharing-button--facebook resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  139.                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.77 7.46H14.5v-1.9c0-.9.6-1.1 1-1.1h3V.5h-4.33C10.24.5 9.5 3.44 9.5 5.32v2.15h-3v4h3v12h5v-12h3.85l.42-4z"/></svg>
  140.                             </div>
  141.                         </div>
  142.                     </a>
  143.                     <a class="resp-sharing-button__link" href="mailto:?subject={{ newsDetail.headline | nl2br }}&amp;body={{ app.request.uri }}" target="_self" rel="noopener" aria-label="">
  144.                         <div class="resp-sharing-button resp-sharing-button--email resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  145.                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22 4H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.25 14.43l-3.5 2c-.08.05-.17.07-.25.07-.17 0-.34-.1-.43-.25-.14-.24-.06-.55.18-.68l3.5-2c.24-.14.55-.06.68.18.14.24.06.55-.18.68zm4.75.07c-.1 0-.2-.03-.27-.08l-8.5-5.5c-.23-.15-.3-.46-.15-.7.15-.22.46-.3.7-.14L12 13.4l8.23-5.32c.23-.15.54-.08.7.15.14.23.07.54-.16.7l-8.5 5.5c-.08.04-.17.07-.27.07zm8.93 1.75c-.1.16-.26.25-.43.25-.08 0-.17-.02-.25-.07l-3.5-2c-.24-.13-.32-.44-.18-.68s.44-.32.68-.18l3.5 2c.24.13.32.44.18.68z"/></svg>
  146.                             </div>
  147.                         </div>
  148.                     </a>
  149.                     <a class="resp-sharing-button__link" href="https://www.linkedin.com/shareArticle?mini=true&amp;url={{ app.request.uri }}&amp;title={{ newsDetail.headline | nl2br }}&amp;summary={{ newsDetail.headline | nl2br }}&amp;source={{ app.request.uri }}" target="_blank" rel="noopener" aria-label="">
  150.                         <div class="resp-sharing-button resp-sharing-button--linkedin resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  151.                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 21.5h-5v-13h5v13zM4 6.5C2.5 6.5 1.5 5.3 1.5 4s1-2.4 2.5-2.4c1.6 0 2.5 1 2.6 2.5 0 1.4-1 2.5-2.6 2.5zm11.5 6c-1 0-2 1-2 2v7h-5v-13h5V10s1.6-1.5 4-1.5c3 0 5 2.2 5 6.3v6.7h-5v-7c0-1-1-2-2-2z"/></svg>
  152.                             </div>
  153.                         </div>
  154.                     </a>
  155.                     {#<a class="resp-sharing-button__link" href="https://www.xing.com/app/user?op=share;url={{ app.request.uri }};title={{ newsDetail.headline | nl2br }}" target="_blank" rel="noopener" aria-label="">
  156.                         <div class="resp-sharing-button resp-sharing-button--xing resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">
  157.                                 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.2 9.7l-3-5.4C7.2 4 7 4 6.8 4h-5c-.3 0-.4 0-.5.2v.5L4 10 .4 16v.5c0 .2.2.3.4.3h5c.3 0 .4 0 .5-.2l4-6.6v-.5zM24 .2l-.5-.2H18s-.2 0-.3.3l-8 14v.4l5.2 9c0 .2 0 .3.3.3h5.4s.3 0 .4-.2c.2-.2.2-.4 0-.5l-5-8.8L24 .7V.2z"/></svg>
  158.                             </div>
  159.                         </div>
  160.                     </a>#}
  161.                 </div>
  162.                 </div>
  163.             </div>
  164.         </div>
  165.     </section>
  166. {% endblock %}