remove await and resize img
Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
@@ -3,9 +3,7 @@ definePageMeta({
|
||||
layout: "list",
|
||||
});
|
||||
|
||||
const { data, pending } = await useLazyAsyncData("blogs", () =>
|
||||
queryContent("/").find()
|
||||
);
|
||||
const { data } = useLazyAsyncData("blogs", () => queryContent("/").find());
|
||||
|
||||
const getAllPost = computed(() => {
|
||||
const allpost = data.value || [];
|
||||
@@ -30,12 +28,7 @@ const getAllPost = computed(() => {
|
||||
<div
|
||||
class="container mx-auto max-w-6xl font-ibmmono antialiased min-h-[72vh]"
|
||||
>
|
||||
<div v-if="pending">
|
||||
<template v-for="n in 5" :key="n">
|
||||
<archive-card-loader />
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>
|
||||
<template v-for="pp in getAllPost" :key="pp">
|
||||
<archiev-card
|
||||
:title="pp.title"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
const { data, pending } = await useLazyAsyncData("index", () =>
|
||||
queryContent("/").find()
|
||||
);
|
||||
const { data } = useLazyAsyncData("index", () => queryContent("/").find());
|
||||
|
||||
// get all the unique types from content
|
||||
const getTopCategory = computed(() => {
|
||||
@@ -37,14 +35,7 @@ const getRecentContent = computed(() => {
|
||||
<div
|
||||
class="container px-4 mx-auto max-w-6xl flex font-ibmmono gap-14 antialiased min-h-[72vh]"
|
||||
>
|
||||
<div v-if="pending">
|
||||
<h1>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minima
|
||||
accusamus maxime optio neque praesentium! Id ipsa deleniti vero magni
|
||||
expedita?
|
||||
</h1>
|
||||
</div>
|
||||
<div v-else class="flex-1">
|
||||
<div class="flex-1">
|
||||
<h1 class="text-xl pb-8 text-[#e60067]">RECENTLY PUBLISHED</h1>
|
||||
<div class="space-y-8">
|
||||
<template v-for="rp in getRecentContent" :key="rp">
|
||||
@@ -58,13 +49,8 @@ const getRecentContent = computed(() => {
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pending">
|
||||
<h1>
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit. Magnam labore
|
||||
accusamus sit distinctio fugit commodi quam debitis ratione alias illum?
|
||||
</h1>
|
||||
</div>
|
||||
<div v-else class="basis-1/4">
|
||||
|
||||
<div class="basis-1/4">
|
||||
<div>
|
||||
<h2 class="text-xl pb-8 text-[#e60067]">TOP CATEGORIES</h2>
|
||||
<template v-for="cat in getTopCategory" :key="cat">
|
||||
|
||||
@@ -8,7 +8,7 @@ const route = useRoute();
|
||||
const routeType = computed(() => {
|
||||
return route.params.topic || "";
|
||||
});
|
||||
const { data } = await useLazyAsyncData("topic", () =>
|
||||
const { data } = useLazyAsyncData("topic", () =>
|
||||
queryContent(`/${routeType.value}`).find()
|
||||
);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
definePageMeta({
|
||||
layout: "list",
|
||||
});
|
||||
const { data } = await useLazyAsyncData("tags", () => queryContent("/").find());
|
||||
const { data } = useLazyAsyncData("tags", () => queryContent("/").find());
|
||||
|
||||
const getTopCategory = computed(() => {
|
||||
const allpost = data.value || [];
|
||||
|
||||
Reference in New Issue
Block a user