diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/index.tpl | 16 | ||||
-rw-r--r-- | views/list_feeds.tpl | 42 |
2 files changed, 56 insertions, 2 deletions
diff --git a/views/index.tpl b/views/index.tpl index fe716f0..dc79b0b 100644 --- a/views/index.tpl +++ b/views/index.tpl @@ -46,7 +46,10 @@ <body> <h1>TagRSS</h1> <nav> - <p><a href="/add_feed" class="no-visited-indication">Add feed</a></p> + <p> + <a href="/add_feed" class="no-visited-indication">Add feed</a> | + <a href="/list_feeds" class="no-visited-indication">List feeds</a> + </p> </nav> <table> <thead> @@ -61,7 +64,7 @@ <tbody> % for i, entry in enumerate(entries): <tr> - <td>{{i + 1}}</td> + <td>{{i + 1 + offset}}</td> <td><a href="{{entry['link']}}">{{entry["title"]}}</a></td> <% date = "" @@ -96,5 +99,14 @@ % end </tbody> </table> + <form> + <label>Page + <input type="number" value="{{page_num}}" min="1" max="{{total_pages}}" name="page_num"> + </label> of {{total_pages}}. + <label>Per page: + <input type="number" value="{{per_page}}" min="1" max="{{max_per_page}}" name="per_page"> + </label> + <input type="submit" value="Go"> + </form> </body> </html> diff --git a/views/list_feeds.tpl b/views/list_feeds.tpl new file mode 100644 index 0000000..22334e3 --- /dev/null +++ b/views/list_feeds.tpl @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>List Feeds | TagRSS</title> + <link href="/static/styles/main.css" rel="stylesheet"> +</head> +<body> + <a href="/" class="no-visited-indication">< home</a> + <h1>Feeds</h1> + <table> + <thead> + <tr> + <th>#</th> + <th>Feed</th> + <th>Source</th> + <th>Manage</th> + </tr> + </thead> + <tbody> + % for i, feed in enumerate(feeds): + <tr> + <td>{{i + 1 + offset}}</td> + <td>{{feed["title"]}}</td> + <td><a href="{{feed['source']}}" class="no-visited-indication">🔗</a></td> + <td><a href="/manage_feed?feed={{feed['id']}}" class="no-visited-indication">⚙</a></td> + </tr> + % end + </tbody> + </table> + <form> + <label>Page + <input type="number" value="{{page_num}}" min="1" max="{{total_pages}}" name="page_num"> + </label> of {{total_pages}}. + <label>Per page: + <input type="number" value="{{per_page}}" min="1" max="{{max_per_page}}" name="per_page"> + </label> + <input type="submit" value="Go"> + </form> +</body> +</html>
\ No newline at end of file |