diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-12-17 21:52:31 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-12-17 21:52:31 -0800 |
commit | ee0a118a6c7ed0e371fed18dcdace1f18a3cabf6 (patch) | |
tree | 2324eb48573dcd33c9aaf86c691eed113aefd18b /youtube/templates | |
parent | e98a1965d2cfca725d8d30a4807e816036b60c0b (diff) | |
download | yt-local-ee0a118a6c7ed0e371fed18dcdace1f18a3cabf6.tar.lz yt-local-ee0a118a6c7ed0e371fed18dcdace1f18a3cabf6.tar.xz yt-local-ee0a118a6c7ed0e371fed18dcdace1f18a3cabf6.zip |
Extraction: Fix thumbnail and remove badges on related videos
Diffstat (limited to 'youtube/templates')
-rw-r--r-- | youtube/templates/common_elements.html | 6 | ||||
-rw-r--r-- | youtube/templates/watch.html | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/youtube/templates/common_elements.html b/youtube/templates/common_elements.html index 67655b3..1a417ae 100644 --- a/youtube/templates/common_elements.html +++ b/youtube/templates/common_elements.html @@ -14,7 +14,7 @@ {%- endif -%} {% endmacro %} -{% macro item(info, description=false, horizontal=true, include_author=true) %} +{% macro item(info, description=false, horizontal=true, include_author=true, include_badges=true) %} <div class="item-box {{ info['type'] + '-item-box' }} {{'horizontal-item-box' if horizontal else 'vertical-item-box'}} {{'has-description' if description else 'no-description'}}"> <div class="item {{ info['type'] + '-item' }}"> <a class="thumbnail-box" href="{{ info['url'] }}" title="{{ info['title'] }}"> @@ -52,7 +52,9 @@ {% if description %} <span class="description">{{ text_runs(info.get('description', '')) }}</span> {% endif %} - <span class="badges">{{ info['badges']|join(' | ') }}</span> + {% if include_badges %} + <span class="badges">{{ info['badges']|join(' | ') }}</span> + {% endif %} </div> {% if info['type'] == 'video' %} <input class="item-checkbox" type="checkbox" name="video_info_list" value="{{ info['video_info'] }}" form="playlist-edit"> diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index eaa3786..0ffa358 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -165,9 +165,13 @@ .related-videos-inner{ padding-top: 10px; display: grid; - grid-auto-rows: 94px; + grid-auto-rows: 90px; grid-row-gap: 10px; } + .thumbnail-box{ /* overides rule in shared.css */ + height: 90px !important; + width: 120px !important; + } /* Put related vids below videos when window is too small */ /* 1100px instead of 1080 because W3C is full of idiots who include scrollbar width */ @@ -311,7 +315,7 @@ <summary>Related Videos</summary> <nav class="related-videos-inner"> {% for info in related %} - {{ common_elements.item(info) }} + {{ common_elements.item(info, include_badges=false) }} {% endfor %} </nav> </details> |