补充内容
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
const posts = await getCollection('docs');
|
||||
console.log('post', posts);
|
||||
import { basename } from '@/modules/basename';
|
||||
import Blank from '@/layouts/blank.astro';
|
||||
---
|
||||
@@ -28,7 +27,7 @@ import Blank from '@/layouts/blank.astro';
|
||||
<article class='group bg-white dark:bg-slate-800 rounded-xl shadow-sm hover:shadow-xl transition-all duration-300 overflow-hidden border border-slate-200 dark:border-slate-700 hover:border-blue-500 dark:hover:border-blue-400'>
|
||||
<div class='p-6'>
|
||||
{/* 文档标题 */}
|
||||
<a href={`${basename}/docs/${post.id}`} class='block'>
|
||||
<a href={`${basename}/docs/${post.id}/`} class='block'>
|
||||
<h2 class='text-xl sm:text-2xl font-semibold text-slate-900 dark:text-white group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors duration-200 mb-3'>
|
||||
{post.data.title}
|
||||
</h2>
|
||||
@@ -51,7 +50,7 @@ import Blank from '@/layouts/blank.astro';
|
||||
|
||||
{/* 阅读更多指示器 */}
|
||||
<a
|
||||
href={`${basename}/docs/${post.id}`}
|
||||
href={`${basename}/docs/${post.id}/`}
|
||||
class='mt-4 flex items-center text-blue-600 dark:text-blue-400 text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity duration-200'>
|
||||
<span>阅读更多</span>
|
||||
<svg
|
||||
|
||||
Reference in New Issue
Block a user