사이트 광고 슬롯 설정 추가
This commit is contained in:
@@ -15,6 +15,9 @@ const { data: tags } = await useFetch('/api/tags', {
|
||||
const { data: posts } = await useFetch('/api/posts', {
|
||||
default: () => []
|
||||
})
|
||||
const { data: siteSettings } = await useFetch('/api/site-settings', {
|
||||
default: () => ({})
|
||||
})
|
||||
const postToc = useState('post-detail-toc', () => [])
|
||||
|
||||
if (!post.value) {
|
||||
@@ -338,9 +341,19 @@ useHead(() => ({
|
||||
|
||||
<section>
|
||||
<div class="mx-auto max-w-[720px] px-4 sm:px-5">
|
||||
<SiteAdSlot
|
||||
class="post-detail__ad-slot post-detail__ad-slot--top mb-8"
|
||||
:code="siteSettings?.adPostTopCode"
|
||||
location="post-top"
|
||||
/>
|
||||
<ContentRenderer>
|
||||
<ContentMarkdownRenderer class="post-detail__content" :content="post.content" />
|
||||
</ContentRenderer>
|
||||
<SiteAdSlot
|
||||
class="post-detail__ad-slot post-detail__ad-slot--bottom mt-8"
|
||||
:code="siteSettings?.adPostBottomCode"
|
||||
location="post-bottom"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user