Merge pull request #9 from nurRiyad/v2
Remove Cloudenary as nuxt img provider and used local img
This commit is contained in:
@@ -7,7 +7,6 @@ interface Props {
|
|||||||
image: string
|
image: string
|
||||||
alt: string
|
alt: string
|
||||||
ogImage: string
|
ogImage: string
|
||||||
provider: string
|
|
||||||
tags: Array<string>
|
tags: Array<string>
|
||||||
published: boolean
|
published: boolean
|
||||||
}
|
}
|
||||||
@@ -20,19 +19,17 @@ withDefaults(defineProps<Props>(), {
|
|||||||
image: '/nuxt-blog/no-image_cyyits.png',
|
image: '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: 'no-alt',
|
alt: 'no-alt',
|
||||||
ogImage: '/nuxt-blog/no-image_cyyits.png',
|
ogImage: '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: 'cloudinary',
|
|
||||||
tags: () => [],
|
tags: () => [],
|
||||||
published: false,
|
published: false,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<article class="group border m-2 rounded-2xl overflow-hidden shadow-md text-zinc-700">
|
<article class="group border m-2 rounded-2xl overflow-hidden shadow-sm text-zinc-700">
|
||||||
<NuxtLink :to="path" class="grid grid-cols-1 sm:grid-cols-10 gap-1">
|
<NuxtLink :to="path" class="grid grid-cols-1 sm:grid-cols-10 gap-1">
|
||||||
<div class="sm:col-span-3">
|
<div class="sm:col-span-3">
|
||||||
<NuxtImg
|
<NuxtImg
|
||||||
class="h-full w-full object-cover object-center rounded-t-2xl sm:rounded-l-2xl sm:rounded-t-none shadow-lg group-hover:scale-[1.02] transition-all duration-500"
|
class="h-full w-full object-cover object-center rounded-t-2xl sm:rounded-l-2xl sm:rounded-t-none shadow-lg group-hover:scale-[1.02] transition-all duration-500"
|
||||||
:provider="provider"
|
|
||||||
:src="image"
|
:src="image"
|
||||||
:alt="alt"
|
:alt="alt"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ interface Props {
|
|||||||
image: string
|
image: string
|
||||||
alt: string
|
alt: string
|
||||||
ogImage: string
|
ogImage: string
|
||||||
provider: string
|
|
||||||
tags: Array<string>
|
tags: Array<string>
|
||||||
published: boolean
|
published: boolean
|
||||||
}
|
}
|
||||||
@@ -20,17 +19,15 @@ withDefaults(defineProps<Props>(), {
|
|||||||
image: '/nuxt-blog/no-image_cyyits.png',
|
image: '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: 'no-alt',
|
alt: 'no-alt',
|
||||||
ogImage: '/nuxt-blog/no-image_cyyits.png',
|
ogImage: '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: 'cloudinary',
|
|
||||||
tags: () => [],
|
tags: () => [],
|
||||||
published: false,
|
published: false,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<article class="group border m-2 overflow-hidden rounded-2xl shadow-md text-zinc-700">
|
<article class="group border m-2 overflow-hidden rounded-2xl shadow-sm text-zinc-700">
|
||||||
<NuxtLink :to="path">
|
<NuxtLink :to="path">
|
||||||
<NuxtImg
|
<NuxtImg
|
||||||
:provider="provider"
|
|
||||||
class="lg:h-48 md:h-36 w-full object-cover object-center rounded-t-2xl shadow-lg group-hover:scale-[1.02] transition-all duration-500"
|
class="lg:h-48 md:h-36 w-full object-cover object-center rounded-t-2xl shadow-lg group-hover:scale-[1.02] transition-all duration-500"
|
||||||
:src="image"
|
:src="image"
|
||||||
:alt="alt"
|
:alt="alt"
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const formatedData = computed(() => {
|
|||||||
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: articles.alt || 'no alter data available',
|
alt: articles.alt || 'no alter data available',
|
||||||
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: articles.provider,
|
|
||||||
date: articles.date || 'not-date-available',
|
date: articles.date || 'not-date-available',
|
||||||
tags: articles.tags || [],
|
tags: articles.tags || [],
|
||||||
published: articles.published || false,
|
published: articles.published || false,
|
||||||
@@ -39,9 +38,9 @@ useHead({
|
|||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<div class="flex flex-row items-center space-x-3 pt-5 pb-3">
|
<div class="flex flex-row items-center space-x-3 pt-5 pb-3">
|
||||||
<Icon name="mdi:star-three-points-outline" size="2em" class="text-black" />
|
<Icon name="mdi:star-three-points-outline" size="2em" class="text-black" />
|
||||||
<h3 class="text-4xl font-semibold text-black ">
|
<h2 class="text-4xl font-semibold text-black ">
|
||||||
Recent Post
|
Recent Post
|
||||||
</h3>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
|
||||||
@@ -54,7 +53,6 @@ useHead({
|
|||||||
:image="post.image"
|
:image="post.image"
|
||||||
:alt="post.alt"
|
:alt="post.alt"
|
||||||
:og-image="post.ogImage"
|
:og-image="post.ogImage"
|
||||||
:provider="post.provider"
|
|
||||||
:tags="post.tags"
|
:tags="post.tags"
|
||||||
:published="post.published"
|
:published="post.published"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const formatedData = computed(() => {
|
|||||||
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: articles.alt || 'no alter data available',
|
alt: articles.alt || 'no alter data available',
|
||||||
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: articles.provider,
|
|
||||||
date: articles.date || 'not-date-available',
|
date: articles.date || 'not-date-available',
|
||||||
tags: articles.tags || [],
|
tags: articles.tags || [],
|
||||||
published: articles.published || false,
|
published: articles.published || false,
|
||||||
@@ -39,9 +38,9 @@ useHead({
|
|||||||
<div class="px-6">
|
<div class="px-6">
|
||||||
<div class="flex flex-row items-center space-x-3 pt-5 pb-3">
|
<div class="flex flex-row items-center space-x-3 pt-5 pb-3">
|
||||||
<Icon name="mdi:star-three-points-outline" size="2em" class="text-black" />
|
<Icon name="mdi:star-three-points-outline" size="2em" class="text-black" />
|
||||||
<h3 class="text-4xl font-semibold text-black ">
|
<h2 class="text-4xl font-semibold text-black ">
|
||||||
Trending Post
|
Trending Post
|
||||||
</h3>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-1 ">
|
<div class="grid grid-cols-1 ">
|
||||||
@@ -54,7 +53,6 @@ useHead({
|
|||||||
:image="post.image"
|
:image="post.image"
|
||||||
:alt="post.alt"
|
:alt="post.alt"
|
||||||
:og-image="post.ogImage"
|
:og-image="post.ogImage"
|
||||||
:provider="post.provider"
|
|
||||||
:tags="post.tags"
|
:tags="post.tags"
|
||||||
:published="post.published"
|
:published="post.published"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
title: How To Connect You Namecheap Domain With Vercel Deployed App
|
title: How To Connect You Namecheap Domain With Vercel Deployed App
|
||||||
date: 1st Mar 2023
|
date: 1st Mar 2023
|
||||||
description: Here you will lean how to connect your namecheap domain to vercel deployed app.
|
description: Here you will lean how to connect your namecheap domain to vercel deployed app.
|
||||||
image: /nuxt-blog/pexels-photo-1779487_fnvw1l.jpg
|
image: /blogs-img/blog1.jpg
|
||||||
alt: How To Connect You Namecheap Domain With Vercel Deployed App
|
alt: How To Connect You Namecheap Domain With Vercel Deployed App
|
||||||
ogImage: https://res.cloudinary.com/dmecmyphj/image/upload/v1673369821/cld-sample-3.jpg
|
ogImage: /blog-img/blog1.jpg
|
||||||
provider: cloudinary
|
|
||||||
tags: ['namecheap', 'vercel']
|
tags: ['namecheap', 'vercel']
|
||||||
published: true
|
published: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
title: How To Fix TailwindCSS Intellisense In Nuxt3 Project
|
title: How To Fix TailwindCSS Intellisense In Nuxt3 Project
|
||||||
date: 26th Jan 2023
|
date: 26th Jan 2023
|
||||||
description: In Nuxt3 project tailwind css intellisense doesn't seems to work properly. In this blog I will share a workaround to fix this issue.
|
description: In Nuxt3 project tailwind css intellisense doesn't seems to work properly. In this blog I will share a workaround to fix this issue.
|
||||||
image: /nuxt-blog/pexels-photo-157040_gwfamn.jpg
|
image: /blogs-img/blog2.jpg
|
||||||
alt: Hwo to fix tailwind intellisense in nuxt3 project
|
alt: Hwo to fix tailwind intellisense in nuxt3 project
|
||||||
ogImage: /nuxt-blog/pexels-photo-157040_gwfamn.jpg
|
ogImage: /blogs-img/blog2.jpg
|
||||||
provider: cloudinary
|
|
||||||
tags: ['nuxt', 'tailwindcss']
|
tags: ['nuxt', 'tailwindcss']
|
||||||
published: true
|
published: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
title: How To Create Namespace Subdomain & Connect To Vercel App
|
title: How To Create Namespace Subdomain & Connect To Vercel App
|
||||||
date: 1st Mar 2023
|
date: 1st Mar 2023
|
||||||
description: Here we will learn, How To Create Namespace Subdomain & Connect To Vercel App
|
description: Here we will learn, How To Create Namespace Subdomain & Connect To Vercel App
|
||||||
image: /nuxt-blog/pexels-photo-4523062_zeiadq.jpg
|
image: /blogs-img/blog3.jpg
|
||||||
alt: How To Create Namespace Subdomain & Connect To Vercel App
|
alt: How To Create Namespace Subdomain & Connect To Vercel App
|
||||||
ogImage: /nuxt-blog/pexels-photo-4523062_zeiadq.jpg
|
ogImage: /blogs-img/blog3.jpg
|
||||||
provider: cloudinary
|
|
||||||
tags: ['nuxt', 'vercel', 'namecheap']
|
tags: ['nuxt', 'vercel', 'namecheap']
|
||||||
published: true
|
published: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
title: How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
|
title: How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
|
||||||
date: 1st Mar 2023
|
date: 1st Mar 2023
|
||||||
description: Here we will learn How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
|
description: Here we will learn How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
|
||||||
image: /nuxt-blog/pexels-photo-1036936_osvoac.jpg
|
image: /blogs-img/blog4.jpg
|
||||||
alt: How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
|
alt: How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
|
||||||
ogImage: /nuxt-blog/pexels-photo-1036936_osvoac.jpg
|
ogImage: /blogs-img/blog4.jpg
|
||||||
provider: cloudinary
|
|
||||||
tags: ['nuxt', 'nuxt-content']
|
tags: ['nuxt', 'nuxt-content']
|
||||||
published: true
|
published: true
|
||||||
---
|
---
|
||||||
@@ -18,6 +17,7 @@ Nuxt.js is a popular open-source framework for building Vue.js applications. Wit
|
|||||||
|
|
||||||
The first step is to install the necessary dependencies for Nuxt Content v2. To do this, run the following command:
|
The first step is to install the necessary dependencies for Nuxt Content v2. To do this, run the following command:
|
||||||
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
npm install @nuxt/content@next
|
npm install @nuxt/content@next
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,9 @@
|
|||||||
title: Some Awesome Libraries For Vue3
|
title: Some Awesome Libraries For Vue3
|
||||||
date: 1st Jan 2023
|
date: 1st Jan 2023
|
||||||
description: Vue.js is a popular JavaScript framework for building web applications. In this blog post, we will introduce you to some of the awesome libraries for Vue.js in different categories.
|
description: Vue.js is a popular JavaScript framework for building web applications. In this blog post, we will introduce you to some of the awesome libraries for Vue.js in different categories.
|
||||||
image: /nuxt-blog/pexels-photo-3379934_qjpfp3.jpg
|
image: /blogs-img/blog5.jpg
|
||||||
alt: Some Awesome Libraries For Vue3
|
alt: Some Awesome Libraries For Vue3
|
||||||
ogImage: /nuxt-blog/pexels-photo-3379934_qjpfp3.jpg
|
ogImage: /blogs-img/blog5.jpg
|
||||||
provider: cloudinary
|
|
||||||
tags: ['vue',"javascript"]
|
tags: ['vue',"javascript"]
|
||||||
published: true
|
published: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -30,10 +30,4 @@ export default defineNuxtConfig({
|
|||||||
theme: 'dracula',
|
theme: 'dracula',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
image: {
|
|
||||||
cloudinary: {
|
|
||||||
baseURL: 'https://res.cloudinary.com/dmecmyphj/image/upload/v1673372476/',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ const data = computed<BlogPost>(() => {
|
|||||||
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: articles.alt || 'no alter data available',
|
alt: articles.alt || 'no alter data available',
|
||||||
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: articles.provider || 'cloudinary',
|
|
||||||
date: articles.date || 'not-date-available',
|
date: articles.date || 'not-date-available',
|
||||||
tags: articles.tags || [],
|
tags: articles.tags || [],
|
||||||
published: articles.published || false,
|
published: articles.published || false,
|
||||||
@@ -81,7 +80,6 @@ useHead({
|
|||||||
{{ data.title || '' }}
|
{{ data.title || '' }}
|
||||||
</h1>
|
</h1>
|
||||||
<NuxtImg
|
<NuxtImg
|
||||||
:provider="data.provider"
|
|
||||||
:src="data.image || ''"
|
:src="data.image || ''"
|
||||||
:alt="data.alt || ''"
|
:alt="data.alt || ''"
|
||||||
class="m-auto rounded-2xl shadow-lg h-52 md:h-96 w-4/5 content-center object-cover"
|
class="m-auto rounded-2xl shadow-lg h-52 md:h-96 w-4/5 content-center object-cover"
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ const formatedData = computed(() => {
|
|||||||
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: articles.alt || 'no alter data available',
|
alt: articles.alt || 'no alter data available',
|
||||||
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: articles.provider,
|
|
||||||
date: articles.date || 'not-date-available',
|
date: articles.date || 'not-date-available',
|
||||||
tags: articles.tags || [],
|
tags: articles.tags || [],
|
||||||
published: articles.published || false,
|
published: articles.published || false,
|
||||||
@@ -43,7 +42,6 @@ useHead({
|
|||||||
:image="post.image"
|
:image="post.image"
|
||||||
:alt="post.alt"
|
:alt="post.alt"
|
||||||
:og-image="post.ogImage"
|
:og-image="post.ogImage"
|
||||||
:provider="post.provider"
|
|
||||||
:tags="post.tags"
|
:tags="post.tags"
|
||||||
:published="post.published"
|
:published="post.published"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ const formatedData = computed(() => {
|
|||||||
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
image: articles.image || '/nuxt-blog/no-image_cyyits.png',
|
||||||
alt: articles.alt || 'no alter data available',
|
alt: articles.alt || 'no alter data available',
|
||||||
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
|
||||||
provider: articles.provider,
|
|
||||||
date: articles.date || 'not-date-available',
|
date: articles.date || 'not-date-available',
|
||||||
tags: articles.tags || [],
|
tags: articles.tags || [],
|
||||||
published: articles.published || false,
|
published: articles.published || false,
|
||||||
@@ -60,7 +59,6 @@ useHead({
|
|||||||
:image="post.image"
|
:image="post.image"
|
||||||
:alt="post.alt"
|
:alt="post.alt"
|
||||||
:og-image="post.ogImage"
|
:og-image="post.ogImage"
|
||||||
:provider="post.provider"
|
|
||||||
:tags="post.tags"
|
:tags="post.tags"
|
||||||
:published="post.published"
|
:published="post.published"
|
||||||
/>
|
/>
|
||||||
|
|||||||
BIN
public/blogs-img/blog1.jpg
Normal file
BIN
public/blogs-img/blog1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
public/blogs-img/blog2.jpg
Normal file
BIN
public/blogs-img/blog2.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
BIN
public/blogs-img/blog3.jpg
Normal file
BIN
public/blogs-img/blog3.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
public/blogs-img/blog4.jpg
Normal file
BIN
public/blogs-img/blog4.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
BIN
public/blogs-img/blog5.jpg
Normal file
BIN
public/blogs-img/blog5.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -5,7 +5,6 @@ export interface BlogPost {
|
|||||||
image: string
|
image: string
|
||||||
alt: string
|
alt: string
|
||||||
ogImage: string
|
ogImage: string
|
||||||
provider: string
|
|
||||||
tags: string[]
|
tags: string[]
|
||||||
published: boolean
|
published: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user