{% extends "index.html" %}

{% block content %}
	<section class="meta">
		<div>
			<h2>{{ page.title }}</h2>
			<p>{{ page.description | safe }}</p>
		</div>
		{% if page.extra.mainimage %}
			<img src="{{ resize_image(path=page.extra.mainimage, width=500, height=500, op="fill") }}" alt="{{ page.extra.mainimage }}">
		{% endif %}
	</section>
	{{ page.content | safe }}

	{% if page.extra.softwarelist %}
		{% set section = get_section(path="software/_index.md") %}
		{% if section.pages %}
			<h3>Doporučené nástroje</h3>
			<section class="software">
			{% for program in section.pages %}
				{% if program.taxonomies.categories and program.taxonomies.categories is containing(page.slug) %}
					<div class="program">
						{% if program.extra.linkto and program.extra.directlink %}
							<a href="{{ program.extra.linkto }}">
						{% else %}
							<a href="{{ program.permalink }}">
						{% endif %}
							<h4>{{ program.title }}</h4>
						{% if program.extra.logo %}
							<img src="/software/{{ program.extra.logo }}" alt="{{ program.title }}">
						{% endif %}
							</a>
						<p>{{ program.description | safe }}</p>
						{% if program.extra.positive_short and program.extra.negative_short %}
							<div class="stats">
								<ul class="positive">
									{% for item in program.extra.positive_short %}
										<li>{{ item }}</li>
									{% endfor %}
								</ul>
								<ul class="negative">
									{% for item in program.extra.negative_short %}
										<li>{{ item }}</li>
									{% endfor %}
								</ul>
							</div>
						{% endif %}
					</div>
				{% endif %}
			{% endfor %}
			</section>
		{% endif %}
	{% endif %}
{% endblock %}
