update
This commit is contained in:
+16
-6
@@ -3,8 +3,8 @@
|
||||
<div class="relative text-center h-[56.154vw] md:h-[11.406vw]">
|
||||
<p
|
||||
class="post w-[30.769vw] md:w-[6.979vw] h-[9.487vw] md:h-[2.24vw] flexBox text-[3.59vw] md:text-[0.938vw] absolute left-0 bottom-0 bg-white rounded-tr-[3.59vw] md:rounded-tr-[0.781vw]">
|
||||
{{props.course?.price}},000
|
||||
<span class="ms-[1vw] md:ms-[0.2vw] text-[2.236vw] md:text-[0.585vw]">تومان</span>
|
||||
{{props.course?.price == 0 ? 'رایگان' : props.course?.price + ',000'}}
|
||||
<span v-if="!props.course?.price == 0" class="ms-[1vw] md:ms-[0.2vw] text-[2.236vw] md:text-[0.585vw]">تومان</span>
|
||||
</p>
|
||||
<NuxtImg style="object-fit: cover;" :src="props.course?.image" alt="laravel"
|
||||
:placeholder="[30, 20]"
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="w-[69.231vw] md:w-[16vw] space-y-[9vw] md:space-y-[1.4vw] mt-[4vw] md:mt-[0vw] xl:mt-[0.7vw]">
|
||||
<h1
|
||||
class="hover:text-primaryGreen text-[3.59vw] md:text-[0.833vw] text-[#383E43] w-full">
|
||||
{{props.course?.name}}
|
||||
{{hideEndOfString(props.course?.name)}}
|
||||
</h1>
|
||||
<div class="flex justify-between text-[3.614vw] md:text-[0.658vw]">
|
||||
<p class="flex items-center text-[#878787]">
|
||||
@@ -106,7 +106,7 @@
|
||||
</svg>
|
||||
|
||||
</NuxtLink>
|
||||
<span @click="change">
|
||||
<span>
|
||||
<svg class="mt-[0.5vw] w-[8.718vw] md:w-[2.24vw] h-[8.718vw] md:h-[2.24vw]" viewBox="0 0 44 46"
|
||||
fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
@@ -143,10 +143,20 @@
|
||||
<script setup>
|
||||
import { useToast } from 'vue-toastification'
|
||||
const props = defineProps(['course']);
|
||||
const MyArray = ['Salam','Man','Sadegh','Hastam'];
|
||||
const toast = useToast()
|
||||
const change = () =>{
|
||||
toast.error('متن تست')
|
||||
|
||||
function hideEndOfString(inputString) {
|
||||
const words = inputString.split(' ');
|
||||
if (words.length > 8) {
|
||||
const truncatedWords = words.slice(0, 8);
|
||||
return truncatedWords.join(' ') + '...';
|
||||
} else {
|
||||
return inputString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.post::before {
|
||||
|
||||
Reference in New Issue
Block a user