update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { BlogPost } from "@/types/blog";
|
||||
import { seoData } from "~/data";
|
||||
import { formatDate } from "~/utils/helper";
|
||||
|
||||
const { path } = useRoute();
|
||||
|
||||
@@ -53,7 +54,7 @@ useHead({
|
||||
:title="data.title"
|
||||
:image="data.image"
|
||||
:alt="data.alt"
|
||||
:date="data.date"
|
||||
:date="formatDate(articles.date)"
|
||||
:description="data.description"
|
||||
:tags="data.tags" />
|
||||
<div
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<div class="relative">
|
||||
<div class="container max-w-5xl mx-auto text-zinc-600 px-4 py-8 relative z-10">
|
||||
<MainRecent />
|
||||
<MainTechInfo />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -31,8 +31,7 @@ const formattedData = computed(() => {
|
||||
description: articles.description || "no-description available",
|
||||
image: meta.image || "/blogs-img/blog.jpg",
|
||||
alt: meta.alt || "no alter data available",
|
||||
ogImage: meta.ogImage || "/blogs-img/blog.jpg",
|
||||
date: meta.date || "not-date-available",
|
||||
date: formatDate(articles.date) || "not-date-available",
|
||||
tags: meta.tags || [],
|
||||
published: meta.published || false,
|
||||
};
|
||||
@@ -65,12 +64,12 @@ defineOgImage({
|
||||
<div class="flex flex-col items-center mb-12">
|
||||
<NuxtLink
|
||||
to="/tags"
|
||||
class="flex items-center gap-2 text-sm font-bold text-violet-600 dark:text-violet-400 hover:underline mb-4">
|
||||
class="flex items-center gap-2 text-sm font-bold text-primary hover:underline mb-4">
|
||||
<Icon name="heroicons:arrow-left-20-solid" />
|
||||
Back to all tags
|
||||
</NuxtLink>
|
||||
<div class="p-3 bg-violet-500/10 rounded-2xl mb-4">
|
||||
<Icon name="fa-solid:tag" size="2.5em" class="text-violet-600 dark:text-violet-400" />
|
||||
<div class="p-3 bg-primary-10 rounded-2xl mb-4">
|
||||
<Icon name="fa-solid:tag" size="2.5em" class="text-primary" />
|
||||
</div>
|
||||
<h1
|
||||
class="text-4xl md:text-5xl font-bold text-zinc-800 dark:text-zinc-100 mb-4 tracking-tight">
|
||||
@@ -91,7 +90,6 @@ defineOgImage({
|
||||
:description="post.description"
|
||||
:image="post.image"
|
||||
:alt="post.alt"
|
||||
:og-image="post.ogImage"
|
||||
:tags="post.tags"
|
||||
:published="post.published" />
|
||||
<BlogEmpty v-if="formattedData.length === 0" />
|
||||
|
||||
@@ -41,8 +41,8 @@ defineOgImage({
|
||||
<template>
|
||||
<main class="container max-w-5xl mx-auto text-zinc-600 px-4 py-12">
|
||||
<div class="flex flex-col items-center mb-12">
|
||||
<div class="p-3 bg-violet-500/10 rounded-2xl mb-4">
|
||||
<Icon name="fa-solid:tags" size="2.5em" class="text-violet-600 dark:text-violet-400" />
|
||||
<div class="p-3 bg-primary-10 rounded-2xl mb-4">
|
||||
<Icon name="fa-solid:tags" size="2.5em" class="text-primary" />
|
||||
</div>
|
||||
<h1
|
||||
class="text-4xl md:text-5xl font-bold text-zinc-800 dark:text-zinc-100 mb-4 tracking-tight">
|
||||
@@ -60,11 +60,11 @@ defineOgImage({
|
||||
:to="`/tags/${tag.toLocaleLowerCase()}`"
|
||||
class="group relative flex items-center gap-2 px-6 py-3 rounded-2xl bg-white/40 dark:bg-slate-900/40 backdrop-blur-md border border-white/20 dark:border-white/5 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300">
|
||||
<span
|
||||
class="text-lg font-bold text-zinc-700 dark:text-zinc-200 group-hover:text-violet-600 dark:group-hover:text-violet-400 transition-colors">
|
||||
class="text-lg font-bold text-zinc-700 dark:text-zinc-200 group-text-primary transition-colors">
|
||||
#{{ tag }}
|
||||
</span>
|
||||
<span
|
||||
class="flex items-center justify-center min-w-[24px] h-6 px-1.5 rounded-full bg-violet-500/10 text-violet-600 dark:text-violet-400 text-xs font-bold border border-violet-500/20">
|
||||
class="flex items-center justify-center min-w-6 h-6 px-1.5 rounded-full bg-primary-10 text-primary dark:text-primary text-xs font-bold border border-primary">
|
||||
{{ count }}
|
||||
</span>
|
||||
</NuxtLink>
|
||||
|
||||
Reference in New Issue
Block a user