{#
# Source code of the Ubuntu-it website
# Copyright (C) 2023 shadMod <m.allegro@shadmod.com>
#
# 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; witout 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 %}
News - {{ news.title }}
{% endblock %}

{% block content %}
<div class="page bg-transparent shadow-none">
	<div class="row my-20 shadow-square">
		<div class="col">
			<div class="w-100 d-inline-block align-i-center">
				<small class="btn-news float-end">
					<strong>
						{{ news.category.capitalize() }}
					</strong>
				</small>
				{% if news.category == 'newsletter' %}
				<img src="{{ url_for('static', filename='images/news/newsletter.png') }}"
					 class="float-start me-20">
				{% endif %}
				<h3>
					<a href="{{ url_for('news.detail', year=news.year, category=news.category.lower(), filename=news.nr_file) }}"
					   class="arrow-hover text-dark underline-10">
						{% if news.category == 'newsletter' %}
						Newsletter Italiana #Ubuntu -
						{% endif %}
						{{ news.title }}
					</a>
				</h3>
				<small>
					Inviato da
					<a href="mailto:{{ news.mail|safe }}">
						{{ news.author|safe }}
					</a>
					il {{ news.birth_time }}
				</small>
			</div>

			{% if news.category == 'newsletter' %}
			<p>
				È disponibile la newsletter N° {{ news.nr_news }} della comunità di ubuntu-it. In questo
				numero:
			</p>
			{% endif %}

			{{ news.html|safe }}

			{% if news.category == 'newsletter' %}
			<p>
				Puoi
				<a href="http://wiki.ubuntu-it.org/NewsletterItaliana/{{ news.title }}">
					leggere direttamente la newsletter
				</a>
				oppure
				<a href="https://wiki.ubuntu-it.org/NewsletterItaliana/Archivio/Pdf{{ news.year }}?action=AttachFile&do=view&target=Newsletter+Ubuntu-it+{{ news.nr_file }}.{{ news.year }}.pdf">
					scaricarla in formato pdf</a>.
				<br/>
				Se hai perso i numeri precedenti, puoi trovarli nell'
				<a href="https://wiki.ubuntu-it.org/NewsletterItaliana/Archivio">
					archivio</a>!
			</p>
			<small>
				Per ricevere la newsletter ogni settimana nella tua casella di posta elettronica, iscriviti alla lista
				<a href="http://liste.ubuntu-it.org/cgi-bin/mailman/listinfo/newsletter-italiana">
					newsletter-italiana</a>.
			</small>
			{% endif %}
		</div>
	</div>
	<div class="row my-20 shadow-square">
		<div class="col">
			<div id="disqus_thread"></div>
		</div>
	</div>
</div>
{% endblock %}

{% block extra_js %}
<script>
	(function() {
			var d = document, s = d.createElement('script');
			s.src = 'https://ubuntuit.disqus.com/embed.js';
			s.setAttribute('data-timestamp', +new Date());
			(d.head || d.body).appendChild(s);
		}
	)();
</script>
<noscript>
	Please enable JavaScript to view comments
</noscript>

<script id="dsq-count-scr" src="//ubuntuittest.disqus.com/count.js" async></script>
{% endblock %}
