Skip to content

Commit

Permalink
sveltekit v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevanhannah committed May 4, 2023
2 parents 64501df + dada968 commit 29e043a
Show file tree
Hide file tree
Showing 10 changed files with 174 additions and 36 deletions.
128 changes: 108 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sveltekit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jaketobin.sveltekit",
"version": "1.0.0",
"version": "1.1.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
Expand All @@ -23,6 +23,7 @@
"@sentry/tracing": "^7.50.0"
},
"devDependencies": {
"@sentry/vite-plugin": "^0.7.2",
"@sveltejs/adapter-netlify": "^2.0.6",
"@sveltejs/kit": "^1.15.8",
"autoprefixer": "^10.4.14",
Expand Down
25 changes: 22 additions & 3 deletions sveltekit/src/components/Cart/CartItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
import QuantityWidget from '$components/Cart/QuantityWidget.svelte';
export let item;
$: console.log(item);
$: ({ estimatedCost, id, merchandise, quantity } = item);
</script>

<li>
<div class="itemImage">
<a class="itemImage" href={`/shop/products/${merchandise.product.handle}`}>
<CartItemImage image={merchandise.product?.images?.edges[0].node} />
</div>
</a>
<div class="itemInfo">
<div class="itemInfo_groupText">
<h3>{merchandise.product.title}</h3>
<a class="itemTitle" href={`/shop/products/${merchandise.product.handle}`}
><h3>{merchandise.product.title}</h3></a>
{#if merchandise.title !== 'Default Title'}
<span class="variantTitle">{merchandise.title}</span>
{/if}
Expand Down Expand Up @@ -66,6 +68,19 @@
}
}
.itemImage {
opacity: 1;
transition-property: opacity;
transition-duration: 500ms;
transition-timing-function: ease;
@media (hover: hover) {
&:hover {
opacity: 0.8;
}
}
}
.itemInfo {
display: flex;
flex-direction: column;
Expand All @@ -78,6 +93,10 @@
gap: 0.5em;
}
.itemTitle {
text-decoration: none;
}
.itemPrice,
.variantTitle {
font-size: 0.75em;
Expand Down
Loading

0 comments on commit 29e043a

Please sign in to comment.