diff options
author | James Taylor <user234683@users.noreply.github.com> | 2020-04-04 22:52:09 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2020-04-04 22:52:09 -0700 |
commit | 5554d5afff3e8bad1d59616c3e9c6f6f7bcd7b1b (patch) | |
tree | 38974f251b197aa5c580c8a38bc0a19232480272 /youtube/templates/common_elements.html | |
parent | b5d42e2f3c99f146f3fe4efd0a9062b255ef6d9c (diff) | |
download | yt-local-5554d5afff3e8bad1d59616c3e9c6f6f7bcd7b1b.tar.lz yt-local-5554d5afff3e8bad1d59616c3e9c6f6f7bcd7b1b.tar.xz yt-local-5554d5afff3e8bad1d59616c3e9c6f6f7bcd7b1b.zip |
Add playlist sidebar for videos in playlist, including autoplay
Diffstat (limited to 'youtube/templates/common_elements.html')
-rw-r--r-- | youtube/templates/common_elements.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube/templates/common_elements.html b/youtube/templates/common_elements.html index 58580a3..0587ce3 100644 --- a/youtube/templates/common_elements.html +++ b/youtube/templates/common_elements.html @@ -14,14 +14,18 @@ {%- endif -%} {% endmacro %} -{% macro item(info, description=false, horizontal=true, include_author=true, include_badges=true) %} +{% macro item(info, description=false, horizontal=true, include_author=true, include_badges=true, lazy_load=false) %} <div class="item-box {{ info['type'] + '-item-box' }} {{'horizontal-item-box' if horizontal else 'vertical-item-box'}} {{'has-description' if description else 'no-description'}}"> {% if info['error'] %} {{ info['error'] }} {% else %} <div class="item {{ info['type'] + '-item' }}"> <a class="thumbnail-box" href="{{ info['url'] }}" title="{{ info['title'] }}"> - <img class="thumbnail-img" src="{{ info['thumbnail'] }}"> + {% if lazy_load %} + <img class="thumbnail-img lazy" data-src="{{ info['thumbnail'] }}"> + {% else %} + <img class="thumbnail-img" src="{{ info['thumbnail'] }}"> + {% endif %} {% if info['type'] != 'channel' %} <div class="thumbnail-info"> <span>{{ (info['video_count']|commatize + ' videos') if info['type'] == 'playlist' else info['duration'] }}</span> |