--- /dev/null
+{if $events}
+<div class="glma-small-12 glma-medium-9 glma-large-10 glma-columns">
+ <h1>Featured Events</h1>
+</div>
+<div class="glma-small-12 glma-medium-3 glma-large-2 glma-columns">
+ <a href="{$mainEventUrl}"><button class="view-events-btn">VIEW ALL EVENTS</button></a>
+</div>
+<div class="glma-small-12 glma-columns main-events-container">
+ <div id="feed" class="glma-row collapse">
+ {foreach $events as $event}
+ <div class="event glma-small-12 text-left glma-medium-6 glma-large-4 glma-columns">
+ <a class="glma-event-image-container" href="{$siteBaseUrl}event-detail/{$event.name_slug}/">
+ <div style='background: url("{$mainImgUrl}{$event.image}") no-repeat center center;background-size: contain;' class='image-container'></div>
+ </a>
+ <div data-equalizer-watch class="event-title-intro">
+ <a class="front-event-link" href="{$siteBaseUrl}event-detail/{$event.name_slug}/"><h4 class="front-event-title">{$event.name}</h4></a>
+
+ <p class="event-intro-text">{$event.intro}</p>
+ </div>
+ <span class="front-event-date-container">
+ {foreach from=$event.times key=myId item=i name=time}
+ {if $smarty.foreach.time.first}
+
+ <span class="front-event-date">{$i.start_time.timestamp|date_format:"%B %e"}</span>
+ {assign var=first value=$i.start_time.timestamp}
+
+ {/if}
+ {if $smarty.foreach.time.last}
+ {if $first != $i.start_time.timestamp}
+ <span class="front-event-date"> - {$i.start_time.timestamp|date_format:"%B %e"} </span>
+ {/if}
+ {/if}
+ {/foreach}
+ </span>
+ <a class="front-event-button" href="{$siteBaseUrl}event-detail/{$event.name_slug}/">MORE</a>
+ <div class="event-border"></div>
+ </div>
+ {/foreach}
+ </div>
+</div>
+{/if}
+<script>
+ jQuery(function($){
+ var event_feed = $("#feed");
+ event_feed.addClass("feed");
+ event_feed.children("div").addClass("feed-block");
+
+ function check_window_width(){
+
+ if($(window).width() > 1023){
+ if($(".feed").hasClass('slick-initialized') ) {
+ $(".feed").slick('unslick')
+ }
+ $(".feed").slick({
+ infinite: true,
+ slidesToShow: 3,
+ slidesToScroll: 1,
+ arrows: true,
+ autoplay: true,
+ autoplaySpeed: 5000
+
+ });
+
+ } else if($(window).width() < 1025 && $(window).width() > 639){
+ if($(".feed").hasClass('slick-initialized') ) {
+ $(".feed").slick('unslick')
+ }
+ $(".feed").slick({
+ infinite: true,
+ slidesToShow: 2,
+ slidesToScroll: 1,
+ autoplay: true,
+ autoplaySpeed: 5000
+ });
+ } else if($(window).width() < 641 && $(window).width() > 319){
+ if($(".feed").hasClass('slick-initialized') ) {
+ $(".feed").slick('unslick')
+ }
+ $(".feed").slick({
+ infinite: true,
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ autoplay: true,
+ autoplaySpeed: 5000
+ });
+ }
+ }
+ $(window).on("load", function(){
+ equalheight = function(container){
+
+ var currentTallest = 0,
+ currentRowStart = 0,
+ rowDivs = new Array(),
+ $el,
+ currentDiv,
+ topPosition = 0;
+ $(container).each(function() {
+
+ $el = $(this);
+ $($el).height('auto');
+ topPosition = $el.position().top;
+ if (currentRowStart != topPosition) {
+ for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+ rowDivs[currentDiv].height(currentTallest);
+
+ }
+ rowDivs.length = 0; // empty the array
+ currentRowStart = topPosition;
+ currentTallest = $el.height();
+
+ rowDivs.push($el);
+ } else {
+ rowDivs.push($el);
+ currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
+ }
+
+ for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
+ rowDivs[currentDiv].height(currentTallest);
+ }
+ });
+ }
+ equalheight( $('.event.feed-block .event-title-intro') );
+ $('.main-events-container').fadeTo('slow', 1);
+ });
+
+ check_window_width();
+ $(window).resize(function () {
+ check_window_width();
+ equalheight( $('.event.feed-block .event-title-intro') );
+ });
+ });
+ </script>
\ No newline at end of file