aboutsummaryrefslogtreecommitdiff
path: root/source/templates/search.html
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 10:03:34 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 10:03:34 +0200
commitdec57654f8b33e14c92c8f5db504e5a5ec461545 (patch)
treeb6783f6db36be5ec7b4c6bd0253f6379181ca35d /source/templates/search.html
parentRemoved epub module. (diff)
downloadnewspipe-dec57654f8b33e14c92c8f5db504e5a5ec461545.tar.gz
newspipe-dec57654f8b33e14c92c8f5db504e5a5ec461545.tar.bz2
newspipe-dec57654f8b33e14c92c8f5db504e5a5ec461545.zip
Removed static, templates and var files.
Diffstat (limited to 'source/templates/search.html')
-rw-r--r--source/templates/search.html57
1 files changed, 0 insertions, 57 deletions
diff --git a/source/templates/search.html b/source/templates/search.html
deleted file mode 100644
index 435ef443..00000000
--- a/source/templates/search.html
+++ /dev/null
@@ -1,57 +0,0 @@
-## search.html
-<%inherit file="base.html"/>
-<%
-import utils
-%>
-<div class="left inner">
-%if len(search_result) != 0:
- <h1>Articles containing the string <i>${query}</i> (${sum([len(articles) for articles in search_result.values()])} results)</h1>
-%else:
- <h1>String <i>${query}</i> not found.</h1>
-%endif
-<br />
-<form method=get action="/index_base">
- <input type="submit" value="Reindex database" />
-</form>
-
-<%
- html = ""
- feed_id = None
-%>
-
-%for feed_id in search_result.keys():
- <%
- new_feed_section = True
- feed = mongo.get_feed(feed_id)
- for article in search_result[feed["feed_id"]]:
- if new_feed_section is True:
- new_feed_section = False
- html += """<h2><a href="/articles/%s" rel="noreferrer" target="_blank">%s</a><a href="%s" rel="noreferrer" target="_blank"><img src="%s" width="28" height="28" /></a></h2>\n""" % \
- (feed["feed_id"], feed["feed_title"], feed["feed_link"], feed["feed_image"])
-
- if article["article_readed"] == False:
- # not readed articles are in bold
- not_read_begin, not_read_end = "<b>", "</b>"
- else:
- not_read_begin, not_read_end = "", ""
-
- # display a heart for faved articles
- if article["article_like"] == True:
- like = """ <img src="/img/heart.png" title="I like this article!" />"""
- else:
- like = ""
-
- # descrition for the CSS ToolTips
- article_content = utils.clear_string(article["article_content"])
- description = " ".join(article_content[:500].split(' ')[:-1])
-
- # a description line per article (date, title of the article and
- # CSS description tooltips on mouse over)
- html += article["article_date"].strftime('%Y-%m-%d %H:%M') + " - " + \
- """<a class="tooltip" href="/article/%s:%s" rel="noreferrer" target="_blank">%s%s%s<span class="classic">%s</span></a>""" % \
- (feed["feed_id"], article["article_id"], not_read_begin, \
- article["article_title"][:150], not_read_end, description) + like + "<br />\n"
- %>
-%endfor
-
-${html} \ No newline at end of file
bgstack15