{#
# Source code of the Ubuntu-it website
# Copyright (C) 2015 Pietro Albini <pietroalbini@ubuntu.com>
# Copyright (C) 2015 Marco Montabone <montabone.mrc@gmail.com>
# Copyright (C) 2019 Alessandro Viprati <vipri.alessandro@gmail.com>
# Copyright (C) 2023 shadMod
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}

{% extends "layout.html" %}

{% block title %}
Derivate
{% endblock %}

{% block content %}
<div class="page">
	<div class="row m-auto">
		<div class="col">
			<h1 class="text-center">
				Derivate
			</h1>
			<p class="intro text-center">
				Le derivate ufficiali di Ubuntu per tutti i gusti e tutti i pc.
			</p>
		</div>
	</div>
</div>
<div class="page bg-transparent shadow-none">

	{% for name, distro in distros.items() %}
	{% with info = distro.info %}
	<div class="row m-auto mx-25 background-wallpaper {{ info.name.lower().replace(' ', '-') }}">
		<div class="col">
			<h1>
				{{ info.name }}
			</h1>
			<p>
				{{ info.long_description }}
			</p>
			<p>
				<a class="btn" href="{{ url_for('pages.derivate_' + info.name.lower().replace(' ', '-')) }}">
					Scopri di più
				</a>
				<a class="btn" href="{{ url_for('download.landing', distro=name) }}">
					Scarica {{ info.name.lower() }}
				</a>
			</p>
		</div>
		<div class="col col-third" align="center">
			{% if info.portrait.type == 'img' %}
			{% if 'src' in info.portrait %}
			<img src="{{ info.portrait.src }}"
				 width="300" height="170" alt="Schermata di {{ info.name }}">
			{% else %}
			<img src="{{ url_for('static', filename='images/derivate/') }}{{ info.name.lower().replace(' ', '-') }}/portrait.png"
				 width="300" height="170" alt="Schermata di {{ info.name }}">
			{% endif %}
			{% elif info.portrait.type == 'video' %}
			<iframe src="{{ info.portrait.src }}" frameborder="0"
					allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
					allowfullscreen></iframe>
			{% endif %}
		</div>
	</div>
	{% endwith %}
	{% endfor %}

	<div class="row m-auto">
		<div>
			<p>
				Esistono altre derivate, versioni non ufficiali o di cui è cessato
				lo sviluppo. Per un elenco completo consulta il
				<a href="https://wiki.ubuntu.com/DerivativeTeam/Derivatives">
					wiki internazionale
				</a>.
			</p>
		</div>
	</div>

</div>
{% endblock %}
