From b126ce1aa674db4f8dd4e29d25e8ebd6b9c03c39 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 29 Nov 2020 18:56:22 -0800 Subject: Video comments: replace with error message if there is error Such as 429 error, or an exception --- youtube/templates/comments.html | 20 +++++++++++++------- youtube/templates/shared.css | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'youtube/templates') diff --git a/youtube/templates/comments.html b/youtube/templates/comments.html index 8780e37..ad5ab02 100644 --- a/youtube/templates/comments.html +++ b/youtube/templates/comments.html @@ -43,13 +43,19 @@ {{ link_text }} {% endfor %} -
- {% for comment in comments_info['comments'] %} - {{ render_comment(comment, comments_info['include_avatars'], True) }} - {% endfor %} -
- {% if 'more_comments_url' is in comments_info %} - More comments + {% if comments_info['error'] %} +
+
{{ comments_info['error'] }}
+
+ {% else %} +
+ {% for comment in comments_info['comments'] %} + {{ render_comment(comment, comments_info['include_avatars'], True) }} + {% endfor %} +
+ {% if 'more_comments_url' is in comments_info %} + More comments + {% endif %} {% endif %} {% endmacro %} diff --git a/youtube/templates/shared.css b/youtube/templates/shared.css index ee0ceec..2863e7b 100644 --- a/youtube/templates/shared.css +++ b/youtube/templates/shared.css @@ -355,6 +355,7 @@ h1{ margin-bottom: 10px; } .code-box{ + white-space: pre-wrap; padding: 5px; border-style:solid; border-width:1px; -- cgit v1.2.3