src/StartPlatz/Bundle/EventBundle/Resources/views/Default/event-single.lp.html.twig line 1

Open in your IDE?
  1. {% extends "@StartPlatzStyleBundle/Bootstrap4/base.homepage.event-lp.html.twig" %}
  2. {% import "@StartPlatzEventBundle/Admin/_macros.bs4.html.twig" as layout %}
  3. {% set currentPath = app.request.get('_route') %}
  4. {% block metaData %}
  5.     {# Sonderseite overrides #}
  6.     {% set pageTitle = (batch is defined and batch.landingPageTitle) ? batch.landingPageTitle : event.seoTitle %}
  7.     {% set pageDesc = (batch is defined and batch.landingPageDescription) ? batch.landingPageDescription : event.seoDescription %}
  8.     {% set pageImage = (batch is defined and batch.landingPageSocialImage) ? batch.landingPageSocialImage : event.imageLink %}
  9.     {# Optimize meta description for archived events #}
  10.     {% if event.status == 'archive' %}
  11.         {% set archivePrefix = 'Vergangene Veranstaltung vom ' ~ event.startDate|date('d.m.Y') ~ ': ' %}
  12.         <meta name="description" content="{{ archivePrefix }}{{ pageDesc|slice(0, 140) }}">
  13.     {% else %}
  14.         <meta name="description" content="{{ pageDesc }}">
  15.     {% endif %}
  16.     <meta name="keywords" content="{{ event.seoKeyword }}">
  17.     <meta name="author" content="{{ event.trainer }}">
  18.     {% if app.environment == 'prod' %}
  19.         <meta name="robots" content="index,follow">
  20.         {% if event.seriesTag is not empty %}
  21.             <link rel="canonical" href="{{ path('event_series', {'seriesTag': event.seriesTag}) }}" />
  22.         {% else %}
  23.             <link rel="canonical" href="https://www.startplatz.de/event/{{ event.slug | url_encode }}" />
  24.         {% endif %}
  25.     {% else %}
  26.         <meta name="robots" content="noindex,nofollow">
  27.     {% endif %}
  28.     <!-- Open Graph -->
  29.     <meta property="og:title" content="{{ pageTitle }}">
  30.     <meta property="og:description" content="{{ pageDesc }}">
  31.     <meta property="og:image" content="{{ pageImage }}">
  32.     <!-- Twitter Card -->
  33.     <meta name="twitter:card" content="summary">
  34.     <meta name="twitter:title" content="{{ pageTitle }}">
  35.     <meta name="twitter:description" content="{{ pageDesc }}">
  36.     <meta name="twitter:image" content="{{ pageImage }}">
  37. {% endblock %}
  38. {% block additionalHead %}
  39.     {#
  40.     {% include "@StartPlatzStyle/CSS/_homepage.sinlge-event.version-2023-fall.html.twig" %}
  41.     #}
  42.     <style>
  43.         html {
  44.             scroll-behavior: smooth;
  45.         }
  46.         :target::before {
  47.             content: "";
  48.             display: block;
  49.             height: 70px;
  50.             margin-top: -70px;
  51.         }
  52.         body {
  53.             background-image: url('{{ event.bgImagelink }}'); /* Pfad zu Ihrem Bild */
  54.             background-size: cover; /* Stellt sicher, dass das Bild die ganze Seite bedeckt */
  55.             background-position: center; /* Zentriert das Bild */
  56.             background-attachment: fixed; /* Verhindert, dass das Bild beim Scrollen mitbewegt wird */
  57.             font-family: 'Source Sans Pro', sans-serif;
  58.         }
  59.         /*
  60.         .content-wrapper class to limit the maximum width of the content area.
  61.         It ensures better readability by centering the content and setting a maximum width.
  62.         */
  63.         .content-wrapper {
  64.             max-width: 800px;  /* You can adjust this value based on your design needs */
  65.             margin-left: auto;
  66.             margin-right: auto;
  67.         }
  68.         .btn-outline-primary {
  69.             color: #495057; /* This color should match the text color of the landing page */
  70.             border-color: #495057; /* Same as above, can be the primary color of your site */
  71.         }
  72.         .btn-outline-primary:hover {
  73.             background-color: #495057; /* This should be a prominent color that matches your design */
  74.             color: #ffffff; /* Usually, white text works well on a darker background */
  75.             border-color: #495057; /* Match the hover background for a solid look */
  76.         }
  77.     </style>
  78.     {% if event.additionalCss is not empty %}
  79.         <!-- addition css styles only for this event -->
  80.         <style>
  81.             {{ event.additionalCss }}
  82.         </style>
  83.     {% endif %}
  84.     {% if batch is defined and batch.landingPageCss is not empty %}
  85.         <style>{{ batch.landingPageCss }}</style>
  86.     {% endif %}
  87.     {% include "@StartPlatzStyleBundle/_meta-pixel.html.twig" with { meta_pixel_id: event.metaPixelId|default(null) } only %}
  88. {% endblock %}
  89. {% block navigation %}{% endblock %}
  90. {% block title %}{{ pageTitle|default(event.seoTitle) }}{% endblock %}
  91. {% block content %}
  92.     {% set lang = lang|default('DE') %}
  93.     {% if batch is defined and batch.landingPageDescription is not empty %}
  94.         {{ include(template_from_string(batch.landingPageDescription)) }}
  95.     {% elseif event.teaser %}
  96.         {{ include(template_from_string(event.teaser)) }}
  97.     {% endif %}
  98.     <section class="bg-sp-grey">
  99.         <div class="container">
  100.             <!-- Custom content-wrapper class to limit content width and improve readability -->
  101.             <div class="content-wrapper">
  102.                 <div class="row pt-3 bg-white mb-3">
  103.                     <div class="col-12" >
  104.                         {% if embed and not event.isSinglePage %}
  105.                             {% include "@StartPlatzEvent/Default/_event.part.articleImage-and-title.html.twig" %}
  106.                         {% endif %}
  107.                         <!-- Archive Banner (SEO-optimized: no redirect) -->
  108.                         {% include '@StartPlatzEvent/Default/_event.part.archive-banner.html.twig' with {
  109.                             'event': event
  110.                         } %}
  111.                         <!-- end archive banner -->
  112.                         <!-- start part flashbag notices -->
  113.                         {% if app.session.flashbag.has('notice')  %}
  114.                             <div class="row">
  115.                                 <div class="col-12 px-md-5">
  116.                                     {% for flashMessage in app.session.flashbag.get('notice') %}
  117.                                         <div class="text-center alert {% if 'SUCCESS' in flashMessage %}alert-success{% elseif 'ERROR' in flashMessage  %}alert-danger{% else %}alert-default{% endif %}" role="alert">{{ flashMessage|replace({'SUCCESS': ''})|raw }}</div>
  118.                                     {% endfor %}
  119.                                     {{ editFeedback|raw }}
  120.                                 </div>
  121.                             </div>
  122.                         {% endif %}
  123.                         <!-- end part flashbag notices -->
  124.                         {% if settings.batchType is not defined or settings.batchType != "memberDocumentation" %}
  125.                             <!-- start part feedback application process -->
  126.                             <div class="row">
  127.                                 <div class="col-12 px-md-5">
  128.                                     {% include "@StartPlatzEvent/Default/_event.part.feedback-application-process.html.twig" %}
  129.                                 </div>
  130.                             </div>
  131.                             <!-- end part feedback application process -->
  132.                         {% endif %}
  133.                         <!-- start part content -->
  134.                         <div class="row">
  135.                             <div class="col-12 px-md-5">
  136.                                 {% if batch is defined and batch.hasCustomPage() %}
  137.                                     {{ batch.landingPageContent|raw }}
  138.                                 {% else %}
  139.                                     {{ event.content|raw }}
  140.                                 {% endif %}
  141.                             </div>
  142.                         </div>
  143.                         <!-- end part content -->
  144.                         {% if event.alert == "Anfrage" %}
  145.                             <!-- start part anfrage and registering -->
  146.                             {% include "@StartPlatzEvent/Default/_registration.anfrage.html.twig"%}
  147.                             <!-- end part anfrage and registering -->
  148.                         {% else %}
  149.                             <!-- start part ticketing and registering -->
  150.                             {% if event.ticketing %}
  151.                                 <h2 id="Anmeldung" class="text-center">Anmeldung</h2>
  152.                                 <p>
  153.                                     {{ event.ticketing|raw }}
  154.                                 </p>
  155.                             {% elseif event.applicationUrl and not batch%}
  156.                                 <h2 id="Anmeldung" class="text-center">Anmeldung</h2>
  157.                                 {% include "@StartPlatzEvent/Default/_registration.appicationUrl.html.twig"%}
  158.                             {% elseif event.ctaContent or (settings.doNotshowApplicationSection is defined and settings.doNotshowApplicationSection) %}
  159.                                 <!-- Application Section will not be shown -->
  160.                             {% elseif batch and batchIsOpen %}
  161.                                 {% if batch.priceInEuroCent > 0 %}
  162.                                     {% include "@StartPlatzEvent/Default/_registration.batch.html.twig"%}
  163.                                 {% else  %}
  164.                                     {% if settings.isPreRegistration is defined and settings.isPreRegistration %}
  165.                                         {% include "@StartPlatzEvent/Default/_registration.pre-registration-batch.html.twig"%}
  166.                                     {% else %}
  167.                                         {% include "@StartPlatzEvent/Default/_registration.batch.html.twig"%}
  168.                                     {% endif%}
  169.                                 {% endif %}
  170.                             {% else %}
  171.                                 <h2 id="Anmeldung" class="text-center">Anmeldung nicht möglich</h2>
  172.                             {% endif %}
  173.                             <!-- end part ticketing and registering -->
  174.                         {% endif %}
  175.                         <!-- start cta content -->
  176.                         {% if event.ctaContent %}
  177.                             <div class="row">
  178.                                 <div class="col-12 px-md-5">
  179.                                     {{ include(template_from_string(event.ctaContent)) }}
  180.                                 </div>
  181.                             </div>
  182.                         {% endif %}
  183.                         <!-- end cta content -->
  184.                         <!-- start post cta content -->
  185.                         {% if event.postCtaContent %}
  186.                             <div class="row">
  187.                                 <div class="col-12 px-md-5">
  188.                                     {{ event.postCtaContent|raw }}
  189.                                 </div>
  190.                             </div>
  191.                         {% endif %}
  192.                         <!-- end post cta content -->
  193.                         <!-- start tags -->
  194.                         <div class="row">
  195.                             <div class="col-12 px-md-5 text-center mb-3">
  196.                                 {{ layout.hashTagList( event.tags|split('#'), 'events_list', templateVars, 'tmp' ) }}
  197.                             </div>
  198.                         </div>
  199.                         <!-- end tags -->
  200.                         <!-- start part speakers and partners -->
  201.                         {% if speakers %}
  202.                             <div class="row">
  203.                                 <div class="col-12 px-md-5">
  204.                                     {% include "@StartPlatzEvent/Default/_event.part.speakers-and-partners.html.twig" %}
  205.                                 </div>
  206.                             </div>
  207.                         {% endif %}
  208.                         <!-- end part speakers and partners -->
  209.                         <!-- start part event series -->
  210.                         {% if event.seriesTag %}
  211.                             <div class="row">
  212.                                 <div class="col-12 px-md-5">
  213.                                     {% include "@StartPlatzEvent/Default/_event.part.event-series.html.twig" %}
  214.                                 </div>
  215.                             </div>
  216.                         {% endif %}
  217.                         <!-- end part event series -->
  218.                         {% if preview is defined and preview == 'byGuestEditor' %}
  219.                             <div class="row">
  220.                                 <a href="{{ path('guest_events_add', {'id': event.id}) }}" class="btn btn-success pull-right" role="button">Zurück zur Event-Seite</a>
  221.                             </div>
  222.                         {% endif %}
  223.                     </div>
  224.                 </div>
  225.             </div> <!-- End of content-wrapper -->
  226.         </div>
  227.     </section>
  228.     {% if app.user and batch %}
  229.         <section class="bg-sp-grey pt-1">
  230.             <div class="container">
  231.                 <div class="content-wrapper">
  232.                     <div class="row pt-3 bg-white">
  233.                         <div class="col-12">
  234.                             <div class="row">
  235.                                 <div class="col-12 px-md-5 text-center">
  236.                                     <h2>Promote This Event</h2>
  237.                                     <p>Teile diesen Event-Link und hilf uns, mehr Aufmerksamkeit für dieses Event zu generieren.</p>
  238.                                     <div class="input-group mb-3">
  239.                                         <input type="text" class="form-control" id="promotionUrl" readonly value="{{ promotionUrl }}">
  240.                                         <div class="input-group-append">
  241.                                             <button class="btn btn-outline-secondary" type="button" onclick="copyToClipboard('#promotionUrl')">Kopieren</button>
  242.                                         </div>
  243.                                     </div>
  244.                                 </div>
  245.                             </div>
  246.                         </div>
  247.                     </div>
  248.                 </div>
  249.             </div>
  250.         </section>
  251.         <script>
  252.             function copyToClipboard(elementId) {
  253.                 var copyText = document.querySelector(elementId);
  254.                 copyText.select();
  255.                 document.execCommand("copy");
  256.             }
  257.         </script>
  258.     {% endif %}
  259.     {% if app.user is defined and application  is defined and application is not null and application.canReadList %}
  260.             <section class="bg-sp-grey pt-3">
  261.                 <div class="container">
  262.                     <div class="content-wrapper">
  263.                         <div class="row pt-3 pb-3 bg-white">
  264.                             <div class="col-12">
  265.                                 Hier kannst Du die Teilnehmerliste einsehen
  266.                                 <a class="btn btn-outline-dark btn-sm" href="{{ path('admin_event_participants', {id: event.id} ) }}" role="button">participants</a>
  267.                             </div>
  268.                         </div>
  269.                     </div>
  270.                 </div>
  271.             </section>
  272.     {% endif %}
  273.     {% if app.user and app.user.email == event.createdBy %}
  274.         <section class="bg-sp-grey pt-3">
  275.             <div class="container">
  276.                 <div class="content-wrapper">
  277.                     <div class="row pt-3 pb-3 bg-white">
  278.                         <div class="col-12">
  279.                             Hier kannst du den Event bearbeiten
  280.                             <a class="btn btn-outline-dark btn-sm" href="{{ path('guest_events_edit', {id: event.id} ) }}" role="button">update</a>
  281.                             Hier kannst Du die Teilnehmerliste einsehen
  282.                             <a class="btn btn-outline-dark btn-sm" href="{{ path('admin_event_participants', {id: event.id} ) }}" role="button">participants</a>
  283.                         </div>
  284.                     </div>
  285.                 </div>
  286.             </div>
  287.         </section>
  288.     {% endif %}
  289.     {% if app.user is defined %}
  290.         {% if app.user.admin is defined and app.user.admin %}
  291.             <section class="bg-sp-grey pt-3">
  292.                 <div class="container">
  293.                     <div class="content-wrapper">
  294.                         <div class="row pt-3 bg-white mb-3">
  295.                             <div class="col-12">
  296.                                 <div class="row">
  297.                                     <div class="col-12 px-md-5 pb-3 text-center">
  298.                                         <a class="btn btn-outline-dark btn-sm" href="{{ path('admin_event_show', {id: event.id} ) }}" role="button">update</a>
  299.                                         <a class="btn btn-outline-dark btn-sm" href="{{ path('admin_event_participants', {id: event.id} ) }}" role="button">participants</a>
  300.                                     </div>
  301.                                     <div class="col-12 pb-3 text-center">
  302.                                         {{ layout.tagList( event.tags|split('#'), 'events_list', 'btn-success', templateVars, 'tmp' ) }}
  303.                                     </div>
  304.                                 </div>
  305.                             </div>
  306.                         </div>
  307.                     </div>
  308.                 </div>
  309.             </section>
  310.         {% endif %}
  311.     {% endif %}
  312.     <!-- homepage single event ends -->
  313. {% endblock %}
  314. {% block footer %}
  315.     {% if not embed|default(false) %}
  316.         {% include '@StartPlatzWebsiteBundle/Default/footerBootstrap40.html.twig' %}
  317.     {% endif %}
  318. {% endblock %}
  319. {% block infiniteLoop %}{% endblock %}
  320. {% block javascriptInfiniteLoop %}{% endblock %}
  321. {% block ajax_helpers %}{% endblock %}
  322. {% block javascripts %}
  323.     {% if batch is defined and batch.landingPageJs is not empty %}
  324.         <script>{{ batch.landingPageJs|raw }}</script>
  325.     {% endif %}
  326. {% endblock %}