{% extends 'layout_frontend.html.twig' %}
{% block title %}{{ parent() }} Home{% endblock %}
{% block content %}
{# {% include 'shared/frontend/slider.html.twig' %}#}
<!--Main Content Start-->
<div class="main-content wf100">
<!--Latest Events Start-->
<section class="news-updates wf100 p90">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="section-title">
<h2>Events</h2>
</div>
</div>
</div>
<div class="news-grid">
<div class="row">
{% for event in activeEvents %}
<!--Box Start-->
<div class="col-lg-4 col-md-6">
<div class="ng-box">
<div class="thumb">
<a href="{{ path('event', {'slug': event.slug}) }}">
<i class="fas fa-link"></i>
</a>
{% if event.picture %}
<img src="{{ asset('upload/' ~ event.picture) }}" alt="">
{% endif %}
</div>
<div class="ng-txt">
<h4>
<a href="{{ path('event', {'slug': event.slug}) }}">{{ event.name }}</a>
</h4>
<ul class="post-meta">
<li><i class="fas fa-map-marker-alt"></i> {{ event.location }}</li>
<li><i class="fas fa-calendar-alt"></i> {{ event.startDate|date('F j, Y') }}</li>
</ul>
<p>{{ event.shortDescription }}</p>
<a href="{{ path('event', {'slug': event.slug}) }}" class="rm">More Details</a>
</div>
</div>
</div>
<!--Box End-->
{% endfor %}
</div>
</div>
</div>
</section>
<!--Latest Events End-->
</div>
<!--Main Content End-->
<!-- Modal -->
<div class="modal fade" id="registrationModal" tabindex="-1" role="dialog" aria-labelledby="registrationModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="registrationModalLabel">Success</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>You've successfully registered to the event!</p>
</div>
</div>
</div>
</div>
{% endblock %}
{% block page_javascripts %}
<script>
jQuery(document).ready(function ($) {
var url = new URL(window.location.href);
var registered = url.searchParams.get('registered');
if (registered === '1') {
$('#registrationModal').modal('show');
}
});
</script>
{% endblock %}