Forgot to add applist news template

This commit is contained in:
Alexandre Aubin 2021-10-09 13:06:37 +02:00
parent a1b172ee09
commit 966d10e088
2 changed files with 44 additions and 1 deletions

View file

@ -152,7 +152,7 @@ def appsobservatory_history():
@main.route('/appsobservatory/news') @main.route('/appsobservatory/news')
def appsobservatory_news(): def appsobservatory_news():
news_per_date = json.loads(open("./app/scripts/appListsHistory/news.json").read()) news_per_date = json.loads(open("./app/scripts/appListsHistory/news.json").read())
return render_template('applist_news.html', news_per_date=reversed(news_per_date.items())) return render_template('applist_news.html', news_per_date=list(reversed(list(news_per_date.items()))))
@main.route('/appsobservatory/unlisted') @main.route('/appsobservatory/unlisted')

View file

@ -0,0 +1,43 @@
{% extends "base.html" %}
{% block content %}
<div class="row">
<div class="col-10 offset-1">
{% for date, news in news_per_date %}
<h2>{{ date }}</h2>
<ul>
{% for app, url in news["added"] %}
<li>
<span class="badge bg-primary" style="color: white;"><i class="oi oi-plus pr-1" aria-hidden="true"></i>Added</span>
<a href="{{url}}">{{app}}</a>
</li>
{% endfor %}
{% for app, url in news["repaired"] %}
<li>
<span class="badge bg-success" style="color: white;"><i class="oi oi-circle-check pr-1" aria-hidden="true"></i>Repaired</span>
<a href="{{url}}">{{app}}</a>
</li>
{% endfor %}
{% for app, url in news["broke"] %}
<li>
<span class="badge bg-warning" style="color: white;"><i class="oi oi-warning pr-1" aria-hidden="true"></i>Broke</span>
<a href="{{url}}">{{app}}</a>
</li>
{% endfor %}
{% for app, url in news["removed"] %}
<li>
<span class="badge bg-danger" style="color: white;"><i class="oi oi-circle-x pr-1" aria-hidden="true"></i>Removed</span>
<a href="{{url}}">{{app}}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</div>
</div>
{% endblock %}