diff --git a/src/lib/lazy-load.ts b/src/lib/lazy-load.ts
new file mode 100644
index 0000000..2e5df19
--- /dev/null
+++ b/src/lib/lazy-load.ts
@@ -0,0 +1,34 @@
+// See how the options work here: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
+let options = {
+ root: null,
+ rootMargin: "0px",
+ threshold: 0
+}
+
+export const lazyLoad = (image: any, src: string) => {
+ const loaded = () => {
+ image.classList.remove("loading");
+ image.style.opacity = "1";
+ };
+ const observer = new IntersectionObserver(
+ (entries) => {
+ if (entries[0].isIntersecting) {
+ image.src = src;
+ if (image.complete) {
+ loaded();
+ } else {
+ image.addEventListener("load", loaded);
+ }
+ }
+ },
+ options
+ );
+ observer.observe(image);
+
+ return {
+ destroy() {
+ observer.disconnect();
+ image.removeEventListener("load", loaded);
+ },
+ };
+};
\ No newline at end of file
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index d5e1301..61eff25 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,4 +1,5 @@
-
+
-
+{#if showCategories}
+
+{/if}