src/AppBundle/Resources/views/ObjectViews/news-details.html.twig line 1

Open in your IDE?
  1. {% extends '@FoxHabbitBasis/Layout/layout.html.twig' %}
  2. {% block content %}
  3.     <header
  4.         class="header-home header-box-right bg-white"
  5.     >
  6.         <div class="container-fluid">
  7.             <div class="row">
  8.                 <div class="col-10 col-lg-5 offset-1 py-5 d-flex flex-column flex-nowrap justify-content-center order-1 order-lg-0">
  9.                     <div class="text-uppercase mb-3">
  10.                         {% for category in news.getCategories() %}
  11.                             <span class="mark text-white mr-3">{{ category.getName() }}</span>
  12.                         {% endfor %}
  13.                         <small>
  14.                             {{ news.getDate() | date(pimcore_website_config('newsDateFormat'))}}
  15.                         </small>
  16.                     </div>
  17.                     <h1>
  18.                         {{ news.getHeadline()}}
  19.                     </h1>
  20.                 </div>
  21.                 <aside class="col-10 col-sm-9 col-md-8 col-lg-6 offset-2 offset-sm-3 offset-md-4 offset-lg-0">
  22.                     <div class="parallax-box-wrapper">
  23.                         <div class="parallax-box parallax-box-right">
  24.                             <div class="parallax-box-background oversized-background embed-responsive embed-responsive-1by1 bg-primary text-white"></div>
  25.                             <div class="parallax-box-item">
  26.                                 <figure class="figure w-100">
  27.                                     {% if news.getTeaserImage() %}
  28.                                         {{ news.getTeaserImage().getThumbnail('news-detail-header').getHtml({imgAttributes:{class:'img-fluid'}})|raw }}
  29.                                     {% endif %}
  30.                                 </figure>
  31.                             </div>
  32.                         </div>
  33.                     </div>
  34.                 </aside>
  35.             </div>
  36.         </div>
  37.     </header>
  38.     <div class="container-fluid section-connection">
  39.         <div class="row">
  40.             <div class="offset-9 col-1">
  41.                 <div class="section-connection-right"></div>
  42.             </div>
  43.         </div>
  44.     </div>
  45.     <div class="section pb-0">
  46.     </div>
  47.     {{ pimcore_area('breadcrumb', {type:'basisbundle-breadcrumb'}) }}
  48.     <section class="section">
  49.         <div class="container-fluid">
  50.             <div class="inner-full row">
  51.                 <div class="col-md-10 col-lg-8 offset-md-1">
  52.                     <div class="lead">
  53.                         {{ news.getIntro()|raw }}
  54.                     </div>
  55.                     <div>
  56.                         {{ news.getContent()|raw }}
  57.                     </div>
  58.                 </div>
  59.             </div>
  60.             {% for content in news.getMoreContent() %}
  61.                 {% include '@App/ObjectViews/include/' ~ content.getType() ~ '.html.twig' with { content: content } %}
  62.             {% endfor %}
  63.         </div>
  64.     </section>
  65.     {% set similarNews = app_news_get_siblings( news, 3, app.getUser()) %}
  66.     {% if similarNews %}
  67.         <div class="container-fluid section-connection">
  68.             <div class="row">
  69.                 <div class="offset-1 col-1">
  70.                     <div class="section-connection-left"></div>
  71.                 </div>
  72.             </div>
  73.         </div>
  74.             <section class="section bg-gray1 bg-top-part">
  75.             <div class="container-fluid">
  76.                 <div class="row">
  77.                     <div class="col-md-10 col-lg-8 offset-md-1">
  78.                         <h2>{{ 'news.details.other_news'|trans }}</h2>
  79.                     </div>
  80.                 </div>
  81.                 <div class="row justify-content-center">
  82.                     <div class="col-12 col-md-10">
  83.                         <div class="row row-cols-1 row-cols-sm-2 row-cols-lg-3 news-list">
  84.                             {% for news in similarNews %}
  85.                                 {% include '@App/AreaIncludes/news/teaser.html.twig' with { news: news} %}
  86.                             {% endfor %}
  87.                         </div>
  88.                     </div>
  89.                 </div>
  90.                 {% if document.getProperty('newsDetailsPage') %}
  91.                     <div class="row justify-content-center">
  92.                         <div class="col-12 col-md-10">
  93.                             <div class="linkmodul justify-content-center">
  94.                                 <a class="btn btn-secondary btn-swipe" href="{{ document.getProperty('newsDetailsPage').getFullPath() }}" role="button"><span>{{ 'news.details.show_all'|trans }}</span></a>
  95.                             </div>
  96.                         </div>
  97.                     </div>
  98.                 {% endif %}
  99.             </div>
  100.         </section>
  101.     {% endif %}
  102. {% endblock %}