aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/add_feed.tpl24
-rw-r--r--views/index.tpl33
2 files changed, 57 insertions, 0 deletions
diff --git a/views/add_feed.tpl b/views/add_feed.tpl
new file mode 100644
index 0000000..bac78b0
--- /dev/null
+++ b/views/add_feed.tpl
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Add Feed</title>
+</head>
+<body>
+ <a href="/">&lt; home</a>
+ % if not get("already_present", False):
+ % if get("after_add", False):
+ <p><em>Added feed {{feed_source}}</em></p>
+ % end
+ % else:
+ <p><em>Feed {{feed_source}} was already added; no changes made.</em></p>
+ % end
+ <h1>Add a feed</h1>
+ <form method="post">
+ <input type="url" placeholder="Feed source" name="feed_source">
+ <br>
+ <input type="submit" value="Add">
+ </form>
+</body>
+</html>
diff --git a/views/index.tpl b/views/index.tpl
new file mode 100644
index 0000000..b08ce0f
--- /dev/null
+++ b/views/index.tpl
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>View Feeds</title>
+</head>
+<body>
+ <table>
+ <tr>
+ <th>Title</th>
+ <th>Date</th>
+ </tr>
+ % for i, item in enumerate(reversed(items)):
+ <tr>
+ <td><a href="{{item["link"]}}">{{item["title"]}}</a></td>
+ <%
+ dates = []
+ if item.get("date_published", None):
+ dates.append(item["date_published"])
+ end
+ if item.get("date_updated", None):
+ dates.append(item["date_updated"])
+ end
+ %>
+ <td>
+ {{", updated ".join(dates)}}
+ </td>
+ </tr>
+ % end
+ </table>
+</body>
+</html>