<div class="blog-module ">
    <div class="block-title">
		<!-- {% if text_module %} -->
			<!-- <p>{{ text_module }}</p> -->
		<!-- {% endif %} -->
        <h3>{{ text_heading_title }}</h3>
    </div>
    {% if posts %}
    <div class="swiper-viewport">
        <div class="swiper-container posts-container">
            <div class="swiper-wrapper">
                {% for post in posts %}
                    <div class="post-content swiper-slide ">
						<div class="post-grid">
							<div class="post-item">
								<div class="post-image">
									<a title="{{ post.name }}" href="{{ post.href }}"><img src="{{ post.image }}" alt="{{ post.name }}" /></a>
								</div>
								<div class="post-cation">
									<div class="post-date">
										{{ post.date_added }}{% if post.author %}{{ " | " ~ post.author }}{% endif %}
									</div>
									<div class="post-intro">{{ post.intro_text }}</div> 	
									<h4 class="post-name"><a  href="{{ post.href }}">{{ post.name }}</a></h4>
									<div class="btn-more"><a href="{{ post.href }}">{{ button_show }}</a></div>
								</div>
							</div>
						</div>
                    </div>
                {% endfor %}
            </div>
        </div>
        {% if slide.pagination %}
            <div class="swiper-pagination post-pagination"></div>
        {% endif %}

        {% if slide.navigation %}
            <div class="swiper-pager">
                <div class="swiper-button-next blog-button-next"></div>
                <div class="swiper-button-prev blog-button-prev"></div>
            </div>
        {% endif %}
    </div>
    {% else %}
        <p>{{ text_empty }}</p>
    {% endif %}
</div>
{% if posts %}
    <script >
        $(".posts-container").swiper({
            spaceBetween: 0,
            {% if slide.pagination %}
            pagination: '.post-pagination',
            paginationClickable: true,
            {% endif %}
            {% if slide.navigation %}
            nextButton: '.blog-button-next',
            prevButton: '.blog-button-prev',
            {% endif %}
            speed: {% if slide.speed %} {{ slide.speed }} {% else %} 500 {% endif %},
            slidesPerView: {{ slide.items }},
            slidesPerColumn: {{ slide.rows }},
            autoplay: {% if slide.auto %} 3000 {% else %} false {% endif %},
            loop: false,
			// Responsive breakpoints
			breakpoints: {
				479: {
				  slidesPerView: 1
				},
				767: {
				  slidesPerView: 2
				},
				991: {
				  slidesPerView: 3
				  
				},
				1199: {
				  slidesPerView: 3
				  
				}
			}
        });
    </script>
{% endif %}