{% extends 'base.html.twig' %}
{% block metaTitle %}Startseite - {{ parent() }}{% endblock %}
{#
// .............
// Todo: Auf H1 prüfen
// .............
#}
{% block body %}
{% set terminIDs = [] %}
{% set desktopHintergrundbild = asset('img/campus/startseite/Header1.png') %}
{% set mobileHintergrundbild = asset('img/campus/startseite/Header1.png') %}
{% set buttonfarbe = 'btn-primary' %}
<style>
.schriftfarbe {
color: white;
}
</style>
{% set kundendesign = false %}
{% if is_granted('ROLE_FIRMA') %}
{% if app.user.firmenprofil.bildStartseite == 'ja' %}
{% set kundendesign = true %}
{% set desktopHintergrundbild = asset('uploads/firmendesign/bilder/' ~ app.user.firmenprofil.bildDesktop.dateiname ) %}
{% set mobileHintergrundbild = asset('uploads/firmendesign/bilder/' ~ app.user.firmenprofil.bildMobile.dateiname ) %}
{% set buttonfarbe = 'style="background-color: ' ~ app.user.firmenprofil.buttonfarbe ~ ';"' %}
<style>
.top-header-image-section {
background-color: {{ app.user.firmenprofil.primarfarbe }};
}
.schriftfarbe {
color: {{ app.user.firmenprofil.schriftfarbe }};
}
.andereButtonfarbe {
background-color: {{ app.user.firmenprofil.buttonfarbe }};
}
</style>
{% endif %}
{% endif %}
<!-- Hero section-->
<section class="top-header-image-section">
<div class="container">
<div class="header-image d-md-block d-none" style="background-image: url('{{ desktopHintergrundbild }}')">
<img src="{{ desktopHintergrundbild }}" class="img-fluid invisible"/>
</div>
{% if kundendesign %}
<div class="header-image bg-white d-md-none d-block text-center" {#style="background-image: url('{{ mobileHintergrundbild }}')"#}>
<img src="{{ mobileHintergrundbild }}" class="img-fluid p-2" style="max-height: 100px"/>
</div>
{% else %}
<div class="mt-0">
</div>
{% endif %}
<div class="info-text mt-lg-5 mt-md-1 mt-4 text-center text-md-start">
<h1 class="fw-bolder schriftfarbe ueberschrift-startseite" style="size: 24em">
Es steckt so viel<br>mehr in dir!
</h1>
<div class="fs-sm schriftfarbe ueberschrift2-startseite">Mach dich fit für die Zukunft.<br>Finde dein Weiterbildungsangebot!</div>
<div class="mt-lg-5 mt-md-3 mt-sm-3 mt-3">
{#
<a class="btn btn-primary border-0 andereButtonfarbe p-1 ps-2 pe-2" href="{{ path ('user_konfigurator_auswahl') }}">
<div class="d-flex align-items-center fw-bolder"><i class="mdi mdi-compass me-2 fs-4"></i> Stärkenkompass starten</div>
</a>
#}
<a class="btn btn-primary border-0 andereButtonfarbe p-1 ps-2 pe-2 seminarlink-navigationsleiste" href="#">
<div class="d-flex align-items-center fw-bolder"><i class="mdi mdi-card-search-outline me-2 fs-4"></i> Seminare suchen</div>
</a>
</div>
</div>
</div>
</section>
<section class="seminar-slider-section container position-relative mt-md-n10">
<div class="card px-lg-2 border-0 shadow-lg">
<div class="card-body px-1 pt-4 pb-4">
<h3 class="text-center pb-3">Unsere Seminarempfehlungen</h3>
{% if schulungen != null %}
<div class="row pt-2 mx-n2">
{% for schulung in schulungen %}
{% set istFavorit = false %}
{% for favorit in favoriten %}
{% if schulung.id == favorit.schulung.id %}
{% set istFavorit = true %}
{% endif %}
{% endfor %}
<!-- Product-->
<div class="col-lg-4 col-md-6 px-2 mb-grid-gutter">
<!-- Product-->
<div class="card product-card-alt">
<div class="product-thumb">
<button href="{{ path ('user_produkt_favoriten_speichern',{id:schulung.id}) }}"
title="Zu Favoriten hinzufügen"
class="btn-wishlist btn-sm btn-heart-favorite {% if istFavorit %}d-none{% endif %}"
data-herz-button-art="plus"
data-schulung-id="{{ schulung.id }}"
type="button">
<i class="mdi mdi-heart-plus fs-4"></i>
</button>
<button href="{{ path ('user_produkt_favoriten_loeschen',{id:schulung.id}) }}"
title="aus Favoriten entfernen"
class="btn-wishlist btn-sm btn-heart-favorite {% if istFavorit == false %}d-none{% endif %}"
data-herz-button-art="minus"
data-schulung-id="{{ schulung.id }}"
type="button">
<i class="mdi mdi-heart-minus fs-4"></i>
</button>
<a class="product-thumb-overlay"
href="{{ path ('produkt_details',{id:schulung.id}) }}{% if schulung.nurCelsisten == 4 %}?guid={{ schulung.importFehler }}{% endif %}"></a>
{% if schulung.importId == 0 %}
<img src="{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild ) }}">
{% else %}
<div class="ratio ratio-16x9">
<div style="background-image: url('{{ asset('uploads/schulungen/' ~ schulung.id ~ '/titelbild/' ~ schulung.titelbild) }}'); width: 100%; background-size: cover; background-repeat: no-repeat;"></div>
</div>
{% endif %}
<i class="mdi mdi-heart fs-1 text-primary heart-favorite {% if istFavorit == false %}d-none{% endif %}"></i>
</div>
<div class="card-body">
<div class="d-flex flex-wrap justify-content-between align-items-start pb-2">
<div class="text-muted fs-xs me-1">
{% for firmenprofil in firmenprofile %}
{% if schulung.erstellerFirmenId == firmenprofil.id %}
von <a class="product-meta fw-medium"
href="#">{{ firmenprofil.firmenname }}</a>
{% endif %}
{% endfor %}
</div>
{% set anzahlSterneVergabe = 0 %}
{% set SterneGesamt = 0 %}
{% set SterneErgebnis = 0 %}
{% for bewertung in schulung.bewertungen %}
{% set anzahlSterneVergabe = anzahlSterneVergabe + 1 %}
{% set SterneGesamt = SterneGesamt + bewertung.sterne %}
{% endfor %}
{% if anzahlSterneVergabe != 0 %}
{% set SterneErgebnis = SterneGesamt / anzahlSterneVergabe %}
{% endif %}
<div class="star-rating">
<i class="star-rating-icon ci-star{% if SterneErgebnis >= 1 %}-filled active{% endif %}"></i>
{% for i in 1..4 %}
{% set stern = '' %}
{% if SterneErgebnis >= i + 0.5 %}
{% set stern = '-half active' %}
{% endif %}
{% if SterneErgebnis >= i + 1 %}
{% set stern = '-filled active' %}
{% endif %}
<i class="star-rating-icon ci-star{{ stern }}"></i>
{% endfor %}
</div>
</div>
<h3 class="product-title fs-sm mb-2 fw-bold">
<a href="{{ path ('produkt_details',{id:schulung.id}) }}{% if schulung.nurCelsisten == 4 %}?guid={{ schulung.importFehler }}{% endif %}">{{ schulung.schulungName }}</a>
</h3>
<div class="fs-sm me-2">{{ schulung.kurzbeschreibung|u.truncate(130, '...',false) }}</div>
<div class="d-flex flex-wrap justify-content-between align-items-center mt-3">
<div class="fs-sm me-2 text-muted">{{ schulung.schulungsart.name }}</div>
{% if schulung.schulungsTermine|length > 0 %}
{% set terminGefunden = 0 %}
{% for termin in schulung.schulungsTermine|sort((a, b) => a.von <=> b.von) %}
{% if terminGefunden == 0 %}
{% set terminAnzeigen = 0 %}
{% if termin.anmeldeschluss == null %}
{% if date(termin.von) >= date('+0seconds', 'Europe/Berlin') %}
{% set terminAnzeigen = 1 %}
{% endif %}
{% else %}
{% if termin.anmeldeschluss >= date('-1days', 'Europe/Berlin') %}
{% set terminAnzeigen = 1 %}
{% endif %}
{% endif %}
{% if terminAnzeigen == 1 %}
{% set terminIDs = terminIDs|merge([termin.id]) %}
<div class="text-muted rounded-1 py-1 px-2 small"><i
class="mdi mdi-clock-outline me-1"></i>{{ termin.von|date("d.m.Y") }}</div>
{% set terminGefunden = 1 %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</div>
</div>
</div>
<div class="d-md-none border-top"></div>
</div>
{% endfor %}
<div id="weitere-seminare">
</div>
</div>
{% endif %}
<div class="text-center">
<a class="btn btn-outline-primary {#weitere-seminare-anzeigen#} seminarlink-navigationsleiste" href="#">
weitere Seminare anzeigen
<i class="ci-arrow-right fs-ms ms-1"></i>
</a>
</div>
</div>
</div>
</section>
{#
{% include('/user/start/index_evtl.html.twig') %}
#}
<section class="bg-size-cover bg-position-center pt-5 pb-4 pb-lg-5 hintergrundfarbe">
<div class="container pt-lg-3">
{% if not is_granted('ROLE_MITGLIED') %}
<h2 class="h3 mb-3 pb-4 text-light text-center">Warum unseren Campus?</h2>
{% else %}
<h2 class="h3 mb-3 pb-4 text-light text-center">Das wichtigste Projekt bei uns bist du!</h2>
{% endif %}
<div class="row pt-lg-2">
<div class="col-lg-3 col-md-6 mb-grid-gutter">
<div class="d-inline-flex text-start"><i class="h1 mdi mdi-order-alphabetical-ascending text-white"></i>
<div class="ps-3">
<h6 class="text-light fs-base mb-1">Vielfältiges Angebot:</h6>
<p class="text-light fs-ms opacity-70 mb-0">
Wir bündeln alle relevanten Seminare der SHK Branche - vom Online Live-Seminar bis zum mehrtägigen Präsenztraining und Qualifizierungsangebot.
</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-grid-gutter">
<div class="d-inline-flex text-start"><i class="h1 mdi mdi-chart-line text-white"></i>
<div class="ps-3">
<h6 class="text-light fs-base mb-1">Das richtige Angebot für jedes Ziel:</h6>
<p class="text-light fs-ms opacity-70 mb-0">
Finde heraus, welche Qualifizierung geeignet ist.
Klicke auf den Stärkenkompass und finde so das richtige Angebot um deine Pontenziale zu entwickeln.
</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-grid-gutter">
<div class="d-inline-flex text-start"><i class="h1 mdi mdi-account-check text-white"></i>
<div class="ps-3">
<h6 class="text-light fs-base mb-1">Erfahrene Dozenten:</h6>
<p class="text-light fs-ms opacity-70 mb-0">
Unsere Dozenten verbinden Fachwissen mit Praxiserfahrung und vermitteln ihr Wissen daher besonders verständlich.
</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-grid-gutter">
<div class="d-inline-flex text-start"><i class="h1 mdi mdi-card-account-details text-white"></i>
<div class="ps-3">
<h6 class="text-light fs-base mb-1">Bewertungen und Teilnehmer:</h6>
<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>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Blog posts carousel-->
<section class="py-5">
<div class="container py-lg-3">
<h2 class="h1 text-center">Blogs</h2>
<p class="text-muted text-center mb-3 pb-4">Hier erfährst du was die Branche bewegt.</p>
<div class="tns-carousel">
<div class="tns-carousel-inner"
data-carousel-options="{"items": 2, "gutter": 15, "controls": false, "nav": true, "responsive": {"0":{"items":1},"500":{"items":2},"768":{"items":3}, "992":{"items":3, "gutter": 30}}}">
{% for blog in blogs %}
<div>
<div class="card">
<a class="blog-entry-thumb" href="{{ path ('user_blog',{id:blog.id}) }}">
<img class="card-img-top"
src="{{ asset('/uploads/blogs/' ~ blog.firma.id ~ '/titelbild/' ~ blog.id ~ '/' ~ blog.titelbild) }}">
</a>
<div class="card-body">
<h2 class="h6 blog-entry-title">
<a href="{{ path ('user_blog',{id:blog.id}) }}">{{ blog.titel }}</a>
</h2>
<p class="fs-sm">{{ blog.kurzbeschreibung }}</p>
<div class="fs-xs text-nowrap">
<span class="text-nowrap text-muted">{{ blog.datum|date("d.m.Y") }}</span>
<span class="blog-entry-meta-divider mx-2"></span>
<span class="text-nowrap text-muted">{{ blog.firma.firmenname }}</span>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- More button-->
<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>
</div>
</section>
<script>
jQuery(function ($) {
$('#staerkenkompass-mobil-ansicht').removeClass('d-none')
$('#home-mobil-ansicht').addClass('d-none')
{% if app.user != null and app.user.firmenProfil != null %}
$('#dashboard-mobil-ansicht').removeClass('d-none')
{% endif %}
let neueSeminareCounter = 0
let array_termine_vorhanden = [];
{% for terminID in terminIDs %}
array_termine_vorhanden.push({{ terminID }});
{% endfor %}
$(document).on('click', '.weitere-seminare-anzeigen', function (event) {
event.preventDefault();
neueSeminareCounter ++;
$('<div id="weitere-seminare-' + neueSeminareCounter + '"></div>').appendTo('#weitere-seminare');
$.ajax({
'url': '{{ path('user_start_weitere') }}',
'method': 'post',
'data': {
'array_termine_vorhanden': array_termine_vorhanden,
'neueSeminareCounter': neueSeminareCounter,
},
'success': function (response) {
document.getElementById("weitere-seminare-" + neueSeminareCounter).innerHTML = response['weitere_seminare_gefunden'];
array_termine_vorhanden = $.merge(array_termine_vorhanden, response['weitere_termine_ids']);
if (response['anzahl_termine'] < 3) {
$('.weitere-seminare-anzeigen').addClass('d-none');
}
},
'error': function (response) {
console.log('Konnte nicht gespeichert werden.' + response)
}
});
});
$(document).on('click', '.btn-heart-favorite', function (event) {
event.preventDefault();
let $button = $(this);
let $container = $button.closest('.product-thumb');
let href = $(this).attr('href');
let buttonArt = $(this).attr('data-herz-button-art');
$.ajax({
'url': href,
'method': 'get',
'success': function (response) {
{% if is_granted('ROLE_MITGLIED') %}
if (response['anzahlFavoriten'] > 0) {
$('.favoriten-handy-navigation-link').removeClass('d-none');
} else {
$('.favoriten-handy-navigation-link').addClass('d-none');
}
{% endif %}
$button.addClass('d-none');
if (buttonArt === 'plus') {
$('button[data-herz-button-art="minus"]', $container).removeClass('d-none');
$('.heart-favorite', $container).removeClass('d-none');
}
if (buttonArt === 'minus') {
$('button[data-herz-button-art="plus"]', $container).removeClass('d-none');
$('.heart-favorite', $container).addClass('d-none');
}
},
'error': function (response) {
console.log('Fehler bei Ajax-Link' + response)
}
});
});
});
</script>
{% endblock %}