Skip to content

Commit

Permalink
fix: #2664
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Dec 16, 2023
1 parent 5324c7c commit ff7c106
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/docs/src/routes/store/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
import { dev } from "$app/environment"
import SEO from "$components/SEO.svelte"
import Countdown from "svelte-countdown"
let scrollY
$: setIdtoUrl = function (element, offset = 120) {
document.addEventListener("scroll", function (e) {
if (
scrollY + offset > element.offsetTop &&
scrollY + offset < element.offsetTop + element.offsetHeight
) {
location.hash = `#${element.id}`
}
})
}
export let data
const products = data.products?.data
Expand Down Expand Up @@ -41,8 +29,6 @@
}
</script>
<svelte:window bind:scrollY />
<SEO title="Official daisyUI Store" desc="daisyUI Store - Professional templates made by daisyUI" />
<!-- discounts -->
Expand Down Expand Up @@ -155,7 +141,7 @@
{#each products.filter((product) => {
return product.attributes.status === "published"
}) as product}
<div class="rounded-box relative grid grid-cols-5 gap-10 py-10" id={product.id} use:setIdtoUrl>
<div class="rounded-box relative grid grid-cols-5 gap-10 py-10" id={product.id}>
<div class="col-span-5 row-start-2 flex flex-col gap-8 xl:col-span-2 xl:row-start-1">
<div>
{#if product.customattributes?.tags}
Expand Down

0 comments on commit ff7c106

Please sign in to comment.