Layout: Add theater mode

This commit is contained in:
James Taylor 2019-08-24 12:43:58 -07:00
parent bc8db064d2
commit fa2fa7fe16
3 changed files with 36 additions and 6 deletions

View File

@ -66,6 +66,12 @@ For security reasons, enabling this is not recommended.''',
1 to sort by newest''', 1 to sort by newest''',
}), }),
('theater_mode', {
'type': bool,
'default': True,
'comment': '',
}),
('gather_googlevideo_domains', { ('gather_googlevideo_domains', {
'type': bool, 'type': bool,
'default': False, 'default': False,

View File

@ -3,17 +3,39 @@
{% import "common_elements.html" as common_elements %} {% import "common_elements.html" as common_elements %}
{% import "comments.html" as comments %} {% import "comments.html" as comments %}
{% block style %} {% block style %}
{% if theater_mode %}
video{
grid-column: 1 / span 5;
width: 100%;
max-height: 360px;
}
#related{
margin-top: 10px;
grid-row: 2 /span 3;
width: 400px;
}
.video-info{
margin-top: 10px;
width: 640px;
}
{% else %}
video{
height: 360px;
width: 640px;
grid-column: 2;
}
#related{
grid-row: 1 /span 4;
}
{% endif %}
main{ main{
display:grid; display:grid;
grid-template-columns: 1fr 640px 40px 400px 1fr; grid-template-columns: 1fr 640px 40px 400px 1fr;
grid-template-rows: auto auto auto auto; grid-template-rows: auto auto auto auto;
align-content: start; align-content: start;
} }
video{
height: 360px;
width: 640px;
grid-column: 2;
}
.video-info{ .video-info{
grid-column: 2; grid-column: 2;
grid-row: 2; grid-row: 2;
@ -99,7 +121,6 @@
} }
#related{ #related{
grid-column: 4; grid-column: 4;
grid-row: 1 /span 4;
display: grid; display: grid;
grid-auto-rows: 94px; grid-auto-rows: 94px;
grid-row-gap: 10px; grid-row-gap: 10px;
@ -116,6 +137,7 @@
margin-top: 10px; margin-top: 10px;
grid-column: 2; grid-column: 2;
grid-row: 3; grid-row: 3;
width: initial;
} }
.comments-area{ .comments-area{
grid-row: 4; grid-row: 4;

View File

@ -207,6 +207,8 @@ def get_watch_page():
music_attributes = get_ordered_music_list_attributes(info['music_list']), music_attributes = get_ordered_music_list_attributes(info['music_list']),
comments_info = comments_info, comments_info = comments_info,
theater_mode = settings.theater_mode,
title = info['title'], title = info['title'],
uploader = info['uploader'], uploader = info['uploader'],
description = info['description'], description = info['description'],