Commit c0ce02cc authored by shadMod's avatar shadMod 💬

reformat templates due to the latest changes in news

parent 84c6eb6d
......@@ -19,27 +19,30 @@
{% extends "layout.html" %}
{% block title %}
News - detail
News - {{ news.title }}
{% endblock %}
{% block content %}
<div class="page bg-transparent shadow-none">
{% with news_split = news.nr_news.split('/') %}
{% with filename = news_split[0], year = news_split[1] %}
<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>
Newsletter
{{ news.category.capitalize() }}
</strong>
</small>
<img src="{{ url_for('static', filename='images/news/logo_new_newsletter.png') }}"
{% 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=year, filename=filename) }}"
<a href="{{ url_for('news.detail', year=news.year, category=news.category.lower(), filename=news.nr_file) }}"
class="arrow-hover text-dark underline-10">
Newsletter Italiana #Ubuntu - {{ news.title }}
{% if news.category == 'newsletter' %}
Newsletter Italiana #Ubuntu -
{% endif %}
{{ news.title }}
</a>
</h3>
<small>
......@@ -47,24 +50,27 @@ News - detail
<a href="mailto:{{ news.mail|safe }}">
{{ news.author|safe }}
</a>
il {{ news.last_edit }}
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{{ year }}?action=AttachFile&do=view&target=Newsletter+Ubuntu-it+{{ filename }}.{{ year }}.pdf">
<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'
......@@ -76,10 +82,9 @@ News - detail
<a href="http://liste.ubuntu-it.org/cgi-bin/mailman/listinfo/newsletter-italiana">
newsletter-italiana</a>.
</small>
{% endif %}
</div>
</div>
{% endwith %}
{% endwith %}
<div class="row my-20 shadow-square">
<div class="col">
<div id="disqus_thread"></div>
......@@ -99,7 +104,7 @@ News - detail
)();
</script>
<noscript>
Please enable JavaScript to view the comments
Please enable JavaScript to view comments
</noscript>
<script id="dsq-count-scr" src="//ubuntuittest.disqus.com/count.js" async></script>
......
......@@ -24,98 +24,11 @@ News
{% block content %}
<div class="page bg-transparent shadow-none">
{% for news in news %}
{% with news_split = news.nr_news.split('/') %}
{% with filename = news_split[0], year = news_split[1] %}
<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>
Newsletter
</strong>
</small>
<img src="{{ url_for('static', filename='images/news/logo_new_newsletter.png') }}"
class="float-start me-20">
<h3>
<a href="{{ url_for('news.detail', year=year, filename=filename) }}"
class="arrow-hover text-dark underline-10">
Newsletter Italiana #Ubuntu - {{ news.title }}
</a>
</h3>
<small>
Inviato da
<a href="mailto:{{ news.mail|safe }}">
{{ news.author|safe }}
</a>
il {{ news.last_edit }}
</small>
</div>
<div class="row bg-transparent pt-3">
<p>
È disponibile la newsletter N° {{ news.nr_news }} della comunità di ubuntu-it. In questo
numero:
</p>
{% block news_list %}
{% endblock %}
{{ news.html|safe }}
<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{{ year }}?action=AttachFile&do=view&target=Newsletter+Ubuntu-it+{{ filename }}.{{ 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>
<div class="mb-3">
<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>
</div>
<div class="w-100 text-end">
<a href="{{ url_for('news.detail', year=year, filename=filename) }}">
<small class="me-10">
Leggi tutto
</small>
</a>
</div>
</div>
</div>
{% endwith %}
{% endwith %}
{% else %}
<div class="row my-20 shadow-square">
<div class="col">
<h3>
Nessun newsletter disponibile
</h3>
<p>
Vai al nostro
<a href="https://wiki.ubuntu-it.org/NewsletterItaliana/Archivio">
archivio
</a>!
O torna alla
<a href="{{ url_for('news.index') }}">
lista delle news
</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>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
......@@ -107,15 +107,13 @@ Home page
Ultime novità
</h2>
<ul class="item-list">
{% for year, list_files in news.items() %}
{% for filename in list_files %}
{% for news in news_list %}
<li>
<a href="{{ url_for('news.detail', year=year, filename=filename) }}">
Newsletter Italiana #Ubuntu - 2023.{{ filename.replace(".md", "") }}
<a href="{{ url_for('news.detail', year=news.year, category=news.category.lower(), filename=news.nr_file) }}">
Newsletter Italiana #Ubuntu - 2023.{{ news.nr_file }}
</a>
</li>
{% endfor %}
{% endfor %}
</ul>
</div>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment