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

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block metaTitle %}Startseite - {{ parent() }}{% endblock %}
  3. {#
  4. // .............
  5. // Todo: Auf H1 prüfen
  6. // .............
  7. #}
  8. {% block body %}
  9.     {% set terminIDs = [] %}
  10.     {% set desktopHintergrundbild = asset('img/campus/startseite/Header1.png') %}
  11.     {% set mobileHintergrundbild = asset('img/campus/startseite/Header1.png') %}
  12.     {% set buttonfarbe = 'btn-primary' %}
  13.     <style>
  14.         .schriftfarbe {
  15.             color: white;
  16.         }
  17.     </style>
  18.     {% set kundendesign = false %}
  19.     {% if is_granted('ROLE_FIRMA') %}
  20.         {% if app.user.firmenprofil.bildStartseite == 'ja' %}
  21.             {% set kundendesign = true %}
  22.             {% set desktopHintergrundbild = asset('uploads/firmendesign/bilder/' ~ app.user.firmenprofil.bildDesktop.dateiname ) %}
  23.             {% set mobileHintergrundbild = asset('uploads/firmendesign/bilder/' ~ app.user.firmenprofil.bildMobile.dateiname ) %}
  24.             {% set buttonfarbe = 'style="background-color: ' ~ app.user.firmenprofil.buttonfarbe ~ ';"' %}
  25.             <style>
  26.                 .top-header-image-section {
  27.                     background-color: {{ app.user.firmenprofil.primarfarbe }};
  28.                 }
  29.                 .schriftfarbe {
  30.                     color: {{ app.user.firmenprofil.schriftfarbe }};
  31.                 }
  32.                 .andereButtonfarbe {
  33.                     background-color: {{ app.user.firmenprofil.buttonfarbe }};
  34.                 }
  35.             </style>
  36.         {% endif %}
  37.     {% endif %}
  38.     <!-- Hero section-->
  39.     <section class="top-header-image-section">
  40.         <div class="container">
  41.             <div class="header-image d-md-block d-none" style="background-image: url('{{ desktopHintergrundbild }}')">
  42.                 <img src="{{ desktopHintergrundbild }}" class="img-fluid invisible"/>
  43.             </div>
  44.             {% if kundendesign %}
  45.                 <div class="header-image bg-white d-md-none d-block text-center" {#style="background-image: url('{{ mobileHintergrundbild }}')"#}>
  46.                     <img src="{{ mobileHintergrundbild }}" class="img-fluid p-2" style="max-height: 100px"/>
  47.                 </div>
  48.             {% else %}
  49.                 <div class="mt-0">
  50.                     &nbsp;
  51.                 </div>
  52.             {% endif %}
  53.             <div class="info-text mt-lg-5 mt-md-1 mt-4 text-center text-md-start">
  54.                 <h1 class="fw-bolder schriftfarbe ueberschrift-startseite" style="size: 24em">
  55.                     Es steckt so viel<br>mehr in dir!
  56.                 </h1>
  57.                 <div class="fs-sm schriftfarbe ueberschrift2-startseite">Mach dich fit für die Zukunft.<br>Finde dein Weiterbildungsangebot!</div>
  58.                 <div class="mt-lg-5 mt-md-3 mt-sm-3 mt-3">
  59.                     {#
  60.                     <a class="btn btn-primary border-0 andereButtonfarbe p-1 ps-2 pe-2" href="{{ path ('user_konfigurator_auswahl') }}">
  61.                         <div class="d-flex align-items-center fw-bolder"><i class="mdi mdi-compass me-2 fs-4"></i> Stärkenkompass starten</div>
  62.                     </a>
  63. #}
  64.                     <a class="btn btn-primary border-0 andereButtonfarbe p-1 ps-2 pe-2 seminarlink-navigationsleiste" href="#">
  65.                         <div class="d-flex align-items-center fw-bolder"><i class="mdi mdi-card-search-outline me-2 fs-4"></i> Seminare suchen</div>
  66.                     </a>
  67.                 </div>
  68.             </div>
  69.         </div>
  70.     </section>
  71.     <section class="seminar-slider-section container position-relative mt-md-n10">
  72.         <div class="card px-lg-2 border-0 shadow-lg">
  73.             <div class="card-body px-1 pt-4 pb-4">
  74.                 <h3 class="text-center pb-3">Unsere Seminarempfehlungen</h3>
  75.                 {% if schulungen != null %}
  76.                     <div class="row pt-2 mx-n2">
  77.                         {% for schulung in schulungen %}
  78.                             {% set istFavorit = false %}
  79.                             {% for favorit in favoriten %}
  80.                                 {% if schulung.id == favorit.schulung.id %}
  81.                                     {% set istFavorit = true %}
  82.                                 {% endif %}
  83.                             {% endfor %}
  84.                             <!-- Product-->
  85.                             <div class="col-lg-4 col-md-6 px-2 mb-grid-gutter">
  86.                                 <!-- Product-->
  87.                                 <div class="card product-card-alt">
  88.                                     <div class="product-thumb">
  89.                                         <button href="{{ path ('user_produkt_favoriten_speichern',{id:schulung.id}) }}"
  90.                                                 title="Zu Favoriten hinzufügen"
  91.                                                 class="btn-wishlist btn-sm btn-heart-favorite {% if istFavorit %}d-none{% endif %}"
  92.                                                 data-herz-button-art="plus"
  93.                                                 data-schulung-id="{{ schulung.id }}"
  94.                                                 type="button">
  95.                                             <i class="mdi mdi-heart-plus fs-4"></i>
  96.                                         </button>
  97.                                         <button href="{{ path ('user_produkt_favoriten_loeschen',{id:schulung.id}) }}"
  98.                                                 title="aus Favoriten entfernen"
  99.                                                 class="btn-wishlist btn-sm btn-heart-favorite {% if istFavorit == false %}d-none{% endif %}"
  100.                                                 data-herz-button-art="minus"
  101.                                                 data-schulung-id="{{ schulung.id }}"
  102.                                                 type="button">
  103.                                             <i class="mdi mdi-heart-minus fs-4"></i>
  104.                                         </button>
  105.                                         <a class="product-thumb-overlay"
  106.                                            href="{{ path ('produkt_details',{id:schulung.id}) }}{% if schulung.nurCelsisten == 4 %}?guid={{ schulung.importFehler }}{% endif %}"></a>
  107.                                         {% if schulung.importId == 0 %}
  108.                                             <img src="{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild ) }}">
  109.                                         {% else %}
  110.                                             <div class="ratio ratio-16x9">
  111.                                                 <div style="background-image: url('{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild) }}'); width: 100%; background-size: cover; background-repeat: no-repeat;"></div>
  112.                                             </div>
  113.                                         {% endif %}
  114.                                         <i class="mdi mdi-heart fs-1 text-primary heart-favorite {% if istFavorit == false %}d-none{% endif %}"></i>
  115.                                     </div>
  116.                                     <div class="card-body">
  117.                                         <div class="d-flex flex-wrap justify-content-between align-items-start pb-2">
  118.                                             <div class="text-muted fs-xs me-1">
  119.                                                 {% for firmenprofil in firmenprofile %}
  120.                                                     {% if schulung.erstellerFirmenId == firmenprofil.id %}
  121.                                                         von <a class="product-meta fw-medium"
  122.                                                                href="#">{{ firmenprofil.firmenname }}</a>
  123.                                                     {% endif %}
  124.                                                 {% endfor %}
  125.                                             </div>
  126.                                             {% set anzahlSterneVergabe = 0 %}
  127.                                             {% set SterneGesamt = 0 %}
  128.                                             {% set SterneErgebnis = 0 %}
  129.                                             {% for bewertung in schulung.bewertungen %}
  130.                                                 {% set anzahlSterneVergabe = anzahlSterneVergabe + 1 %}
  131.                                                 {% set SterneGesamt = SterneGesamt + bewertung.sterne %}
  132.                                             {% endfor %}
  133.                                             {% if anzahlSterneVergabe != 0 %}
  134.                                                 {% set SterneErgebnis = SterneGesamt / anzahlSterneVergabe %}
  135.                                             {% endif %}
  136.                                             <div class="star-rating">
  137.                                                 <i class="star-rating-icon ci-star{% if SterneErgebnis >= 1 %}-filled active{% endif %}"></i>
  138.                                                 {% for i in 1..4 %}
  139.                                                     {% set stern = '' %}
  140.                                                     {% if SterneErgebnis >= i + 0.5 %}
  141.                                                         {% set stern = '-half active' %}
  142.                                                     {% endif %}
  143.                                                     {% if SterneErgebnis >= i + 1 %}
  144.                                                         {% set stern = '-filled active' %}
  145.                                                     {% endif %}
  146.                                                     <i class="star-rating-icon ci-star{{ stern }}"></i>
  147.                                                 {% endfor %}
  148.                                             </div>
  149.                                         </div>
  150.                                         <h3 class="product-title fs-sm mb-2 fw-bold">
  151.                                             <a href="{{ path ('produkt_details',{id:schulung.id}) }}{% if schulung.nurCelsisten == 4 %}?guid={{ schulung.importFehler }}{% endif %}">{{ schulung.schulungName }}</a>
  152.                                         </h3>
  153.                                         <div class="fs-sm me-2">{{ schulung.kurzbeschreibung|u.truncate(130, '...',false) }}</div>
  154.                                         <div class="d-flex flex-wrap justify-content-between align-items-center mt-3">
  155.                                             <div class="fs-sm me-2 text-muted">{{ schulung.schulungsart.name }}</div>
  156.                                             {% if schulung.schulungsTermine|length > 0 %}
  157.                                                 {% set terminGefunden = 0 %}
  158.                                                 {% for termin in schulung.schulungsTermine|sort((a, b) => a.von <=> b.von) %}
  159.                                                     {% if terminGefunden == 0 %}
  160.                                                         {% set terminAnzeigen = 0 %}
  161.                                                         {% if termin.anmeldeschluss == null %}
  162.                                                             {% if date(termin.von) >= date('+0seconds', 'Europe/Berlin') %}
  163.                                                                 {% set terminAnzeigen = 1 %}
  164.                                                             {% endif %}
  165.                                                         {% else %}
  166.                                                             {% if termin.anmeldeschluss >= date('-1days', 'Europe/Berlin') %}
  167.                                                                 {% set terminAnzeigen = 1 %}
  168.                                                             {% endif %}
  169.                                                         {% endif %}
  170.                                                         {% if terminAnzeigen == 1 %}
  171.                                                             {% set terminIDs = terminIDs|merge([termin.id]) %}
  172.                                                             <div class="text-muted rounded-1 py-1 px-2 small"><i
  173.                                                                         class="mdi mdi-clock-outline me-1"></i>{{ termin.von|date("d.m.Y") }}</div>
  174.                                                             {% set terminGefunden = 1 %}
  175.                                                         {% endif %}
  176.                                                     {% endif %}
  177.                                                 {% endfor %}
  178.                                             {% endif %}
  179.                                         </div>
  180.                                     </div>
  181.                                 </div>
  182.                                 <div class="d-md-none border-top"></div>
  183.                             </div>
  184.                         {% endfor %}
  185.                         <div id="weitere-seminare">
  186.                         </div>
  187.                     </div>
  188.                 {% endif %}
  189.                 <div class="text-center">
  190.                     <a class="btn btn-outline-primary {#weitere-seminare-anzeigen#} seminarlink-navigationsleiste" href="#">
  191.                         weitere Seminare anzeigen
  192.                         <i class="ci-arrow-right fs-ms ms-1"></i>
  193.                     </a>
  194.                 </div>
  195.             </div>
  196.         </div>
  197.     </section>
  198.     {#
  199.     {% include('/user/start/index_evtl.html.twig') %}
  200.     #}
  201.     <section class="bg-size-cover bg-position-center pt-5 pb-4 pb-lg-5 hintergrundfarbe">
  202.         <div class="container pt-lg-3">
  203.             {% if not is_granted('ROLE_MITGLIED') %}
  204.                 <h2 class="h3 mb-3 pb-4 text-light text-center">Warum unseren Campus?</h2>
  205.             {% else %}
  206.                 <h2 class="h3 mb-3 pb-4 text-light text-center">Das wichtigste Projekt bei uns bist du!</h2>
  207.             {% endif %}
  208.             <div class="row pt-lg-2">
  209.                 <div class="col-lg-3 col-md-6 mb-grid-gutter">
  210.                     <div class="d-inline-flex text-start"><i class="h1 mdi mdi-order-alphabetical-ascending text-white"></i>
  211.                         <div class="ps-3">
  212.                             <h6 class="text-light fs-base mb-1">Vielfältiges Angebot:</h6>
  213.                             <p class="text-light fs-ms opacity-70 mb-0">
  214.                                 Wir bündeln alle relevanten Seminare der SHK Branche - vom Online Live-Seminar bis zum mehrtägigen Präsenztraining und Qualifizierungsangebot.
  215.                             </p>
  216.                         </div>
  217.                     </div>
  218.                 </div>
  219.                 <div class="col-lg-3 col-md-6 mb-grid-gutter">
  220.                     <div class="d-inline-flex text-start"><i class="h1 mdi mdi-chart-line text-white"></i>
  221.                         <div class="ps-3">
  222.                             <h6 class="text-light fs-base mb-1">Das richtige Angebot für jedes Ziel:</h6>
  223.                             <p class="text-light fs-ms opacity-70 mb-0">
  224.                                 Finde heraus, welche Qualifizierung geeignet ist.
  225.                                 Klicke auf den Stärkenkompass und finde so das richtige Angebot um deine Pontenziale zu entwickeln.
  226.                             </p>
  227.                         </div>
  228.                     </div>
  229.                 </div>
  230.                 <div class="col-lg-3 col-md-6 mb-grid-gutter">
  231.                     <div class="d-inline-flex text-start"><i class="h1 mdi mdi-account-check text-white"></i>
  232.                         <div class="ps-3">
  233.                             <h6 class="text-light fs-base mb-1">Erfahrene Dozenten:</h6>
  234.                             <p class="text-light fs-ms opacity-70 mb-0">
  235.                                 Unsere Dozenten verbinden Fachwissen mit Praxiserfahrung und vermitteln ihr Wissen daher besonders verständlich.
  236.                             </p>
  237.                         </div>
  238.                     </div>
  239.                 </div>
  240.                 <div class="col-lg-3 col-md-6 mb-grid-gutter">
  241.                     <div class="d-inline-flex text-start"><i class="h1 mdi mdi-card-account-details text-white"></i>
  242.                         <div class="ps-3">
  243.                             <h6 class="text-light fs-base mb-1">Bewertungen und Teilnehmer:</h6>
  244.                             <p class="text-light fs-ms opacity-70 mb-0">Unabhängige Bewertungen helfen dir, den besten und individuell passenden Trainer und Anbieter zu finden.</p>
  245.                         </div>
  246.                     </div>
  247.                 </div>
  248.             </div>
  249.         </div>
  250.     </section>
  251.     <!-- Blog posts carousel-->
  252.     <section class="py-5">
  253.         <div class="container py-lg-3">
  254.             <h2 class="h1 text-center">Blogs</h2>
  255.             <p class="text-muted text-center mb-3 pb-4">Hier erfährst du was die Branche bewegt.</p>
  256.             <div class="tns-carousel">
  257.                 <div class="tns-carousel-inner"
  258.                      data-carousel-options="{&quot;items&quot;: 2, &quot;gutter&quot;: 15, &quot;controls&quot;: false, &quot;nav&quot;: true, &quot;responsive&quot;: {&quot;0&quot;:{&quot;items&quot;:1},&quot;500&quot;:{&quot;items&quot;:2},&quot;768&quot;:{&quot;items&quot;:3}, &quot;992&quot;:{&quot;items&quot;:3, &quot;gutter&quot;: 30}}}">
  259.                     {% for blog in blogs %}
  260.                         <div>
  261.                             <div class="card">
  262.                                 <a class="blog-entry-thumb" href="{{ path ('user_blog',{id:blog.id}) }}">
  263.                                     <img class="card-img-top"
  264.                                          src="{{ asset('/uploads/blogs/' ~ blog.firma.id ~ '/titelbild/' ~ blog.id ~ '/' ~ blog.titelbild) }}">
  265.                                 </a>
  266.                                 <div class="card-body">
  267.                                     <h2 class="h6 blog-entry-title">
  268.                                         <a href="{{ path ('user_blog',{id:blog.id}) }}">{{ blog.titel }}</a>
  269.                                     </h2>
  270.                                     <p class="fs-sm">{{ blog.kurzbeschreibung }}</p>
  271.                                     <div class="fs-xs text-nowrap">
  272.                                         <span class="text-nowrap text-muted">{{ blog.datum|date("d.m.Y") }}</span>
  273.                                         <span class="blog-entry-meta-divider mx-2"></span>
  274.                                         <span class="text-nowrap text-muted">{{ blog.firma.firmenname }}</span>
  275.                                     </div>
  276.                                 </div>
  277.                             </div>
  278.                         </div>
  279.                     {% endfor %}
  280.                 </div>
  281.             </div>
  282.             <!-- More button-->
  283.             <div class="text-center pt-5 mt-md-2 d-none"><a class="btn btn-outline-primary" href="#">weitere NEWS anzeigen<i class="ci-arrow-right fs-ms ms-1"></i></a></div>
  284.         </div>
  285.     </section>
  286.     <script>
  287.         jQuery(function ($) {
  288.             $('#staerkenkompass-mobil-ansicht').removeClass('d-none')
  289.             $('#home-mobil-ansicht').addClass('d-none')
  290.             {% if app.user != null and app.user.firmenProfil != null %}
  291.             $('#dashboard-mobil-ansicht').removeClass('d-none')
  292.             {% endif %}
  293.             let neueSeminareCounter = 0
  294.             let array_termine_vorhanden = [];
  295.             {% for terminID in terminIDs %}
  296.             array_termine_vorhanden.push({{ terminID }});
  297.             {% endfor %}
  298.             $(document).on('click', '.weitere-seminare-anzeigen', function (event) {
  299.                 event.preventDefault();
  300.                 neueSeminareCounter ++;
  301.                 $('<div id="weitere-seminare-' + neueSeminareCounter + '"></div>').appendTo('#weitere-seminare');
  302.                 $.ajax({
  303.                     'url': '{{ path('user_start_weitere') }}',
  304.                     'method': 'post',
  305.                     'data': {
  306.                         'array_termine_vorhanden': array_termine_vorhanden,
  307.                         'neueSeminareCounter': neueSeminareCounter,
  308.                     },
  309.                     'success': function (response) {
  310.                         document.getElementById("weitere-seminare-" + neueSeminareCounter).innerHTML = response['weitere_seminare_gefunden'];
  311.                         array_termine_vorhanden = $.merge(array_termine_vorhanden, response['weitere_termine_ids']);
  312.                         if (response['anzahl_termine'] < 3) {
  313.                             $('.weitere-seminare-anzeigen').addClass('d-none');
  314.                         }
  315.                     },
  316.                     'error': function (response) {
  317.                         console.log('Konnte nicht gespeichert werden.' + response)
  318.                     }
  319.                 });
  320.             });
  321.             $(document).on('click', '.btn-heart-favorite', function (event) {
  322.                 event.preventDefault();
  323.                 let $button = $(this);
  324.                 let $container = $button.closest('.product-thumb');
  325.                 let href = $(this).attr('href');
  326.                 let buttonArt = $(this).attr('data-herz-button-art');
  327.                 $.ajax({
  328.                     'url': href,
  329.                     'method': 'get',
  330.                     'success': function (response) {
  331.                         {% if is_granted('ROLE_MITGLIED') %}
  332.                         if (response['anzahlFavoriten'] > 0) {
  333.                             $('.favoriten-handy-navigation-link').removeClass('d-none');
  334.                         } else {
  335.                             $('.favoriten-handy-navigation-link').addClass('d-none');
  336.                         }
  337.                         {% endif %}
  338.                         $button.addClass('d-none');
  339.                         if (buttonArt === 'plus') {
  340.                             $('button[data-herz-button-art="minus"]', $container).removeClass('d-none');
  341.                             $('.heart-favorite', $container).removeClass('d-none');
  342.                         }
  343.                         if (buttonArt === 'minus') {
  344.                             $('button[data-herz-button-art="plus"]', $container).removeClass('d-none');
  345.                             $('.heart-favorite', $container).addClass('d-none');
  346.                         }
  347.                     },
  348.                     'error': function (response) {
  349.                         console.log('Fehler bei Ajax-Link' + response)
  350.                     }
  351.                 });
  352.             });
  353.         });
  354.     </script>
  355. {% endblock %}