sidebar: show full ring instead of 42-item window
The related content sidebar now shows all ring items from the current position forward, matching content.py behavior. This means the sidebar never "runs out" of items — Fresh mode hides watched items and reveals the full remaining ring. Items beyond offset 7 still use the related-content-overflow CSS class for mobile.
This commit is contained in:
parent
2bf4ab1736
commit
e2169ecbbf
2 changed files with 3 additions and 3 deletions
|
|
@ -99,7 +99,7 @@ def product(request):
|
|||
from ..models.product import get_ring_related_products, get_related_products
|
||||
ring = product.shop.discovery_ring
|
||||
if ring:
|
||||
related_products = get_ring_related_products(product, ring, forward=42)
|
||||
related_products = get_ring_related_products(product, ring, forward=len(ring))
|
||||
else:
|
||||
related_products = get_related_products(product)
|
||||
|
||||
|
|
|
|||
|
|
@ -113,9 +113,9 @@ def watch_json(request):
|
|||
except (ValueError, TypeError):
|
||||
direction = 1
|
||||
if direction == -1:
|
||||
related = get_ring_related_products(product, ring, forward=3, backward=42)
|
||||
related = get_ring_related_products(product, ring, forward=3, backward=len(ring))
|
||||
else:
|
||||
related = get_ring_related_products(product, ring, forward=42, backward=3)
|
||||
related = get_ring_related_products(product, ring, forward=len(ring), backward=3)
|
||||
else:
|
||||
related = get_related_products(product)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue