Skip to content

Commit

Permalink
fix: 🐛 thumbnail bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Dec 1, 2021
1 parent 2b4520d commit b8273b7
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 26 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-12-01T17:51:26.247Z',
started: '2021-12-01T20:34:17.869Z',
};
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 Wed Dec 01 2021 17:51:28 GMT+0000 (Greenwich Mean Time)
* File generated Wed Dec 01 2021 20:34:20 GMT+0000 (Greenwich Mean Time)
*/

export const __version = '2.7.3';
export const __timestamp = '2021-12-01T17:51:28.874Z';
export const __timestamp = '2021-12-01T20:34:20.849Z';

//buildRoutes
import { buildClientTree } from '@roxi/routify/runtime/buildRoutes';
Expand Down
27 changes: 14 additions & 13 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@

<!DOCTYPE html>
<html lang="en">
<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">
<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-1638381086245.css'>
<script defer src='/build/bundle-1638381086245.js'></script>

<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="stylesheet" href="/global.css" />
<link rel="stylesheet" href="/build/bundle-1638390857867.css" />

<script defer src="/build/bundle-1638390857867.js"></script>
</head>
<body>
</body>
</html>
<body></body>
</html>
13 changes: 5 additions & 8 deletions src/components/HexGrid/HexGrid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,15 @@
sourceElemArr[idx].srcset = imgElemArr[idx].src;
};
// switch to flex box if screen is wider than 360 and item numbers are less than 3
$: outerWidth = 0;
$: showGrid = data.length >= 3 ? true : false;
</script>

<svelte:window bind:outerWidth />
<ul
in:fade={{ delay: 300, duration: 900 }}
class={showGrid ? 'root-categories-container' : 'flexbox-container'}
>
<ul class={showGrid ? 'root-categories-container' : 'flexbox-container'}>
{#each data as category, idx (category.Id)}
<li class={showGrid ? 'hex' : 'hex-flex'}>
<li
in:fade={{ delay: 400, duration: 1200 }}
class={showGrid ? 'hex' : 'hex-flex'}
>
<div class="hex-in">
<div class="hex-link">
<picture>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProductImage/ProductImage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<svelte:window on:keydown={handleArrowKeydown} bind:outerWidth />
{#if product}
<div class="swipe-holder">
<Swipe bind:activeItem bind:this={SwipeComp} {...swipeConfig}>
<Swipe bind:active_item={activeItem} bind:this={SwipeComp} {...swipeConfig}>
{#each product.ProductImages as _, idx ('main' + idx)}
<SwipeItem allow_dynamic_height={true}>
<img
Expand Down
6 changes: 5 additions & 1 deletion src/components/SingleProduct/SingleProduct.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
{/if}
<div class="detailed-products-footer">
<div class="product-details">
<h4>{`${product.Description}`}</h4>
<h4>
{`£${product.SalePrice} -- ${
product.CurrentStock === 0
Expand Down Expand Up @@ -50,6 +49,10 @@
<AddToBasket {product} detailed={showDetailedView} />
{/if}
</button>

{#if showDetailedView}
<h4>{`${product.Description}`}</h4>
{/if}
{/if}

<style>
Expand Down Expand Up @@ -116,6 +119,7 @@
}
h3 {
display: block;
font-size: 0.7em;
}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/shop/product/[product].svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { fade } from 'svelte/transition';
import { params } from '@roxi/routify';
import { products } from '@/stores/products';
import SingleProduct from '@/components/SingleProduct/SingleProduct.svelte';
Expand Down Expand Up @@ -47,6 +48,7 @@
<style>
div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
Expand Down

0 comments on commit b8273b7

Please sign in to comment.