aboutsummaryrefslogtreecommitdiff
path: root/views/index.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'views/index.tpl')
-rw-r--r--views/index.tpl90
1 files changed, 63 insertions, 27 deletions
diff --git a/views/index.tpl b/views/index.tpl
index 6ca1518..fe716f0 100644
--- a/views/index.tpl
+++ b/views/index.tpl
@@ -1,60 +1,96 @@
-<%
- import time
-%>
+% import time
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>View Feeds | TagRSS</title>
+ <title>View Feed Entries | TagRSS</title>
<link href="/static/styles/main.css" rel="stylesheet">
+ <style>
+ table {
+ table-layout: fixed;
+ }
+ th#th-num {
+ width: 2.5%;
+ }
+ th#th-title {
+ width: 45%;
+ }
+ th#th-datetime {
+ width: 12.5%;
+ }
+ th#th-tag {
+ width: 20%;
+ }
+ td.td-tag > div {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+ white-space: nowrap;
+ }
+ th#th-feed {
+ width: 20%;
+ }
+ td.td-feed > div {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ overflow: auto;
+ white-space: nowrap;
+ }
+ </style>
</head>
<body>
<h1>TagRSS</h1>
<nav>
- <p><a href="/add_feed">Add feed</a></p>
+ <p><a href="/add_feed" class="no-visited-indication">Add feed</a></p>
</nav>
<table>
<thead>
<tr>
- <th>#</th>
- <th>Title</th>
- <th>Date</th>
- <th>Tags</th>
- <th>Feed</th>
+ <th id="th-num">#</th>
+ <th id="th-title">Title</th>
+ <th id="th-datetime">Date & Time ({{time.tzname[time.localtime().tm_isdst]}})</th>
+ <th id="th-tags">Tags</th>
+ <th id="th-feed">Feed</th>
</tr>
</thead>
<tbody>
% for i, entry in enumerate(entries):
<tr>
<td>{{i + 1}}</td>
- <td><a href="{{entry["link"]}}">{{entry["title"]}}</a></td>
+ <td><a href="{{entry['link']}}">{{entry["title"]}}</a></td>
<%
- dates = []
+ date = ""
if entry.get("epoch_published", None):
- dates.append(time.strftime("%x %X", time.localtime(entry["epoch_published"])))
+ date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(entry["epoch_published"]))
end
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
+ date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(entry["epoch_updated"]))
end
%>
<td>
- {{", updated ".join(dates)}}
+ <time datetime="{{date}}">{{date}}</time>
</td>
- <td>
- % tags = core.get_feed_tags(entry["feed_id"])
- % for i, tag in enumerate(tags):
- % if i > 0:
- {{", "}}
+ <td class="td-tag">
+ <div>
+ % tags = core.get_feed_tags(entry["feed_id"])
+ % for i, tag in enumerate(tags):
+ % if i > 0:
+ {{", "}}
+ % end
+ <span class="tag">{{tag}}</span>
% end
- <span class="tag">{{tag}}</span>
- % end
+ </div>
</td>
- <td>
- <a href="/manage_feed?feed={{entry["feed_id"]}}">⚙</a>
+ <td class="td-feed">
+ <div>
+ <a href="/manage_feed?feed={{entry['feed_id']}}" class="no-visited-indication">⚙</a>
+ {{core.get_feed_title(entry["feed_id"])}}
+ </div>
</td>
</tr>
% end