Build Dune shop catalogue and repair shared menu publication

This commit is contained in:
Codex 2026-11-16 17:35:44 +00:00
commit fdb7a8758f

View file

@ -20,7 +20,8 @@ final class DuneShopController extends Sceleton {
}
$out.='</nav>';
foreach([['Sale','Current offers from the emporium',array_values(array_filter($rows,fn($r)=>in_array($r['products_id'],$saleIds))),'catalog/sales'],['Featured','Selected pieces from the realms',array_values(array_filter($rows,fn($r)=>in_array($r['products_id'],$featuredIds))),'catalog/featured-products'],['New arrivals','Recently added to the collection',array_slice($rows,0,6),'catalog/products-new']] as [$title,$sub,$items,$route]){
$out.='<section class="dune-store-section'.($title==='Sale'?' dune-store-section--sale':'').'"><header><div><h2>'.($title==='Sale'?'<span class="dune-store-sale-label">SALE</span> ':'').$title.'</h2><p>'.$sub.'</p></div><a href="'.$base($route).'">View all ↗</a></header>';
$sectionClass=$title==='Sale'?' dune-store-section--sale':($title==='Featured'?' dune-store-section--featured':'');
$out.='<section class="dune-store-section'.$sectionClass.'"><header><div><h2>'.($title==='Sale'?'<span class="dune-store-sale-label">SALE</span> ':'').$title.'</h2><p>'.$sub.'</p></div><a href="'.$base($route).'">View all ↗</a></header>';
if(!$items)$out.='<div class="dune-store-empty">'.($title==='Sale'?'There are no active sale offers.':'Featured products have not been selected yet.').'</div>';
else{
$out.='<div class="dune-store-products">';