From ed597cc711919d75a48940b7ee21d76e9b261e13 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Mon, 3 Jul 2023 05:20:15 +0530 Subject: Separate server and core, add SQLite storage --- views/index.tpl | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'views') 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 @@ Title Date Tags + Feed - % for i, item in enumerate(reversed(items)): + % for i, entry in enumerate(entries): {{i + 1}} - {{item["title"]}} + {{entry["title"]}} <% + 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 %> {{", updated ".join(dates)}} - {{", ".join(item["feed"]["tags"])}} + % tags = tagrss_backend.get_feed_tags(entry["feed_id"]) + % for i, tag in enumerate(tags): + % if i > 0: + {{", "}} + % end + {{tag}} + % end + + + % end -- cgit v1.2.3-57-g22cb