File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1818 }"
1919 >
2020 <ProductImage :alt =" product.name" :src =" productImage(product)" />
21-
2221 <div class =" flex justify-center pt-3" >
2322 <p class =" text-2xl font-bold text-center cursor-pointer" >
2423 {{ product.name }}
@@ -84,6 +83,12 @@ const props = defineProps({
8483
8584const config = useRuntimeConfig ();
8685
86+ /**
87+ * Returns the source URL of a product image or a placeholder image if the product does not have an image.
88+ *
89+ * @param {Object} product - The product object containing the image source URL.
90+ * @return {string} The source URL of the product image or a placeholder image if the product does not have an image.
91+ */
8792const productImage = (product ) =>
8893 product .image ? product .image .sourceUrl : config .public .placeholderImage ;
8994
Original file line number Diff line number Diff line change 11<template >
2- <div >
3- <LayoutNavbar />
4- <div class =" container mx-auto max-w-[84.375rem]" >
5- <slot />
6- </div >
7- <LayoutFooter />
8- <LayoutStickyFooter />
2+ <LayoutNavbar />
3+ <div class =" container mx-auto max-w-[84.375rem]" >
4+ <slot />
95 </div >
6+ <LayoutFooter />
7+ <LayoutStickyFooter />
108</template >
119
1210<style >
1311.home-enter-active ,
1412.home-leave-active {
1513 transition : opacity 0.5s ;
1614}
15+
1716.home-enter ,
1817.home-leave-active {
1918 opacity : 0 ;
2322.cart-leave-active {
2423 transition : all 0.5s ;
2524}
25+
2626.cart-enter ,
2727.cart-leave-active {
2828 opacity : 0 ;
You can’t perform that action at this time.
0 commit comments