{% apply spaceless %}
	{% set bgColor = 'bg-light-blue' %}
	{% if categoryName == 'przedszkola' %}
		{% set bgColor = 'bg-yellow' %}
	{% endif %}
{% endapply %}


{% if sectionsData['news'] %}
	<section id="baza-wiedzy" class="{{ bgColor }}" data-bg="{{ bgColor }}">
		<div class="container">
			{% if home is defined and home %}
				<h2 class="text-center">BAZA WIEDZY</h2>
				<div class="subheader text-center">
					<p>Przeczytaj, co nowego w Akcji Tron.</p>
				</div>
				<div class="d-flex justify-content-center"><div class="btn transparent mb-5"><a href="/{{ categoryName }}/baza-wiedzy">Pokaż wszystkie</a></div></div>
			{% else %}
				{{ include('partials/_back.twig') }}
				<h1 class="text-center">BAZA WIEDZY</h1>
			{% endif %}
			<div class="row {% if existH1 %}justify-content-center{% endif %} ">
				{% for item in sectionsData['news'] %}
					<div class="col-12 col-md-6 col-xl-4 mb-5 mb-xl-3">
						<div class="d-flex h-100 justify-content-between flex-column">
							<a href="{{ path('news', {slug: item.slug}) }}">
								<div class="img-box">
									<div class="img" style="min-height: 100px;">
									{% if item.image is not empty %}
										{{ sonata_thumbnail(item.image, 'news') }}
									{% else %}
										<img alt="{{ item.title }}" src="{{ asset('dist/img/logo.svg') }}" class="w-100" style="max-width: 200px" />
									{% endif %}
									</div>
								</div>
								
								<h5>{{ item.title }}</h5>
								{{ item.teaser|raw }}
							</a>
						</div>
					</div>
				{% endfor %}
			</div>
			{% if home is defined and home %}

			{% endif %}
		</div>
	</section>

	<div class="decor decor7 decor7c"></div>
{% endif %}