diff --git a/src/components/CommentSection.vue b/src/components/CommentSection.vue index c03ec44..d145c64 100644 --- a/src/components/CommentSection.vue +++ b/src/components/CommentSection.vue @@ -1,7 +1,7 @@ @@ -410,7 +937,9 @@ onMounted(() => { } .comment-content :deep(img) { - @apply max-w-full rounded-lg my-2; + @apply max-w-full rounded-lg my-2 cursor-pointer hover:opacity-90 transition-opacity; + max-height: 400px; + object-fit: contain; } .comment-content :deep(table) { @@ -425,4 +954,25 @@ onMounted(() => { .comment-content :deep(th) { @apply bg-gray-100 dark:bg-gray-800 font-bold; } + +/* 灯箱过渡动画 */ +.lightbox-enter-active, +.lightbox-leave-active { + transition: opacity 0.3s ease; +} + +.lightbox-enter-active img, +.lightbox-leave-active img { + transition: transform 0.3s ease; +} + +.lightbox-enter-from, +.lightbox-leave-to { + opacity: 0; +} + +.lightbox-enter-from img, +.lightbox-leave-to img { + transform: scale(0.9); +} diff --git a/src/content/config.ts b/src/content/config.ts index 527a5c4..894dae3 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -22,19 +22,6 @@ const blogCollection = defineCollection({ }), }); -// 页面集合 (如关于页面等) -const pagesCollection = defineCollection({ - type: 'content', - schema: z.object({ - title: z.string(), - description: z.string().optional(), - layout: z.string().optional(), - showInNav: z.boolean().default(false), - order: z.number().default(0), - }), -}); - export const collections = { blog: blogCollection, - pages: pagesCollection, }; \ No newline at end of file