docs: fix carbon
This commit is contained in:
parent
f5b02256bc
commit
a01a1bd94d
|
|
@ -50,7 +50,7 @@ if (carbonOptions) {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.carbon-ads {
|
.carbon-ads {
|
||||||
@apply !mt-6 w-full flex justify-center items-center p-2 rounded-xl min-h-[256px] text-center leading-[18px] text-xs font-medium bg-card/50 border border-muted;
|
@apply !mt-8 w-[238px] flex justify-center items-center p-2 rounded-xl min-h-[256px] text-center leading-[18px] text-xs font-medium bg-card border border-muted;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carbon-ads :deep(img) {
|
.carbon-ads :deep(img) {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ import { shallowRef } from 'vue'
|
||||||
import CarbonAds from '../components/CarbonAds.vue'
|
import CarbonAds from '../components/CarbonAds.vue'
|
||||||
import TableOfContentTree from './TableOfContentTree.vue'
|
import TableOfContentTree from './TableOfContentTree.vue'
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
showCarbonAds?: boolean
|
||||||
|
}>()
|
||||||
|
|
||||||
const headers = shallowRef<TableOfContents>()
|
const headers = shallowRef<TableOfContents>()
|
||||||
|
|
||||||
function getHeadingsWithHierarchy(divId: string) {
|
function getHeadingsWithHierarchy(divId: string) {
|
||||||
|
|
@ -64,7 +68,7 @@ onContentUpdated(() => {
|
||||||
On This Page
|
On This Page
|
||||||
</p>
|
</p>
|
||||||
<TableOfContentTree :tree="headers" :level="1" />
|
<TableOfContentTree :tree="headers" :level="1" />
|
||||||
<CarbonAds />
|
<CarbonAds v-if="showCarbonAds" />
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import RadixIconsExternalLink from '~icons/radix-icons/external-link'
|
||||||
import { useData, useRoute } from 'vitepress'
|
import { useData, useRoute } from 'vitepress'
|
||||||
import DocsBreadcrumb from '../components/DocsBreadcrumb.vue'
|
import DocsBreadcrumb from '../components/DocsBreadcrumb.vue'
|
||||||
import EditLink from '../components/EditLink.vue'
|
import EditLink from '../components/EditLink.vue'
|
||||||
import TableOfContentVue from '../components/TableOfContent.vue'
|
import TableOfContent from '../components/TableOfContent.vue'
|
||||||
import { docsConfig } from '../config/docs'
|
import { docsConfig } from '../config/docs'
|
||||||
|
|
||||||
const $route = useRoute()
|
const $route = useRoute()
|
||||||
|
|
@ -62,7 +62,7 @@ const sourceLink = 'https://github.com/radix-vue/shadcn-vue/tree/dev/'
|
||||||
<main class="relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]">
|
<main class="relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]">
|
||||||
<div class="mx-auto w-full min-w-0">
|
<div class="mx-auto w-full min-w-0">
|
||||||
<div class="block xl:hidden">
|
<div class="block xl:hidden">
|
||||||
<TableOfContentVue />
|
<TableOfContent />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DocsBreadcrumb class="mb-4" />
|
<DocsBreadcrumb class="mb-4" />
|
||||||
|
|
@ -104,7 +104,7 @@ const sourceLink = 'https://github.com/radix-vue/shadcn-vue/tree/dev/'
|
||||||
|
|
||||||
<div class="hidden text-sm xl:block">
|
<div class="hidden text-sm xl:block">
|
||||||
<div class="sticky top-16 -mt-10 h-[calc(100vh-3.5rem)] overflow-hidden pt-6">
|
<div class="sticky top-16 -mt-10 h-[calc(100vh-3.5rem)] overflow-hidden pt-6">
|
||||||
<TableOfContentVue />
|
<TableOfContent show-carbon-ads />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user