remove await and resize img

Signed-off-by: nurRiyad <asadnurriyad@gmail.com>
This commit is contained in:
nurRiyad
2022-12-22 03:14:50 +06:00
parent bc5a4b730d
commit 25b94a6859
9 changed files with 11 additions and 32 deletions

View File

@@ -4,9 +4,9 @@ useHead({
lang: "en", lang: "en",
}, },
title: "", title: "",
titleTemplate: "%s riyad", titleTemplate: "%s",
meta: [ meta: [
{ name: "description", content: "Al Asad Nur riyad" }, { name: "description", content: "Al Asad Nur riyad's Personal Blog Site" },
{ name: "twitter:card", content: "summary_large_image" }, { name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:site", content: "@nuxt_js" }, { name: "twitter:site", content: "@nuxt_js" },
{ name: "twitter:creator", content: "@nuxt_js" }, { name: "twitter:creator", content: "@nuxt_js" },
@@ -37,7 +37,7 @@ useHead({
/* Layout Transition */ /* Layout Transition */
.layout-enter-active, .layout-enter-active,
.layout-leave-active { .layout-leave-active {
transition: all 0.3s; transition: all 0.4s;
} }
.layout-enter-from, .layout-enter-from,
.layout-leave-to { .layout-leave-to {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

View File

@@ -3,9 +3,7 @@ definePageMeta({
layout: "list", layout: "list",
}); });
const { data, pending } = await useLazyAsyncData("blogs", () => const { data } = useLazyAsyncData("blogs", () => queryContent("/").find());
queryContent("/").find()
);
const getAllPost = computed(() => { const getAllPost = computed(() => {
const allpost = data.value || []; const allpost = data.value || [];
@@ -30,12 +28,7 @@ const getAllPost = computed(() => {
<div <div
class="container mx-auto max-w-6xl font-ibmmono antialiased min-h-[72vh]" class="container mx-auto max-w-6xl font-ibmmono antialiased min-h-[72vh]"
> >
<div v-if="pending"> <div>
<template v-for="n in 5" :key="n">
<archive-card-loader />
</template>
</div>
<div v-else>
<template v-for="pp in getAllPost" :key="pp"> <template v-for="pp in getAllPost" :key="pp">
<archiev-card <archiev-card
:title="pp.title" :title="pp.title"

View File

@@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
const { data, pending } = await useLazyAsyncData("index", () => const { data } = useLazyAsyncData("index", () => queryContent("/").find());
queryContent("/").find()
);
// get all the unique types from content // get all the unique types from content
const getTopCategory = computed(() => { const getTopCategory = computed(() => {
@@ -37,14 +35,7 @@ const getRecentContent = computed(() => {
<div <div
class="container px-4 mx-auto max-w-6xl flex font-ibmmono gap-14 antialiased min-h-[72vh]" class="container px-4 mx-auto max-w-6xl flex font-ibmmono gap-14 antialiased min-h-[72vh]"
> >
<div v-if="pending"> <div class="flex-1">
<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">
<h1 class="text-xl pb-8 text-[#e60067]">RECENTLY PUBLISHED</h1> <h1 class="text-xl pb-8 text-[#e60067]">RECENTLY PUBLISHED</h1>
<div class="space-y-8"> <div class="space-y-8">
<template v-for="rp in getRecentContent" :key="rp"> <template v-for="rp in getRecentContent" :key="rp">
@@ -58,13 +49,8 @@ const getRecentContent = computed(() => {
</template> </template>
</div> </div>
</div> </div>
<div v-if="pending">
<h1> <div class="basis-1/4">
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> <div>
<h2 class="text-xl pb-8 text-[#e60067]">TOP CATEGORIES</h2> <h2 class="text-xl pb-8 text-[#e60067]">TOP CATEGORIES</h2>
<template v-for="cat in getTopCategory" :key="cat"> <template v-for="cat in getTopCategory" :key="cat">

View File

@@ -8,7 +8,7 @@ const route = useRoute();
const routeType = computed(() => { const routeType = computed(() => {
return route.params.topic || ""; return route.params.topic || "";
}); });
const { data } = await useLazyAsyncData("topic", () => const { data } = useLazyAsyncData("topic", () =>
queryContent(`/${routeType.value}`).find() queryContent(`/${routeType.value}`).find()
); );

View File

@@ -2,7 +2,7 @@
definePageMeta({ definePageMeta({
layout: "list", layout: "list",
}); });
const { data } = await useLazyAsyncData("tags", () => queryContent("/").find()); const { data } = useLazyAsyncData("tags", () => queryContent("/").find());
const getTopCategory = computed(() => { const getTopCategory = computed(() => {
const allpost = data.value || []; const allpost = data.value || [];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 20 KiB