mirror of
				https://github.com/KevinMidboe/planetposen-frontend.git
				synced 2025-10-29 13:10:12 +00:00 
			
		
		
		
	Page title & meta description for webshop product
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| <script lang="ts"> | ||||
|   export let title: string; | ||||
|   export let description: string; | ||||
|   export let description: string | undefined; | ||||
| </script> | ||||
|  | ||||
| <svelte:head> | ||||
|   | ||||
| @@ -4,6 +4,7 @@ | ||||
|   import QuantitySelect from '$lib/components/QuantitySelect.svelte'; | ||||
|   import SizesSection from './SizesSection.svelte'; | ||||
|   import Button from '$lib/components/Button.svelte'; | ||||
|   import PageMeta from '$lib/components/PageMeta.svelte'; | ||||
|   import type { PageData } from './$types'; | ||||
|   import type { IProduct, IVariation } from '$lib/interfaces/IProduct'; | ||||
|  | ||||
| @@ -33,14 +34,14 @@ | ||||
|   let cooldownInputs = false; | ||||
|   let quantity = 1; | ||||
|   let selectedVariation: IVariation | undefined = defaultVariation(); | ||||
|   let pageTitle = `Nettbutikk - ${product.name}`; | ||||
|  | ||||
|   $: addProductButtonText = cooldownInputs | ||||
|     ? `${quantity} produkt${quantity > 1 ? 'er' : ''} lagt til` | ||||
|     : `Legg til ${quantity} i handlekurven`; | ||||
|  | ||||
|   onMount(() => document.head.appendChild(generateProductJsonLd(product))) | ||||
| </script> | ||||
|  | ||||
| <PageMeta title="{pageTitle}" description="{product.description}" /> | ||||
| <div class="product-container"> | ||||
|   <ProductTile product="{product}" large="{true}" /> | ||||
|  | ||||
|   | ||||
| @@ -29,7 +29,7 @@ | ||||
|  | ||||
|         <td class="name-and-price"> | ||||
|           <p><a href="/warehouse/{product.product_no}">{product.name}</a></p> | ||||
|           <p>{product?.variations?.length} variation(s)</p> | ||||
|           <p>{product?.variation_count} variation(s)</p> | ||||
|         </td> | ||||
|  | ||||
|         <td class="stock-column">{product?.sum_stock}</td> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user