{% set articles = [] %}

{% if block.byCategory|default %}
	{% set articles = craft.entries({
		section: "news",
		relatedTo: block.byCategory,
	}).all() %}
{% endif %}

{% if block.byArticle|default %}
	{% set articles = articles|merge(block.byArticle) %}
{% endif %}

{% if articles|length %}

	<div class="relative flex flex-wrap md:-mx-10 lg:-mx-6 xl:-mx-10">

	{% for article in articles %}

		<div class="relative flex flex-col w-full py-10 md:p-10 lg:p-6 xl:p-10 md:w-1/2">
			{% include "cards/article" with {
				item: article,
				loop: loop,
			} %}
		</div>

	{% endfor %}

	</div>

{% endif %}
