Update to Nuxt 3.14 and Replace npm with pnpm (#72)
Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
committed by
GitHub
parent
32e4f6fe44
commit
9db5ae8103
@@ -1,10 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
/**
|
||||
* @credits NuxtLabs <https://nuxtlabs.com/>
|
||||
* @see https://github.com/nuxt/nuxt.com/blob/main/components/OgImage/OgImageDocs.vue
|
||||
*/
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
title?: string
|
||||
description?: string
|
||||
@@ -19,11 +13,14 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
link: '',
|
||||
})
|
||||
|
||||
const formattedTitle = computed(() => props.title.length > 70 ? `${props.title.slice(0, 60)}...` : props.title)
|
||||
const formattedDescription = computed(() => props.description.length > 100 ? `${props.description}...` : props.description)
|
||||
const formattedTitle = computed(() =>
|
||||
props.title.length > 70 ? `${props.title.slice(0, 60)}...` : props.title,
|
||||
)
|
||||
const formattedDescription = computed(() =>
|
||||
props.description.length > 100 ? `${props.description}...` : props.description,
|
||||
)
|
||||
const formattedLink = computed(() => {
|
||||
if (props.link.endsWith('jpg') || props.link.endsWith('png'))
|
||||
return props.link
|
||||
if (props.link.endsWith('jpg') || props.link.endsWith('png')) return props.link
|
||||
else return '/blogs-img/blog.jpg'
|
||||
})
|
||||
</script>
|
||||
@@ -39,7 +36,10 @@ const formattedLink = computed(() => {
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<g filter="url(#filter0_f_199_94966)">
|
||||
<path d="M628.5 -578L639.334 -94.4223L806.598 -548.281L659.827 -87.387L965.396 -462.344L676.925 -74.0787L1087.69 -329.501L688.776 -55.9396L1160.22 -164.149L694.095 -34.9354L1175.13 15.7948L692.306 -13.3422L1130.8 190.83L683.602 6.50012L1032.04 341.989L668.927 22.4412L889.557 452.891L649.872 32.7537L718.78 511.519L628.5 36.32L538.22 511.519L607.128 32.7537L367.443 452.891L588.073 22.4412L224.955 341.989L573.398 6.50012L126.198 190.83L564.694 -13.3422L81.8734 15.7948L562.905 -34.9354L96.7839 -164.149L568.224 -55.9396L169.314 -329.501L580.075 -74.0787L291.604 -462.344L597.173 -87.387L450.402 -548.281L617.666 -94.4223L628.5 -578Z" fill="#00DC82" />
|
||||
<path
|
||||
d="M628.5 -578L639.334 -94.4223L806.598 -548.281L659.827 -87.387L965.396 -462.344L676.925 -74.0787L1087.69 -329.501L688.776 -55.9396L1160.22 -164.149L694.095 -34.9354L1175.13 15.7948L692.306 -13.3422L1130.8 190.83L683.602 6.50012L1032.04 341.989L668.927 22.4412L889.557 452.891L649.872 32.7537L718.78 511.519L628.5 36.32L538.22 511.519L607.128 32.7537L367.443 452.891L588.073 22.4412L224.955 341.989L573.398 6.50012L126.198 190.83L564.694 -13.3422L81.8734 15.7948L562.905 -34.9354L96.7839 -164.149L568.224 -55.9396L169.314 -329.501L580.075 -74.0787L291.604 -462.344L597.173 -87.387L450.402 -548.281L617.666 -94.4223L628.5 -578Z"
|
||||
fill="#00DC82"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter
|
||||
@@ -71,7 +71,7 @@ const formattedLink = computed(() => {
|
||||
</div>
|
||||
|
||||
<div v-if="formattedLink" class="absolute top-[200px] right-[70px]">
|
||||
<img :src="formattedLink" :alt="title" class="w-96 h-52 rounded-lg object-cover">
|
||||
<img :src="formattedLink" :alt="title" class="w-96 h-52 rounded-lg object-cover" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user