Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/components/StoreItems.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,18 @@ const store = 'https://svalboard.com/products/';
const items = [
{ name: '52 mm pearl trackball', href: store + 'svalboard-52mm-pearl-trackball', img: pearl, alt: 'Four 52 mm pearl trackballs: blue, purple, white and black.' },
{ name: '44 mm shiny black trackball', href: store + '44mm-shiny-black-trackball', img: black, alt: 'A 44 mm shiny black trackball.' },
{ name: '44 mm red trackball', href: store + '44mm-red-trackball', img: null, alt: '' },
{ name: 'Squishy palms', href: store + 'squishy-palmrests', img: palms, alt: 'A pair of black squishy palm rests with a fabric top.' },
{ name: 'Pitch towers', href: store + 'pitch-towers', img: towers, alt: 'A full set of sandblasted stainless pitch towers.' },
{ name: 'Carrier plates', href: store + 'carrier-plates', img: plates, alt: 'A pair of black anodized aluminum carrier plates.' },
];
---

{/* VERIFY: the 44 mm red trackball has no photo on its store page, so its tile shows a drawn red ball. Use a real photo when one is on the store. */}
<ul class={`store-items store-items--${layout}`} role="list">
{items.map((item) => (
<li>
<a class="store-item" href={item.href}>
<span class="store-item-pic">
{item.img ? (
<Image src={item.img} alt={item.alt} widths={[160, 240, 360, 480]} sizes={layout === 'grid' ? '(min-width: 40rem) 8rem, 30vw' : '4rem'} />
) : (
<span class="store-item-ball" role="img" aria-label="A red trackball." />
)}
<Image src={item.img} alt={item.alt} widths={[160, 240, 360, 480]} sizes={layout === 'grid' ? '(min-width: 40rem) 8rem, 30vw' : '4rem'} />
</span>
<span class="store-item-name">{item.name}</span>
</a>
Expand Down
8 changes: 0 additions & 8 deletions src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,6 @@
margin: 0;
object-fit: cover;
}
.sl-markdown-content .store-item-ball {
display: block;
width: 48%;
aspect-ratio: 1;
margin: 13% auto 0;
border-radius: 50%;
background: radial-gradient(circle at 35% 30%, #f27a6f 0%, #c8261c 45%, #7c120c 100%);
}
/* A: a compact grid of small cards, picture above the name. */
.sl-markdown-content .store-items--grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
Expand Down
Loading