Add image popup, price to float in search
This commit is contained in:
@@ -25,7 +25,7 @@ import Popper from "vue3-popper";
|
||||
|
||||
const screenWidth = ref(screen.width)
|
||||
const screenHeight = ref(screen.height)
|
||||
const hover = ref(false);
|
||||
const hover = ref(true);
|
||||
const hoverImage = ref(null);
|
||||
|
||||
const sdropdown = ref([
|
||||
@@ -334,7 +334,7 @@ const async_search = async () => {
|
||||
img: i.mainImageUrl,
|
||||
code: i.code,
|
||||
url: i.url,
|
||||
price: i.salesPrice,
|
||||
price: parseFloat(i.salesPrice),
|
||||
units: i.priceUnit,
|
||||
descLong: i.mainImageAlt,
|
||||
};
|
||||
@@ -438,8 +438,32 @@ watch(ccodes, (codes) => {
|
||||
</script>
|
||||
<template>
|
||||
<GuestLayout>
|
||||
|
||||
<div class="flex flex-wrap gap-2 justify-center align-middle">
|
||||
<div class="flex flex-col start-0">
|
||||
|
||||
<div id="popup-modal" tabindex="-1" :class="hover ? 'hidden' : ''" class="absolute inset-y-1/3 left-1/3 z-50 justify-center items-center w-full max-h-full">
|
||||
<div class="relative p-4 w-full max-w-md max-h-full">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<button @click="hover=true" type="button" class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white" data-modal-hide="popup-modal">
|
||||
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
<span class="sr-only">Close modal</span>
|
||||
</button>
|
||||
<div class="p-4 md:p-5 text-center">
|
||||
|
||||
|
||||
<img :src="hoverImage"/>
|
||||
<!-- <button data-modal-hide="popup-modal" type="button" class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center">
|
||||
Yes, I'm sure
|
||||
</button> -->
|
||||
<button @click="hover=true" data-modal-hide="popup-modal" type="button" class="py-2.5 px-5 mt-2 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="flex flex-col start-0 row-start-1">
|
||||
<div
|
||||
class="justify-center rounded-md border-black border-8 max-h-[328px]"
|
||||
>
|
||||
@@ -593,7 +617,6 @@ watch(ccodes, (codes) => {
|
||||
<template #item-img="{ code, img }">
|
||||
<img
|
||||
v-on:mouseover="onHover"
|
||||
v-on:mouseleave="onHover"
|
||||
class="h-12"
|
||||
:src="img"
|
||||
:alt="code"
|
||||
|
||||
Reference in New Issue
Block a user