Skip to content

Commit

Permalink
feat: 🎸 wip show categories and prods at same level
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Mar 22, 2021
1 parent d57663e commit 7f0689d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .routify/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ module.exports = {
noHashScroll: false,
distDir: 'dist',
extensions: ['svelte', 'html', 'svx', 'md'],
started: '2021-03-20T12:58:22.492Z',
started: '2021-03-22T13:05:21.735Z',
};
4 changes: 2 additions & 2 deletions .routify/routes.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @roxi/routify 2.7.3
* File generated Sat Mar 20 2021 12:58:23 GMT+0000 (Greenwich Mean Time)
* File generated Mon Mar 22 2021 13:05:23 GMT+0000 (Greenwich Mean Time)
*/

export const __version = '2.7.3';
export const __timestamp = '2021-03-20T12:58:23.948Z';
export const __timestamp = '2021-03-22T13:05:23.242Z';

//buildRoutes
import { buildClientTree } from '@roxi/routify/runtime/buildRoutes';
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ Travis CI handles the deployment pipeline deploying when a commit on master is t
- [ ] use prod stripe api key
- [ ] promotions

- [ ] follow lighthouse tips to increase accessibility/ performance
- [ ] purge the imgix cache before releasing to prod https://docs.imgix.com/setup/purging-images
4 changes: 3 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>

<meta name="description" content="Enki Jewellery & Craft Gallery shop in Kings Heath, Birmingham, UK">

<title>Enki</title>

<link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/build/bundle.css'>
<link rel="preload" href="open.png">

<script defer src='/build/bundle.js'></script>
</head>
Expand Down
4 changes: 4 additions & 0 deletions src/components/CategoryView/CategoryView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
});
$: refreshSetCategories(categoryId);
// TODO: ensure that you can show sub categories and also if that category
// and has any products in it. show products and categories on the same level
</script>

{#if $categories.hasOwnProperty('Id') && $categories.Id !== ''}
Expand All @@ -35,6 +38,7 @@
{#each $categories.Children as cat}
<button on:click={() => categoryFn(cat)}> {cat.Name} </button>
{/each}
<ProductView bind:categoryId />
{:else}
<ProductView bind:categoryId />
{/if}
Expand Down
6 changes: 1 addition & 5 deletions src/pages/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
.open-sign-button:hover {
animation-play-state: running;
}
img {
width: 10vw;
height: 16vh;
}
@keyframes swing {
20% {
Expand Down Expand Up @@ -77,6 +73,6 @@
on:mouseover={() => (swing = true)}
on:mouseout={() => (swing = false)}
on:click={$goto('/what-we-offer')}>
<img src="/open.png" alt="shop open sign" />
<img src="/open.png" alt="shop open sign" width="200px" />
</button>
</main>
1 change: 1 addition & 0 deletions src/pages/online-shop/[category].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
export let category: string;
const selectCategory = (category: Category): void => {
categories.set(category);
console.log('cat', category);
$goto(`./${$params.category}/${category.Id}`);
};
</script>
Expand Down

0 comments on commit 7f0689d

Please sign in to comment.