add category page

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2023-01-08 21:35:59 +06:00
parent 2566623128
commit 306a0e001f
6 changed files with 729 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div>
{{ $route.params }}
<h1>Categories</h1>
</div>
</template>

View File

@@ -1,3 +1,35 @@
<script lang="ts" setup>
useHead({
title: 'Home',
meta: [
{
name: 'description',
content: 'Home',
},
],
titleTemplate: "Elon's Blog - %s",
})
const { data } = await useAsyncData('home', () => queryContent('/blogs').find())
let ar = [
'javascript',
'typescript',
'git',
'docker',
'kubernetes',
'vue',
'nuxt',
'pinia',
'cypress',
]
</script>
<template>
<div>All categories will be here</div>
<main class="container max-w-5xl mx-auto text-zinc-600">
<CategoryHero />
<div class="flex flex-wrap px-6 mt-12 gap-3">
<template v-for="n in ar" :key="n">
<CategoryCard :title="n" />
</template>
</div>
</main>
</template>