Add Snipcart product validation endpoint and improve product gallery
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s
All checks were successful
Deploy / Deploy to Production (push) Successful in 6s
- Add route handler for /validate.json to enable Snipcart product validation - Update product gallery to display all product images instead of just the first one - Fix CSS styling for product gallery list items - Update home page to use first sorted image as product cover 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
44ed53aae0
commit
22afa818f1
6 changed files with 83 additions and 22 deletions
|
|
@ -68,17 +68,23 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<figure>
|
||||
<?php if($image = $page->images()->first()): ?>
|
||||
<?php snippet('picture', [
|
||||
'file' => $image,
|
||||
'alt' => $page->title()->html(),
|
||||
'preset' => 'product-detail',
|
||||
'size' => 50,
|
||||
'lazy' => false
|
||||
]) ?>
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php if ($page->hasFiles()): ?>
|
||||
<ul class="product-gallery">
|
||||
<?php foreach($page->files()->sort() as $image): ?>
|
||||
<li>
|
||||
<figure>
|
||||
<?php snippet('picture', [
|
||||
'file' => $image,
|
||||
'alt' => $page->title()->html(),
|
||||
'preset' => 'product-detail',
|
||||
'size' => 50,
|
||||
'lazy' => false
|
||||
]) ?>
|
||||
</figure>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue