diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-12-19 15:46:16 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-12-19 15:46:16 -0800 |
commit | 02848a1a3213bb4ad872865768a7b97f663a24ed (patch) | |
tree | 4d96e8139d6fc312b388550a5a8a3bc2efebb6a6 /youtube/templates/common_elements.html | |
parent | 004e14a53800a5235d850517db8a3b421e804b30 (diff) | |
download | yt-local-02848a1a3213bb4ad872865768a7b97f663a24ed.tar.lz yt-local-02848a1a3213bb4ad872865768a7b97f663a24ed.tar.xz yt-local-02848a1a3213bb4ad872865768a7b97f663a24ed.zip |
Extraction: Adjust related videos box to fit new time_published information well
time_published will be put to the right of the view_count in related videos
Author will now always be above the other stats, since it doesn't make a difference in the big search result boxes since the description snippet is always very short
(However, it's important the author isn't inline with the other stats in related video boxes since those are so narrow and the author name can be very long)
Diffstat (limited to 'youtube/templates/common_elements.html')
-rw-r--r-- | youtube/templates/common_elements.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/youtube/templates/common_elements.html b/youtube/templates/common_elements.html index 4c776b6..7914c08 100644 --- a/youtube/templates/common_elements.html +++ b/youtube/templates/common_elements.html @@ -31,18 +31,18 @@ <div class="title"><a class="title" href="{{ info['url'] }}" title="{{ info['title'] }}">{{ info['title'] }}</a></div> - <ul class="stats {{'vertical-stats' if horizontal and not description and include_author else 'horizontal-stats'}}"> + {% if include_author %} + {% if info.get('author_url') %} + <address title="{{ info['author'] }}">By <a href="{{ info['author_url'] }}">{{ info['author'] }}</a></address> + {% else %} + <address title="{{ info['author'] }}"><b>{{ info['author'] }}</b></address> + {% endif %} + {% endif %} + <ul class="stats {{'horizontal-stats' if horizontal else 'vertical-stats'}}"> {% if info['type'] == 'channel' %} <li><span>{{ info['approx_subscriber_count'] }} subscribers</span></li> <li><span>{{ info['video_count'] }} videos</span></li> {% else %} - {% if include_author %} - {% if info.get('author_url') %} - <li><address title="{{ info['author'] }}">By <a href="{{ info['author_url'] }}">{{ info['author'] }}</a></address></li> - {% else %} - <li><address title="{{ info['author'] }}"><b>{{ info['author'] }}</b></address></li> - {% endif %} - {% endif %} {% if info.get('approx_view_count') %} <li><span class="views">{{ info['approx_view_count'] }} views</span></li> {% endif %} |