aboutsummaryrefslogtreecommitdiff
path: root/source/templates/favorites.html
blob: 5eba8a3ca754c1205bac1a510582c9e2975477a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## favorites.html
<%inherit file="base.html"/>
<%
import utils
%>
<div class="left inner">
    <h1>Your favorites articles</h1>
    %for feed in feeds:
        <%
            new_feed_section = True
        %>
        %for article in articles[feed["feed_id"]]:
            <%
                if new_feed_section:
                    new_feed_section = False
                    title = """<h2><a name="%s"><a href="%s" rel="noreferrer"target="_blank">%s</a></a><a href="%s" rel="noreferrer" target="_blank"><img src="%s" width="28" height="28" /></a></h2>\n""" % \
                            (feed["feed_id"], feed["site_link"], feed["feed_title"], feed["feed_link"], feed["feed_image"])
                else:
                    title = ""
                article_content = utils.clear_string(article["article_content"])
                if article_content:
                    description = " ".join(article_content[:500].split(' ')[:-1])
                else:
                    description = "No description."
            %>
            ${title}

            ${article["article_date"].strftime('%Y-%m-%d %H:%M')} - <a class="tooltip" href="/article/${feed['feed_id']}:${article['article_id']}" rel="noreferrer" target="_blank">${article["article_title"][:150]}<span class="classic">${description}</span></a><br />
        %endfor
    %endfor
bgstack15