aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2018-10-28 13:23:42 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2018-10-28 13:23:42 +0100
commitb46dccd8d8d85fb2a1d304ff239cdfcbcdc6bcb3 (patch)
treefcd3f507fdb4f31371c7a852b6028bb17d6b267a /src/web
parentRemoved useless tag cloud. (diff)
downloadnewspipe-b46dccd8d8d85fb2a1d304ff239cdfcbcdc6bcb3.tar.gz
newspipe-b46dccd8d8d85fb2a1d304ff239cdfcbcdc6bcb3.tar.bz2
newspipe-b46dccd8d8d85fb2a1d304ff239cdfcbcdc6bcb3.zip
Removed tag cloud from the public feed page.
Diffstat (limited to 'src/web')
-rw-r--r--src/web/templates/feed.html10
-rw-r--r--src/web/templates/feed_list_per_categories.html6
-rw-r--r--src/web/views/feed.py7
3 files changed, 7 insertions, 16 deletions
diff --git a/src/web/templates/feed.html b/src/web/templates/feed.html
index 6b2e5e40..d914b82b 100644
--- a/src/web/templates/feed.html
+++ b/src/web/templates/feed.html
@@ -45,7 +45,7 @@
</div>
<div class="row">
- <div class="col-md-8">
+ <div class="col-md-12">
<div class="table-responsive">
<table id="table-articles" class="table table-striped">
<thead>
@@ -55,7 +55,7 @@
</tr>
</thead>
<tbody>
- {% for article in articles %}
+ {% for article in feed.articles %}
<tr>
<td><a href="{{ url_for("article.article_pub", article_id=article.id) }}">{{ article.title }}</a></td>
<td>{{ article.date | datetime }}</td>
@@ -65,12 +65,6 @@
</table>
</div>
</div>
- <div class="col-md-4">
- <p><h3>{{ _('Most recurrent words') }}</h3></p>
- {% if articles | count != 0 %}
- <div class="well">{{ tag_cloud | safe }}</div>
- {% endif %}
- </div>
</div>
</div><!-- /.container -->
diff --git a/src/web/templates/feed_list_per_categories.html b/src/web/templates/feed_list_per_categories.html
index 396139a4..34d10ddd 100644
--- a/src/web/templates/feed_list_per_categories.html
+++ b/src/web/templates/feed_list_per_categories.html
@@ -1,12 +1,12 @@
<div class="row">
- <div class="col-md-6">
+ <div class="col-md-8">
<form class="form-inline">
<div class="form-group">
<label>Filter per category</label>
- <select class="form-control" id="category-select" name="category_id">
+ <select class="form-control" id="category-select" name="category_id">
<option value="0">All</option>
{% for category in user.categories %}
- <option value="{{category.id}}" {% if category.id==selected_category_id %}selected{% endif %}>{{ category.name }}</option>
+ <option value="{{category.id}}" {% if category.id==selected_category_id %}selected{% endif %}>{{ category.name }}</option>
{% endfor %}
</select>
<button type="submit" class="btn btn-primary mb-2">OK</button>
diff --git a/src/web/views/feed.py b/src/web/views/feed.py
index 297b5521..873e1eb6 100644
--- a/src/web/views/feed.py
+++ b/src/web/views/feed.py
@@ -43,8 +43,6 @@ def feed_view(feed_id=None, user_id=None):
articles = ArticleController(user_id) \
.read(feed_id=feed_id) \
.order_by(desc("date")).all()
- top_words = misc_utils.top_words(articles, n=50, size=int(word_size))
- tag_cloud = misc_utils.tag_cloud(top_words)
today = datetime.now()
try:
@@ -61,10 +59,9 @@ def feed_view(feed_id=None, user_id=None):
return render_template('feed.html',
head_titles=[utils.clear_string(feed.title)],
- feed=feed, articles=articles,
- tag_cloud=tag_cloud,
+ feed=feed, category=category,
first_post_date=first_article,
- end_post_date=last_article, category=category,
+ end_post_date=last_article,
average=average, delta=delta, elapsed=elapsed)
bgstack15