diff --git a/website/ops/oscommerce/DuneShopController.php b/website/ops/oscommerce/DuneShopController.php index d2ca3d76..9dfdc43e 100644 --- a/website/ops/oscommerce/DuneShopController.php +++ b/website/ops/oscommerce/DuneShopController.php @@ -33,7 +33,7 @@ final class DuneShopController extends Sceleton { $url=$category?\yii\helpers\Url::to(['catalog/index','cPath'=>$category]):\yii\helpers\Url::to([$route]); $out.='

'.Html::encode($title).'

'.Html::encode($text).'

'; } - $out.=''; + $out.='
'; 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]){ $sectionClass=$title==='Sale'?' dune-store-section--sale':($title==='Featured'?' dune-store-section--featured':''); $out.='

'.($title==='Sale'?'SALE ':'').$title.'

'.$sub.'

View all ↗
'; @@ -51,13 +51,13 @@ final class DuneShopController extends Sceleton { $saving=(int)round((1-(float)$special/(float)$normal)*100); $price=''.$price.''.$currencies->display_price($special,$tax).'Save '.$saving.'%'; } - $out.=''; + $out.=''; } $out.='
'; } $out.=''; } - $out.=''; + $out.=''; return $this->renderContent($out); } } diff --git a/website/ops/oscommerce/dune-shop-cards.css b/website/ops/oscommerce/dune-shop-cards.css index 36a2620b..dff167c0 100644 --- a/website/ops/oscommerce/dune-shop-cards.css +++ b/website/ops/oscommerce/dune-shop-cards.css @@ -36,3 +36,17 @@ html,body{height:auto!important;min-height:0!important}.main-content{min-height: .dune-store-section--featured{border:1px solid #baa15d!important;border-top:3px solid #dfc575!important;background:radial-gradient(ellipse at 35% 0,#7b6b3038,transparent 65%),linear-gradient(125deg,#263d27,#142b1e)!important;box-shadow:0 8px 28px #cfa74612!important}.dune-store-section--featured>header{border-bottom-color:#8d7b47!important}.dune-store-section--featured h2{color:#f3da92!important}.dune-store-section--featured header>a{color:#edd18b!important}.dune-store-section--featured article{border-color:#9a854c!important;background:linear-gradient(145deg,#31462b,#112a1e)!important}.dune-store-section--featured .dune-store-product-art{background:radial-gradient(ellipse,#8b7a394d,transparent 70%)}.dune-store-section--featured .dune-store-button{background:linear-gradient(#655d2e,#3a4829)!important;border-color:#c4a65c!important;color:#fff0c3!important}.dune-store-section--featured .dune-store-empty{border-color:#99844a!important;background:#37492a!important;color:#decf9c!important} .dune-store-welcome>img[src*="imperial-heralds-logo"]{width:min(440px,46%);height:auto;object-fit:contain;filter:drop-shadow(0 8px 12px #0008)}@media(max-width:700px){.dune-store-welcome>img[src*="imperial-heralds-logo"]{width:min(100%,360px)}} +/* One compact introduction, then real collections with their artwork loaded. */ +.dune-store-welcome{padding:24px!important;min-height:0!important;gap:22px!important;margin-bottom:20px!important} +.dune-store-welcome>img{width:min(34%,300px)!important;height:auto!important;max-height:150px!important;object-fit:contain} +.dune-store-welcome h1{font-size:clamp(25px,3vw,36px)!important;margin:10px 0!important} +.dune-store-categories{gap:12px;margin-bottom:20px}.dune-store-categories>a{padding:16px;gap:12px}.dune-store-categories img{width:42px;height:42px} +.dune-store-collections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start} +.dune-store-collections>.dune-store-section{margin:0;padding:18px;min-width:0} +.dune-store-collections>.dune-store-section:not(.dune-store-section--sale):not(.dune-store-section--featured){grid-column:1/-1} +.dune-store-collections .dune-store-products{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:14px} +.dune-store-collections :is(.dune-store-section--sale,.dune-store-section--featured) .dune-store-products{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))} +.dune-store-collections .dune-store-products article{padding:14px}.dune-store-collections .dune-store-product-art{height:170px;margin-bottom:10px}.dune-store-collections .dune-store-product-art img{height:160px!important;max-height:160px!important} +.dune-store-collections .dune-store-products h3{font-size:16px!important;line-height:1.4;margin:8px 0!important}.dune-store-collections .dune-store-products small{font-size:11px}.dune-store-collections .dune-store-price{font-size:21px;margin-bottom:12px} +.dune-store-preview{margin-top:20px} +@media(max-width:700px){.dune-store-collections{grid-template-columns:1fr}.dune-store-welcome>img{width:150px!important;max-height:100px!important}.dune-store-collections .dune-store-products{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}} diff --git a/website/ops/oscommerce/publish-imperial-heralds.py b/website/ops/oscommerce/publish-imperial-heralds.py index db6b8416..8818d782 100644 --- a/website/ops/oscommerce/publish-imperial-heralds.py +++ b/website/ops/oscommerce/publish-imperial-heralds.py @@ -5,7 +5,7 @@ parser=argparse.ArgumentParser();parser.add_argument('--apply',action='store_tru if os.geteuid()!=0: raise SystemExit('Root operator required') app=pathlib.Path('/home/dunerealms/apps/oscommerce').resolve(strict=True) source=pathlib.Path(__file__).resolve().parent -specs=[('DuneShopController.php','lib/frontend/controllers/DuneShopController.php','98a5c5d536cbf8badf5c567eb95e759726f27ffe215609596c72e8a151a58917','c977e5d9383d99c1a75caa15c2e769b1f54966114baa91ab54de45bcc05b752f'),('dune-shop-cards.css','dune-shop-cards.css','6206f3ff2695d73318dd05c92727062d82dff99423d49d37d3a93ba87b20b854','03f8f72ead3b514bd5c426d43ae87757b3c7460d94dd4e78a6bc99f555dd69eb')] +specs=[('DuneShopController.php','lib/frontend/controllers/DuneShopController.php','c977e5d9383d99c1a75caa15c2e769b1f54966114baa91ab54de45bcc05b752f','e7280af87f7dbd4043f405bd64e991944a8842db6aa12ef1c0ff391f91c78b23'),('dune-shop-cards.css','dune-shop-cards.css','03f8f72ead3b514bd5c426d43ae87757b3c7460d94dd4e78a6bc99f555dd69eb','370bc3649f012df5917249ee550d1a751ff9234e468ec803d1f5217fed69f593')] def canonical(path):return path.read_bytes().replace(bytes([13,10]),bytes([10])) def digest(data):return hashlib.sha256(data).hexdigest() plan=[] diff --git a/website/web/realm-comfort.css b/website/web/realm-comfort.css index b0302db5..4da27d0f 100644 --- a/website/web/realm-comfort.css +++ b/website/web/realm-comfort.css @@ -37,3 +37,4 @@ body:has(main>header,main>.hero,main>.page-hero,#content) .dune-page-marker{disp body header.dune-site-header .dune-menu-group:has([aria-current="page"])>summary{color:#ffdc7b!important;box-shadow:inset 0 -2px #d5b762!important} body>a.skip-link,body>a[href="#staff-content"]{position:absolute;left:-10000px;top:0;z-index:1000;background:#17382d;color:#ffe0a0;padding:12px 18px} body>a.skip-link:focus,body>a[href="#staff-content"]:focus{left:12px} +body:has(.dune-shop-landing) .dune-page-marker{display:none!important}