templates/frontend/index.html.twig line 1

Open in your IDE?
  1. {% extends 'layout_frontend.html.twig' %}
  2. {% block title %}{{ parent() }} Home{% endblock %}
  3. {% block content %}
  4. {#    {% include 'shared/frontend/slider.html.twig' %}#}
  5.     <!--Main Content Start-->
  6.     <div class="main-content wf100"> 
  7.         <!--Latest Events Start-->
  8.         <section class="news-updates wf100 p90">
  9.             <div class="container">
  10.                 <div class="row">
  11.                     <div class="col-md-12">
  12.                         <div class="section-title">
  13.                             <h2>Events</h2>
  14.                         </div>
  15.                     </div>
  16.                 </div>
  17.                 <div class="news-grid">
  18.                     <div class="row">
  19.                         {% for event in activeEvents %}
  20.                             <!--Box Start-->
  21.                             <div class="col-lg-4 col-md-6">
  22.                                 <div class="ng-box">
  23.                                     <div class="thumb">
  24.                                         <a href="{{ path('event', {'slug': event.slug}) }}">
  25.                                             <i class="fas fa-link"></i>
  26.                                         </a>
  27.                                         {% if event.picture %}
  28.                                             <img src="{{ asset('upload/' ~ event.picture) }}" alt="">
  29.                                         {% endif %}
  30.                                     </div>
  31.                                     <div class="ng-txt">
  32.                                         <h4>
  33.                                             <a href="{{ path('event', {'slug': event.slug}) }}">{{ event.name }}</a>
  34.                                         </h4>
  35.                                         <ul class="post-meta">
  36.                                             <li><i class="fas fa-map-marker-alt"></i> {{ event.location }}</li>
  37.                                             <li><i class="fas fa-calendar-alt"></i> {{ event.startDate|date('F j, Y') }}</li>
  38.                                         </ul>
  39.                                         <p>{{ event.shortDescription }}</p>
  40.                                         <a href="{{ path('event', {'slug': event.slug}) }}" class="rm">More Details</a> 
  41.                                     </div>
  42.                                 </div>
  43.                             </div>
  44.                             <!--Box End-->
  45.                         {% endfor %}
  46.                     </div>
  47.                 </div>
  48.             </div>
  49.         </section>
  50.         <!--Latest Events End-->
  51.     </div>
  52.     <!--Main Content End-->
  53.     <!-- Modal -->
  54.     <div class="modal fade" id="registrationModal" tabindex="-1" role="dialog" aria-labelledby="registrationModalLabel" aria-hidden="true">
  55.         <div class="modal-dialog" role="document">
  56.             <div class="modal-content">
  57.                 <div class="modal-header">
  58.                     <h5 class="modal-title" id="registrationModalLabel">Success</h5>
  59.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  60.                         <span aria-hidden="true">&times;</span>
  61.                     </button>
  62.                 </div>
  63.                 <div class="modal-body">
  64.                     <p>You've successfully registered to the event!</p>
  65.                 </div>
  66.             </div>
  67.         </div>
  68.     </div>
  69. {% endblock %}
  70. {% block page_javascripts %}
  71.     <script>
  72.         jQuery(document).ready(function ($) {
  73.             var url = new URL(window.location.href);
  74.             var registered = url.searchParams.get('registered');
  75.             if (registered === '1') {
  76.                 $('#registrationModal').modal('show');
  77.             }
  78.         });
  79.     </script>
  80. {% endblock %}