templates/themes/theme/news/embedNewsArticle.html.twig line 1

Open in your IDE?
  1. <script type="application/ld+json">
  2.     {
  3.         "@context": "https://schema.org",
  4.         "@type": "BlogPosting",
  5.         "headline": "{{ news.title }}",
  6.         "alternativeHeadline": "{{ news.subtitle|striptags }}",
  7.         "datePublished": "{{ news.publishDate|date('c') }}",
  8.         "dateModified": "{{ news.updatedAt|date('c') }}",
  9.         "author": {
  10.             "@type": "Organization",
  11.             "name": "{{ sitename }}"
  12.         },
  13.         "publisher": {
  14.             "@type": "Organization",
  15.             "name": "{{ sitename }}",
  16.             "logo": {
  17.                 "@type": "ImageObject",
  18.                 "url": "{{ siteurl }}{{ imageCache(asset('build/images/kas-scaffolding-logo.png'), 'cropResize', 600, 232) }}",
  19.                 "width": 600,
  20.                 "height": 232
  21.             }
  22.         },
  23.         "image": {
  24.             "@type": "ImageObject",
  25.             "url": "{{ siteurl }}{{ imageCache('/userfiles/images/news/' ~ news.image, 'zoomCrop', 800, 600) }}",
  26.             "width": 800,
  27.             "height": 600
  28.         },
  29.         "description": "{{ news.kicker|raw|striptags }}",
  30.         "articleBody": "{{ news.content|html_entity_decode|replace({'\n': ' ', '\r': ' '})|striptags }}"
  31.     }
  32. </script>
  33. {% if news.image %}
  34.     <div class="banner-image banner-image--gradient lazyBackgroundImage" data-mobile="{{ imageCache('/'~ news.getFullImagePath, 'zoomCrop', 1566, 822) }}" data-desktop="{{ imageCache('/'~ news.getFullImagePath, 'zoomCrop', 3200, 1680) }}"></div>
  35. {% endif %}
  36. <section class="page-content {% if news.image == null %} pt-[148px] md:pt-[163px]{% endif %}">
  37.     <div class="container">
  38.         <div class="bg-primary text-center text-white px-10 py-12 relative z-20 mb-12 {% if news.image != null %} -mt-12 sm:-mt-24 md:-mt-52{% else %}mt-12{% endif %}">
  39.             <h1 class="text-white">{{ allowInlineEditor(news, 'title')|raw }}</h1>
  40.             {% if news.subtitle %}
  41.                 <h3 class="text-white">{{ allowInlineEditor(news, 'subtitle')|striptags }}</h3>
  42.             {% endif %}
  43.             {% if news.kicker %}
  44.                 {{ allowInlineEditor(news, 'kicker')|raw }}
  45.             {% endif %}
  46.              {% if news.publishDate %}
  47.                 <p class="text-sm text-white mb-0">{{ news.publishDate|date('d F Y') }}</p>
  48.             {% endif %}
  49.         </div>
  50.         {% if news.content %}
  51.             <div class="row cms-area mb-12 blog-article">
  52.                 <div class="md:col-10 md:offset-1">
  53.                     {{ allowInlineEditor(news, 'content')|raw }}
  54.                 </div>
  55.             </div>
  56.         {% endif %}
  57.         {% if news.image2 or news.image3 %}
  58.             <div class="row mb-12">
  59.                 {% if news.image2 %}
  60.                     <div class="sm:col-6 mb-8 sm:mb-0">
  61.                         <img src="{{ imageCache('/'~ news.getFullImage2Path, 'zoomCrop', 1140, 1040) }}" width="670" height="612" alt="{{ news.title }}" loading="lazy" />
  62.                     </div>
  63.                 {% endif %}
  64.                 {% if news.image3 %}
  65.                     <div class="sm:col-6">
  66.                         <img src="{{ imageCache('/'~ news.getFullImage3Path, 'zoomCrop', 1140, 1040) }}" width="670" height="612" alt="{{ news.title }}" loading="lazy" />
  67.                     </div>
  68.                 {% endif %}
  69.             </div>
  70.         {% endif %}
  71.         {% if news.content2 %}
  72.             <div class="row cms-area mb-12 blog-article">
  73.                 <div class="md:col-10 md:offset-1">
  74.                     {{ allowInlineEditor(news, 'content2')|raw }}
  75.                 </div>
  76.             </div>
  77.         {% endif %}
  78.     </div>
  79. </section>
  80. {# {% if prev or next %}
  81.     <div class="row mt-10">
  82.         <div class="col-12 flex">
  83.             {% if prev %}
  84.                 <a class="btn btn-primary mr-auto" href="{{ generatePath( app.request, prev.linkedPageId, {'news_slug' : prev.slug } ) }}"><i class="fa-regular fa-arrow-left"></i> Previous</a>
  85.             {% endif %}
  86.             {% if next %}
  87.                 <a class="btn btn-primary ml-auto" href="{{ generatePath( app.request, next.linkedPageId, {'news_slug' : next.slug } ) }}">Next <i class="fa-regular fa-arrow-right"></i></a>
  88.             {% endif %}
  89.         </div>
  90.     </div>
  91. {% endif %} #}