diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2023-07-02 23:50:15 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2023-07-02 23:50:15 +0000 |
commit | ed597cc711919d75a48940b7ee21d76e9b261e13 (patch) | |
tree | ac77e938a687731d45d797f55af46d6d76789de9 /views | |
parent | 589df8813ea7732501fb551296d8fd45c4186217 (diff) | |
download | tagrss-ed597cc711919d75a48940b7ee21d76e9b261e13.tar tagrss-ed597cc711919d75a48940b7ee21d76e9b261e13.tar.gz tagrss-ed597cc711919d75a48940b7ee21d76e9b261e13.zip |
Separate server and core, add SQLite storage
Diffstat (limited to 'views')
-rw-r--r-- | views/index.tpl | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/views/index.tpl b/views/index.tpl index d521810..6ff4ab4 100644 --- a/views/index.tpl +++ b/views/index.tpl @@ -18,27 +18,41 @@ <th>Title</th> <th>Date</th> <th>Tags</th> + <th>Feed</th> </tr> </thead> <tbody> - % for i, item in enumerate(reversed(items)): + % for i, entry in enumerate(entries): <tr> <td>{{i + 1}}</td> - <td><a href="{{item["link"]}}">{{item["title"]}}</a></td> + <td><a href="{{entry["link"]}}">{{entry["title"]}}</a></td> <% + import time dates = [] - if item.get("date_published", None): - dates.append(item["date_published"]) + if entry.get("epoch_published", None): + dates.append(time.strftime("%x %X", time.localtime(entry["epoch_published"]))) end - if item.get("date_updated", None): - dates.append(item["date_updated"]) + if entry.get("epoch_updated", None): + date_updated = time.strftime("%x %X", time.localtime(entry["epoch_updated"])) + if not date_updated in dates: + dates.append(date_updated) + end end %> <td> {{", updated ".join(dates)}} </td> <td> - {{", ".join(item["feed"]["tags"])}} + % tags = tagrss_backend.get_feed_tags(entry["feed_id"]) + % for i, tag in enumerate(tags): + % if i > 0: + {{", "}} + % end + <span class="tag">{{tag}}</span> + % end + </td> + <td> + <a href="/manage_feeds?feed={{entry["feed_id"]}}">⚙</a> </td> </tr> % end |