From 777ed756dcfd01845451937fb38559ee57ec44e9 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 23 Dec 2019 14:39:59 -0800 Subject: Channel: Change search results to use next and previous page buttons Because youtube doesn't give the number of search results, so previous behavior would give an error if a page number out of range was selected. --- youtube/templates/channel.html | 81 ++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 30 deletions(-) (limited to 'youtube/templates/channel.html') diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html index d99af9e..5b64737 100644 --- a/youtube/templates/channel.html +++ b/youtube/templates/channel.html @@ -1,4 +1,9 @@ -{% set page_title = channel_name + ' - Channel' %} +{% if current_tab == 'search' %} + {% set page_title = search_box_value + ' - Page ' + page_number|string %} +{% else %} + {% set page_title = channel_name + ' - Channel' %} +{% endif %} + {% extends "base.html" %} {% import "common_elements.html" as common_elements %} {% block style %} @@ -52,18 +57,29 @@ #number-of-results{ font-weight:bold; } - .item-grid{ - padding-left: 20px; - grid-row:4; + .content{ + grid-row: 4; grid-column: 1 / span 2; } - .item-list{ - width:1000px; - grid-column: 1 / span 2; - } - .page-button-row{ - grid-column: 1 / span 2; + .search-content{ + width: 800px; + margin-left: 10px; } + .item-grid{ + padding-left: 20px; + } + .item-list{ + width:800px; + margin: auto; + } + .page-button-row{ + margin-left: auto; + margin-right: auto; + } + .next-previous-button-row{ + margin-left: auto; + margin-right: auto; + } .tab{ padding: 5px 75px; } @@ -137,38 +153,43 @@ {% else %} - {% endif %} {% endblock main %} -- cgit v1.2.3