Skip to content

Commit c5603fa

Browse files
committed
docs: add back docs aside right bottom
1 parent 577c3d8 commit c5603fa

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

docs/app/components/AdsCarbon.vue

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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=CWYIPK7W&placement=contentnuxtcom')
12+
script.setAttribute('id', '_carbonads_js')
13+
14+
el.value?.appendChild(script)
15+
})
16+
</script>
17+
18+
<template>
19+
<div
20+
ref="el"
21+
class="carbon"
22+
/>
23+
</template>
24+
25+
<style scoped>
26+
@reference "../assets/css/main.css";
27+
28+
.carbon :deep(#carbonads) {
29+
@apply relative bg-muted rounded-md hover:bg-elevated w-full transition-colors min-h-[220px] p-2.5;
30+
31+
.carbon-img {
32+
@apply flex justify-center w-full;
33+
34+
& > img {
35+
@apply !max-w-full w-full rounded-sm;
36+
}
37+
}
38+
39+
.carbon-text {
40+
@apply text-[13px] transition-colors font-medium text-pretty flex pt-2;
41+
}
42+
43+
.carbon-poweredby {
44+
@apply block text-xs text-muted pt-2;
45+
}
46+
47+
&:hover {
48+
.carbon-text {
49+
@apply text-highlighted;
50+
}
51+
}
52+
}
53+
</style>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template>
2+
<div class="hidden lg:block space-y-6">
3+
<USeparator type="dashed" />
4+
<AdsCarbon />
5+
</div>
6+
</template>

0 commit comments

Comments
 (0)