templates/user/start/blog_ansehen.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block metaTitle %}{{ blog.titel }} - {{ parent() }}{% endblock %}
  3. {% block body %}
  4.     {% include('/user/firma/_firmenfarben.html.twig') %}
  5.     <script src="{{ asset('/vendor/slick/slick.min.js') }}"></script>
  6.     <link rel="stylesheet" href="{{ asset('/vendor/slick/slick.css') }}"/>
  7.     <link rel="stylesheet" href="{{ asset('/vendor/slick/slick-theme.css') }}"/>
  8.     <div class="page-title-overlap pt-4 hintergrundfarbe schriftfarbe">
  9.         <div class="container d-lg-flex justify-content-between py-2 py-lg-3">
  10.             <div class="order-lg-2 mb-3 mb-lg-0 pt-lg-2">
  11.                 <div class="small d-flex text-center text-lg-end flex-lg-nowrap justify-content-center justify-content-lg-start schriftfarbe">
  12.                     <a class="me-2" href="{{ path('user_start') }}"><span class="schriftfarbe">Home</span></a> >
  13.                     <span class="mx-2">Blog</span>
  14.                 </div>
  15.             </div>
  16.             <div class="order-lg-1 pe-lg-4 text-center text-lg-start">
  17.                 <h3 class="schriftfarbe mb-0">{{ blog.titel }}</h3>
  18.                 <a href="javascript:history.back()"><h5 class="schriftfarbe mb-0 mt-3"><i class="mdi mdi-arrow-left-bold me-2">Zurück</i></h5></a>
  19.             </div>
  20.         </div>
  21.     </div>
  22.     <!-- Page Title-->
  23.     <section class="container mb-3 pb-3">
  24.         <div class="bg-light shadow-lg rounded-3 overflow-hidden">
  25.             {% if blog.aktiv == 0 %}
  26.                 <div class="d-flex flex-wrap align-items-center bg-danger justify-content-center pt-3">
  27.                     <h3 class="text-white">Blog noch nicht aktiviert</h3>
  28.                 </div>
  29.             {% endif %}
  30.             <div class="col-12" id="user-dateien-geöffnet">
  31.                 <div class="card border-0">
  32.                     <div class="card-body">
  33.                         <div class="row justify-content-center mt-md-2 mx-lg-3">
  34.                             <div class="col-lg-12 mt-0">
  35.                                 <div class="text-center mb-1">
  36.                                     <h1>{{ blog.titel }}</h1>
  37.                                 </div>
  38.                                 {% if blog.anhang is defined and blog.anhang|length != 1 %}
  39.                                     <div class="text-center d-none d-sm-block">
  40.                                         <img class="rounded" id="bild-gross" src="{{ asset('/uploads/blogs/' ~ blog.firma.id ~ '/titelbild/' ~ blog.id ~ '/' ~ blog.titelbild) }}"
  41.                                              style="max-height: 500px">
  42.                                     </div>
  43.                                 {% else %}
  44.                                     {% for anhang in blog.anhang %}
  45.                                         <div class="text-center d-none d-sm-block">
  46.                                             <img class="rounded" id="bild-gross"
  47.                                                  src="{{ path ('oeffentliche_dateien_anzeigen',{firmaId:blog.firma.id, dateiname:anhang.datei.speichername}) }}"
  48.                                                  style="max-height: 500px">
  49.                                         </div>
  50.                                     {% endfor %}
  51.                                 {% endif %}
  52.                                 {% if blog.anhang is defined and blog.anhang|length > 1 %}
  53.                                     <div class="slick-slider mt-3 ms-sm-3 me-sm-3">
  54.                                         {% for anhang in blog.anhang %}
  55.                                             <div class="mx-2">
  56.                                                 <img class="kleines-bild" style="cursor: pointer;"
  57.                                                      src="{{ path ('oeffentliche_dateien_anzeigen',{firmaId:blog.firma.id, dateiname:anhang.datei.speichername}) }}">
  58.                                             </div>
  59.                                         {% endfor %}
  60.                                     </div>
  61.                                 {% endif %}
  62.                                 <div class="js-editor mx-n2 mt-5">
  63.                                     {{ blog.text|replace({"<a href": "<a target=_blank href"})|raw }}
  64.                                 </div>
  65.                                 {% if blog.quote|length > 0 %}
  66.                                     <blockquote class="testimonial pt-4 pb-4">
  67.                                         <div class="card border-0 shadow-sm">
  68.                                             <span class="testimonial-mark"></span>
  69.                                             <div class="card-body fs-md">
  70.                                                 <i>
  71.                                                     {{ blog.quote| nl2br }}
  72.                                                 </i>
  73.                                             </div>
  74.                                         </div>
  75.                                     </blockquote>
  76.                                 {% endif %}
  77.                                 <div class="js-editor mx-n2">
  78.                                     {{ blog.text2|replace({"<a href": "<a target=_blank href"})|raw }}
  79.                                 </div>
  80.                                 <footer class="d-flex align-items-center text-left pt-4">
  81.                                     {% if blog.firma.logo|length > 0 %}
  82.                                         <img class="rounded" src="{{ asset('uploads/firmen/logo/' ~ blog.firma.id ~ '/'~ blog.firma.logo ) }}" width="70">
  83.                                     {% endif %}
  84.                                     <div class="ps-3">
  85.                                         <p class="fs-lg mb-n1">{{ blog.firma.firmenname }}</p>
  86.                                     </div>
  87.                                 </footer>
  88.                                 <!-- Post tags + sharing-->
  89.                                 <div class="d-flex flex-wrap justify-content-between pt-4">
  90.                                     <div class="mt-3">
  91.                                         {% if blog.firma.webseite is not null %}
  92.                                             <a class="btn-social bs-facebook me-2 mb-2" href="{{ blog.firma.webseite }}" target="_blank">
  93.                                                 <i class="ci-globe"></i>
  94.                                             </a>
  95.                                         {% endif %}
  96.                                         {% if blog.firma.facebook is not null %}
  97.                                             <a class="btn-social bs-facebook me-2 mb-2" href="{{ blog.firma.facebook }}" target="_blank">
  98.                                                 <i class="ci-facebook"></i>
  99.                                             </a>
  100.                                         {% endif %}
  101.                                         {% if blog.firma.instagram is not null %}
  102.                                         <a class="btn-social bs-instagram me-2 mb-2" href="{{ blog.firma.instagram }}" target="_blank">
  103.                                             <i class="ci-instagram"></i>
  104.                                         </a>
  105.                                         {% endif %}
  106.                                         {% if blog.firma.youtube is not null %}
  107.                                         <a class="btn-social bs-youtube me-2 mb-2" href="{{ blog.firma.youtube }}" target="_blank">
  108.                                             <i class="ci-youtube"></i>
  109.                                         </a>
  110.                                         {% endif %}
  111.                                     </div>
  112.                                 </div>
  113.                             </div>
  114.                         </div>
  115.                     </div>
  116.                 </div>
  117.             </div>
  118.         </div>
  119.     </section>
  120.     <script>
  121.         jQuery(function ($) {
  122.             $('.slick-slider').slick({
  123.                 infinite: false,
  124.                 dots: false,
  125.                 draggable: false,
  126.                 arrows: true,
  127.                 slidesToShow: 8,
  128.                 slidesToScroll: 6,
  129.                 responsive: [
  130.                     {
  131.                         breakpoint: 1024,
  132.                         settings: {
  133.                             slidesToShow: 8,
  134.                             slidesToScroll: 6
  135.                         }
  136.                     },
  137.                     {
  138.                         breakpoint: 900,
  139.                         settings: {
  140.                             slidesToShow: 6,
  141.                             slidesToScroll: 4
  142.                         }
  143.                     },
  144.                     {
  145.                         breakpoint: 780,
  146.                         settings: {
  147.                             slidesToShow: 4,
  148.                             slidesToScroll: 2
  149.                         }
  150.                     },
  151.                     {
  152.                         breakpoint: 600,
  153.                         settings: {
  154.                             slidesToShow: 2,
  155.                             slidesToScroll: 1
  156.                         }
  157.                     },
  158.                     {
  159.                         breakpoint: 480,
  160.                         settings: {
  161.                             slidesToShow: 1,
  162.                             slidesToScroll: 1
  163.                         }
  164.                     }
  165.                 ]
  166.             });
  167.             $('.kleines-bild').on('click', function (event) {
  168.                 $('#bild-gross').attr('src', $(this).attr('src'));
  169.             });
  170.         });
  171.     </script>
  172. {% endblock %}