Channel page: restore the season view toggle (rail posters etc.) broken by search/sort

The search/sort change hardcoded pillsHTML() for the youtube branch, so the
view toggle did nothing and the rail view's season posters vanished. The youtube
branch now honours seasonView (rail / timeline / tabs / list) for the year nav,
with the new search+sort controls stacked above it; flat mode (search / most-
viewed / longest) still hides the per-year nav. Default view (rail) shows the
year posters again.
This commit is contained in:
BoulderBadgeDad 2026-06-17 19:11:30 -07:00
parent 9c3d1a5709
commit cb5ae93f76

View file

@ -879,9 +879,16 @@
function renderSeasonNav() {
var host = q('[data-vd-season-nav]');
if (!host || !data || !data.seasons.length) { if (host) host.innerHTML = ''; return; }
if (data.source === 'youtube') { // channels: search + sort controls, then year pills (hidden in flat mode)
host.className = 'vd-season-nav vd-season-nav--yt';
host.innerHTML = ytControlsHTML() + (ytFlatMode() ? '' : pillsHTML());
if (data.source === 'youtube') { // channels: search + sort controls above the
// year nav — which still honours the view toggle (rail posters, timeline,
// tabs, list). Flat mode (search / most-viewed / longest) hides the nav.
host.className = 'vd-season-nav vd-season-nav--yt vd-season-nav--' + seasonView;
var nav = ytFlatMode() ? ''
: seasonView === 'rail' ? railHTML()
: seasonView === 'timeline' ? timelineHTML()
: seasonView === 'pills' ? pillsHTML()
: dropdownHTML();
host.innerHTML = ytControlsHTML() + nav;
return;
}
host.className = 'vd-season-nav vd-season-nav--' + seasonView;