Commit c0ce02cc authored by shadMod's avatar shadMod 💬

reformat templates due to the latest changes in news

parent 84c6eb6d
...@@ -19,27 +19,30 @@ ...@@ -19,27 +19,30 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block title %} {% block title %}
News - detail News - {{ news.title }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="page bg-transparent shadow-none"> <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="row my-20 shadow-square">
<div class="col"> <div class="col">
<div class="w-100 d-inline-block align-i-center"> <div class="w-100 d-inline-block align-i-center">
<small class="btn-news float-end"> <small class="btn-news float-end">
<strong> <strong>
Newsletter {{ news.category.capitalize() }}
</strong> </strong>
</small> </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"> class="float-start me-20">
{% endif %}
<h3> <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"> class="arrow-hover text-dark underline-10">
Newsletter Italiana #Ubuntu - {{ news.title }} {% if news.category == 'newsletter' %}
Newsletter Italiana #Ubuntu -
{% endif %}
{{ news.title }}
</a> </a>
</h3> </h3>
<small> <small>
...@@ -47,24 +50,27 @@ News - detail ...@@ -47,24 +50,27 @@ News - detail
<a href="mailto:{{ news.mail|safe }}"> <a href="mailto:{{ news.mail|safe }}">
{{ news.author|safe }} {{ news.author|safe }}
</a> </a>
il {{ news.last_edit }} il {{ news.birth_time }}
</small> </small>
</div> </div>
{% if news.category == 'newsletter' %}
<p> <p>
È disponibile la newsletter N° {{ news.nr_news }} della comunità di ubuntu-it. In questo È disponibile la newsletter N° {{ news.nr_news }} della comunità di ubuntu-it. In questo
numero: numero:
</p> </p>
{% endif %}
{{ news.html|safe }} {{ news.html|safe }}
{% if news.category == 'newsletter' %}
<p> <p>
Puoi Puoi
<a href="http://wiki.ubuntu-it.org/NewsletterItaliana/{{ news.title }}"> <a href="http://wiki.ubuntu-it.org/NewsletterItaliana/{{ news.title }}">
leggere direttamente la newsletter leggere direttamente la newsletter
</a> </a>
oppure 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>. scaricarla in formato pdf</a>.
<br/> <br/>
Se hai perso i numeri precedenti, puoi trovarli nell' Se hai perso i numeri precedenti, puoi trovarli nell'
...@@ -76,10 +82,9 @@ News - detail ...@@ -76,10 +82,9 @@ News - detail
<a href="http://liste.ubuntu-it.org/cgi-bin/mailman/listinfo/newsletter-italiana"> <a href="http://liste.ubuntu-it.org/cgi-bin/mailman/listinfo/newsletter-italiana">
newsletter-italiana</a>. newsletter-italiana</a>.
</small> </small>
{% endif %}
</div> </div>
</div> </div>
{% endwith %}
{% endwith %}
<div class="row my-20 shadow-square"> <div class="row my-20 shadow-square">
<div class="col"> <div class="col">
<div id="disqus_thread"></div> <div id="disqus_thread"></div>
...@@ -99,7 +104,7 @@ News - detail ...@@ -99,7 +104,7 @@ News - detail
)(); )();
</script> </script>
<noscript> <noscript>
Please enable JavaScript to view the comments Please enable JavaScript to view comments
</noscript> </noscript>
<script id="dsq-count-scr" src="//ubuntuittest.disqus.com/count.js" async></script> <script id="dsq-count-scr" src="//ubuntuittest.disqus.com/count.js" async></script>
......
...@@ -24,98 +24,11 @@ News ...@@ -24,98 +24,11 @@ News
{% block content %} {% block content %}
<div class="page bg-transparent shadow-none"> <div class="page bg-transparent shadow-none">
{% for news in news %} <div class="row bg-transparent pt-3">
{% 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>
<p>
È disponibile la newsletter N° {{ news.nr_news }} della comunità di ubuntu-it. In questo
numero:
</p>
{{ news.html|safe }} {% block news_list %}
{% endblock %}
<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> </div>
{% endfor %}
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -107,15 +107,13 @@ Home page ...@@ -107,15 +107,13 @@ Home page
Ultime novità Ultime novità
</h2> </h2>
<ul class="item-list"> <ul class="item-list">
{% for year, list_files in news.items() %} {% for news in news_list %}
{% for filename in list_files %}
<li> <li>
<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) }}">
Newsletter Italiana #Ubuntu - 2023.{{ filename.replace(".md", "") }} Newsletter Italiana #Ubuntu - 2023.{{ news.nr_file }}
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
{% endfor %}
</ul> </ul>
</div> </div>
</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