Skip to content

Commit

Permalink
chore(docs): upgrade versions and add carbon ads
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Jan 17, 2024
1 parent 8af3bad commit 503b663
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 913 deletions.
45 changes: 45 additions & 0 deletions docs/components/AdsCarbon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script setup lang="ts">
const carbonads = ref(null)
onMounted(() => {
if (carbonads.value) {
const script = document.createElement('script')
script.setAttribute('type', 'text/javascript')
script.setAttribute('src', 'https://cdn.carbonads.com/carbon.js?serve=CWYIPK7M&placement=imagenuxtcom')
script.setAttribute('id', '_carbonads_js')
carbonads.value.appendChild(script)
}
})
</script>

<template>
<div ref="carbonads" class="carbon" />
</template>

<style lang="postcss">
.carbon > #carbonads {
@apply relative border border-gray-200 dark:border-gray-800 rounded-lg bg-white dark:bg-gray-800/50 hover:border-gray-300 dark:hover:border-gray-700 w-full transition-colors min-h-[220px];
&:hover {
.carbon-text {
@apply text-gray-700 dark:text-gray-200;
}
}
.carbon-img {
@apply flex justify-center p-2 w-full;
& > img {
@apply !max-w-full w-full rounded;
}
}
.carbon-text {
@apply flex px-2 text-sm text-gray-500 dark:text-gray-400 transition-colors text-center w-full;
}
.carbon-poweredby {
@apply block text-xs text-center text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 pt-1 pb-2 px-2 transition-colors;
}
}
</style>
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"dependencies": {
"@iconify-json/ph": "^1.1.10",
"@iconify-json/simple-icons": "^1.1.88",
"@nuxt/content": "^2.9.0",
"@nuxt/content": "^2.10.0",
"@nuxt/image": "link:..",
"@nuxt/ui-pro": "^0.5.0",
"@nuxthq/studio": "^1.0.5",
"@nuxt/ui-pro": "npm:@nuxt/ui-pro-edge@latest",
"@nuxthq/studio": "^1.0.6",
"@nuxtjs/fontaine": "^0.4.1",
"@nuxtjs/google-fonts": "^3.1.3",
"@nuxtjs/plausible": "^0.2.4",
Expand Down
4 changes: 3 additions & 1 deletion docs/pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ const communityLinks = computed(() => [
<UDocsToc :links="page.body.toc.links">
<template #bottom>
<div class="hidden lg:block space-y-6 !mt-6">
<UDivider v-if="page.body?.toc?.links?.length" dashed />
<UDivider v-if="page.body?.toc?.links?.length" type="dashed" />
<UPageLinks title="Community" :links="communityLinks" />
<UDivider type="dashed" />
<AdsCarbon />
</div>
</template>
</UDocsToc>
Expand Down
Loading

0 comments on commit 503b663

Please sign in to comment.