From 48b06e98640ecd597cafe3c1a23378a51c7f8d1c Mon Sep 17 00:00:00 2001 From: Jaskaran Sarkaria Date: Sat, 8 Jan 2022 14:02:03 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .routify/config.js | 2 +- .routify/routes.js | 4 +- public/index.html | 4 +- src/components/Header/Header.svelte | 62 ++++++++++++------- src/components/Navbar/Navbar.svelte | 42 ------------- src/components/ProductView/ProductView.svelte | 43 +++++-------- .../RootCategories/RootCategories.svelte | 11 +--- .../RootCategories/RootCategories.test.ts | 4 +- .../SearchProducts/SearchProducts.svelte | 15 ++++- src/components/Services/Services.svelte | 11 ---- src/pages/_layout.svelte | 5 ++ src/pages/shop/_layout.svelte | 5 -- 12 files changed, 84 insertions(+), 124 deletions(-) delete mode 100644 src/components/Navbar/Navbar.svelte delete mode 100644 src/components/Services/Services.svelte diff --git a/.routify/config.js b/.routify/config.js index dcc38fff..dd3f5321 100644 --- a/.routify/config.js +++ b/.routify/config.js @@ -8,5 +8,5 @@ module.exports = { noHashScroll: false, distDir: 'dist', extensions: ['svelte', 'html', 'svx', 'md'], - started: '2022-01-07T18:20:58.894Z', + started: '2022-01-08T12:40:27.418Z', }; diff --git a/.routify/routes.js b/.routify/routes.js index b72be264..69f1c39a 100644 --- a/.routify/routes.js +++ b/.routify/routes.js @@ -1,10 +1,10 @@ /** * @roxi/routify 2.7.3 - * File generated Fri Jan 07 2022 18:21:01 GMT+0000 (Greenwich Mean Time) + * File generated Sat Jan 08 2022 12:40:30 GMT+0000 (Greenwich Mean Time) */ export const __version = '2.7.3'; -export const __timestamp = '2022-01-07T18:21:01.428Z'; +export const __timestamp = '2022-01-08T12:40:30.211Z'; //buildRoutes import { buildClientTree } from '@roxi/routify/runtime/buildRoutes'; diff --git a/public/index.html b/public/index.html index 8b11b27a..7683b391 100644 --- a/public/index.html +++ b/public/index.html @@ -11,9 +11,9 @@ - + - + diff --git a/src/components/Header/Header.svelte b/src/components/Header/Header.svelte index 7cb2d035..d45ba512 100644 --- a/src/components/Header/Header.svelte +++ b/src/components/Header/Header.svelte @@ -2,7 +2,10 @@ import { goto } from '@roxi/routify'; import SearchProducts from '@/components/SearchProducts/SearchProducts.svelte'; import { tweened } from 'svelte/motion'; - import { quartInOut } from 'svelte/easing'; + + const width = tweened(0, { + duration: 500, + }); const left = tweened(0, { duration: 500, @@ -17,14 +20,22 @@ }); function handleClick() { - left.set(-1250); - searchLeft.set(-1250); - //growSearch.set(300) - showSearch = !showSearch; + if (!showSearch) { + left.set(-300); + searchLeft.set(-300); + width.set(300); + showSearch = !showSearch; + } else { + left.set(0); + searchLeft.set(0); + width.set(0); + setTimeout(() => (showSearch = !showSearch), 500); + } } const move = (x: number) => `transform: translateX(${x}px);`; const grow = (width: number, x: number) => `width: ${width}px; transform: translateX(${x}px);`; + const growSearchWidth = (width: number) => `width: ${width}px`; let showSearch = false; @@ -36,11 +47,19 @@ alt="home" on:click={$goto('/')} /> + +
- - - - + + + + {#if showSearch} {/if} diff --git a/src/components/Navbar/Navbar.svelte b/src/components/Navbar/Navbar.svelte deleted file mode 100644 index e092a5ec..00000000 --- a/src/components/Navbar/Navbar.svelte +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/src/components/ProductView/ProductView.svelte b/src/components/ProductView/ProductView.svelte index fc0308df..451bd05f 100644 --- a/src/components/ProductView/ProductView.svelte +++ b/src/components/ProductView/ProductView.svelte @@ -23,35 +23,26 @@ {#if productArr} - {#if variantArr.length} - {#each groupedVariantProducts as variants (variants)} -
+
+ {#if variantArr.length} + {#each groupedVariantProducts as variants (variants)} {#each variants as variant (variant)} {/each} -
- {/each} - {:else} -
- {#if nonVariantArr.length} - {#each nonVariantArr as product} - - {/each} - {/if} -
- {/if} + {/each} + {/if} + {#if nonVariantArr.length} + {#each nonVariantArr as product} + + {/each} + {/if} +
{/if} diff --git a/src/components/Services/Services.svelte b/src/components/Services/Services.svelte deleted file mode 100644 index 3a67b86b..00000000 --- a/src/components/Services/Services.svelte +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/src/pages/_layout.svelte b/src/pages/_layout.svelte index e58d70eb..deb2d793 100644 --- a/src/pages/_layout.svelte +++ b/src/pages/_layout.svelte @@ -1,3 +1,8 @@ + + +

footer

diff --git a/src/pages/shop/_layout.svelte b/src/pages/shop/_layout.svelte index 6b0acce2..b26934f6 100644 --- a/src/pages/shop/_layout.svelte +++ b/src/pages/shop/_layout.svelte @@ -1,8 +1,3 @@ - - -