@@ -3,7 +3,7 @@ import DocSidebar from "@theme-original/DocSidebar";
3
3
import type DocSidebarType from "@theme/DocSidebar" ;
4
4
import React , { type ReactNode } from "react" ;
5
5
6
- function Carbon ( ) {
6
+ export function Carbon ( ) {
7
7
const ref = React . useRef < HTMLDivElement > ( null ! ) ;
8
8
9
9
React . useEffect ( ( ) => {
@@ -16,7 +16,75 @@ function Carbon() {
16
16
ref . current . appendChild ( s ) ;
17
17
} , [ ] ) ;
18
18
19
- return < div ref = { ref } className = "carbon-outer h-[299px]" /> ;
19
+ return (
20
+ < >
21
+ < style >
22
+ { `
23
+ #carbonads_1 { display: none; }
24
+ #carbonads * { margin: initial; padding: initial; }
25
+ #carbonads {
26
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
27
+ Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial,
28
+ sans-serif;
29
+ display: flex;
30
+ }
31
+ #carbonads a {
32
+ text-decoration: none;
33
+ color: inherit;
34
+ }
35
+ #carbonads span {
36
+ position: relative;
37
+ display: block;
38
+ overflow: hidden;
39
+ width: 100%;
40
+ }
41
+ #carbonads .carbon-wrap {
42
+ display: flex;
43
+ flex-direction: column;
44
+ }
45
+ #carbonads .carbon-img {
46
+ display: block;
47
+ margin: 0;
48
+ line-height: 1;
49
+ }
50
+ #carbonads .carbon-img img {
51
+ display: block;
52
+ height: 100%;
53
+ max-width: 100% !important;
54
+ width: 100%;
55
+ border-radius: 4px;
56
+ }
57
+ #carbonads .carbon-text {
58
+ font-size: 11px;
59
+ padding: 10px;
60
+ margin-bottom: 16px;
61
+ line-height: 1.5;
62
+ text-align: left;
63
+ }
64
+ #carbonads .carbon-poweredby {
65
+ display: block;
66
+ padding: 6px 8px;
67
+ text-align: center;
68
+ text-transform: uppercase;
69
+ letter-spacing: 0.5px;
70
+ font-weight: 600;
71
+ font-size: 8px;
72
+ line-height: 1;
73
+ border-top-left-radius: 3px;
74
+ position: absolute;
75
+ bottom: 0;
76
+ right: 0;
77
+ background: rgba(128, 128, 128, 0.1);
78
+ }
79
+ ` }
80
+ </ style >
81
+ < div className = "ml-auto flex flex-col space-y-4" >
82
+ < div className = "bg-white dark:bg-black/40 border-gray-500/20 shadow-xl flex flex-col border-t border-l border-b p-4 space-y-2 rounded-l-lg" >
83
+ < div ref = { ref } className = "carbon-outer" />
84
+ </ div >
85
+ </ div >
86
+ </ >
87
+ ) ;
20
88
}
21
89
22
90
type Props = WrapperProps < typeof DocSidebarType > ;
0 commit comments