Skip to content

Commit 175c702

Browse files
committed
docs(app): put back carbon ads
1 parent cc504b8 commit 175c702

File tree

2 files changed

+51
-23
lines changed

2 files changed

+51
-23
lines changed

docs/app/components/AdsCarbon.vue

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<script setup lang="ts">
2+
const el = ref<HTMLDivElement | null>(null)
3+
4+
onMounted(() => {
5+
if (!el.value) {
6+
return
7+
}
8+
9+
const script = document.createElement('script')
10+
script.setAttribute('type', 'text/javascript')
11+
script.setAttribute('src', 'https://cdn.carbonads.com/carbon.js?serve=CWYIVK3E&placement=uinuxtcom')
12+
script.setAttribute('id', '_carbonads_js')
13+
14+
el.value?.appendChild(script)
15+
})
16+
</script>
17+
18+
<template>
19+
<div ref="el" class="carbon" />
20+
</template>
21+
22+
<style scoped>
23+
@reference "../assets/css/main.css";
24+
25+
.carbon :deep(#carbonads) {
26+
@apply relative border border-(--ui-border) rounded-[calc(var(--ui-radius)*1.5)] hover:bg-(--ui-bg-elevated)/50 w-full transition-colors min-h-[220px] p-2;
27+
28+
.carbon-img {
29+
@apply flex justify-center w-full;
30+
31+
& > img {
32+
@apply !max-w-full w-full rounded-(--ui-radius);
33+
}
34+
}
35+
36+
.carbon-text {
37+
@apply text-sm text-(--ui-text-muted) transition-colors text-center text-pretty flex pt-2;
38+
}
39+
40+
.carbon-poweredby {
41+
@apply block text-[10px] text-center text-(--ui-text-dimmed) pt-2;
42+
}
43+
44+
&:hover {
45+
.carbon-text {
46+
@apply text-(--ui-text);
47+
}
48+
}
49+
}
50+
</style>

docs/app/pages/[...slug].vue

+1-23
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,6 @@ const communityLinks = computed(() => [{
109109
icon: 'i-lucide-map',
110110
to: '/roadmap'
111111
}])
112-
113-
// const resourcesLinks = [{
114-
// icon: 'i-simple-icons-figma',
115-
// label: 'Figma Kit',
116-
// to: 'https://www.figma.com/community/file/1288455405058138934',
117-
// target: '_blank'
118-
// }, {
119-
// label: 'Playground',
120-
// icon: 'i-simple-icons-stackblitz',
121-
// to: 'https://stackblitz.com/edit/nuxt-ui',
122-
// target: '_blank'
123-
// }, {
124-
// icon: 'i-simple-icons-nuxtdotjs',
125-
// label: 'Nuxt docs',
126-
// to: 'https://nuxt.com',
127-
// target: '_blank'
128-
// }]
129112
</script>
130113

131114
<template>
@@ -174,14 +157,9 @@ const communityLinks = computed(() => [{
174157

175158
<UPageLinks title="Community" :links="communityLinks" />
176159

177-
<!-- <USeparator type="dashed" />
178-
179-
<UPageLinks title="Resources" :links="resourcesLinks" />
180-
181160
<USeparator type="dashed" />
182161

183-
<AdsPro />
184-
<AdsCarbon /> -->
162+
<AdsCarbon />
185163
</template>
186164
</UContentToc>
187165
</template>

0 commit comments

Comments
 (0)