diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2023-06-22 02:17:44 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2023-06-22 02:17:44 +0000 |
commit | 69a356d177ad98941502b621754d011383e160d9 (patch) | |
tree | bf03f2f1216718b608d788ee204f0a32787c7db8 /views | |
download | tagrss-69a356d177ad98941502b621754d011383e160d9.tar tagrss-69a356d177ad98941502b621754d011383e160d9.tar.gz tagrss-69a356d177ad98941502b621754d011383e160d9.zip |
Initial commit
Diffstat (limited to 'views')
-rw-r--r-- | views/add_feed.tpl | 24 | ||||
-rw-r--r-- | views/index.tpl | 33 |
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="/">< 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> |