fix(theme): spacing between aside sponsors and ads section is missing

pull/1811/head
Kia King Ishii 2 years ago
parent 94e6366c96
commit 5c2eb1b3b0

@ -1,13 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import { defineAsyncComponent } from 'vue'
import { useData } from '../composables/data.js' import { useData } from '../composables/data.js'
import VPDocAsideOutline from './VPDocAsideOutline.vue' import VPDocAsideOutline from './VPDocAsideOutline.vue'
import VPDocAsideCarbonAds from './VPDocAsideCarbonAds.vue'
const { theme } = useData() const { theme } = useData()
const VPCarbonAds = __CARBON__
? defineAsyncComponent(() => import('./VPCarbonAds.vue'))
: () => null
</script> </script>
<template> <template>
@ -21,7 +17,7 @@ const VPCarbonAds = __CARBON__
<div class="spacer" /> <div class="spacer" />
<slot name="aside-ads-before" /> <slot name="aside-ads-before" />
<VPCarbonAds v-if="theme.carbonAds" :carbonAds="theme.carbonAds" /> <VPDocAsideCarbonAds v-if="theme.carbonAds" :carbon-ads="theme.carbonAds" />
<slot name="aside-ads-after" /> <slot name="aside-ads-after" />
<slot name="aside-bottom" /> <slot name="aside-bottom" />

@ -0,0 +1,18 @@
<script setup lang="ts">
import { defineAsyncComponent } from 'vue'
import type { DefaultTheme } from 'vitepress/theme'
defineProps<{
carbonAds: DefaultTheme.CarbonAdsOptions
}>()
const VPCarbonAds = __CARBON__
? defineAsyncComponent(() => import('./VPCarbonAds.vue'))
: () => null
</script>
<template>
<div class="VPDocAsideCarbonAds">
<VPCarbonAds :carbon-ads="carbonAds" />
</div>
</template>
Loading…
Cancel
Save