Files
admin/www/app/components/section/layouts/LayoutQuote.vue
T
2026-08-05 18:36:01 +08:00

24 lines
977 B
Vue

<script setup lang="ts">
import type { SectionBlock } from '~/types/site';
const props = defineProps<{ section: SectionBlock }>();
// 引言评价:正文 content 作为引用语,subtitle 作为作者/出处
const { content, subtitle, isDark, titleStyle, bodyStyle } = useSectionContent(props.section);
</script>
<template>
<div class="section-container py-[var(--sec-py,96px)] flex-col-center text-center max-w-800px">
<span class="text-6xl leading-none font-serif" :class="isDark ? 'text-primary-300' : 'text-primary'"></span>
<blockquote
class="rich-text mt-8px text-2xl md:text-3xl font-medium leading-relaxed"
:class="isDark ? 'text-white' : 'text-gray-900 dark:text-white'"
:style="titleStyle"
v-html="content"
/>
<p v-if="subtitle" class="mt-24px text-sm tracking-wide" :class="isDark ? 'text-gray-400' : 'text-gray-500 dark:text-gray-400'" :style="bodyStyle">
—— {{ subtitle }}
</p>
</div>
</template>