refactor: refactoring project structure and components, optimizing internationalization and page presentation

This commit is contained in:
radishzzz 2025-03-08 21:38:08 +00:00
parent 6674cb7072
commit d6cff842e1
37 changed files with 156 additions and 146 deletions

View file

@ -2,7 +2,7 @@
import Comments from '@/components/Comments/index.astro'
import Layout from '@/layouts/Layout.astro'
import { checkSlugDuplication } from '@/utils/content'
import { generatePostPaths } from '@/utils/i18n'
import { generatePostPaths } from '@/utils/i18n/route'
import { getCollection } from 'astro:content'
export async function getStaticPaths() {
@ -53,12 +53,12 @@ const { Content, remarkPluginFrontmatter } = await post.render()
<!-- Tags -->
{post.data.tags && post.data.tags.length > 0 && (
<div class="mb-16">
<div class="h-0.25 w-10 bg-secondary opacity-25"></div>
<div class="mt-4.375 w-95% flex flex-wrap gap-x-3 gap-y-3.6">
<div class="uno-decorative-line"></div>
<div class="uno-tags-wrapper">
{post.data.tags.map(tag => (
<a
href={`/tags/${tag}/`}
class="inline-block whitespace-nowrap border border-secondary/25 rounded-full px-3.2 py-0.7 c-secondary transition-colors hover:(border-secondary text-primary)"
class="uno-tags-style"
>
{tag}
</a>