Skip to content

Commit f334acc

Browse files
committed
docs(chore): add carbon to docs
1 parent e3500c1 commit f334acc

File tree

3 files changed

+83
-1
lines changed

3 files changed

+83
-1
lines changed

docs/src/components/Splash/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Container = styled.header`
5151
border-radius: 0 0 20px 20px;
5252
5353
width: 100%;
54-
height: calc(100vh - 100px);
54+
height: calc(60vh);
5555
5656
display: flex;
5757
flex-direction: column-reverse;

docs/src/pages/_app.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createGlobalStyle, ThemeProvider } from 'styled-components'
33
import { DefaultSeo } from 'next-seo'
44
import { MDXProvider } from '@mdx-js/react'
55
import { useEffect } from 'react'
6+
import styled from 'styled-components'
67

78
import { GLOBAL } from 'styles/global'
89
import { RESET } from 'styles/reset'
@@ -27,8 +28,20 @@ interface MyAppProps extends AppProps {}
2728

2829
const components = {
2930
code: CodeBlock,
31+
h1: props => <H1 {...props} />,
3032
}
3133

34+
const H1 = styled.h1`
35+
&::before {
36+
display: block;
37+
content: ' ';
38+
margin-top: -140px;
39+
height: 140px;
40+
visibility: hidden;
41+
pointer-events: none;
42+
}
43+
`
44+
3245
function App({ Component, pageProps }: MyAppProps) {
3346
useEffect(() => {
3447
/**
@@ -49,6 +62,12 @@ function App({ Component, pageProps }: MyAppProps) {
4962
<DefaultSeo {...DEFAULT_SEO} />
5063
<Header />
5164
<PageContainer>
65+
<script
66+
async
67+
type="text/javascript"
68+
src="//cdn.carbonads.com/carbon.js?serve=CEAIPK7I&placement=react-springdev"
69+
id="_carbonads_js"
70+
/>
5271
<Component {...pageProps} />
5372
</PageContainer>
5473
<Footer />

docs/src/styles/global.ts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,67 @@ html {
117117
--from: #3cffd0;
118118
--to: #277ef4;
119119
}
120+
121+
#carbonads * {
122+
margin: initial;
123+
padding: initial;
124+
}
125+
#carbonads {
126+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
127+
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial,
128+
sans-serif;
129+
}
130+
#carbonads {
131+
display: flex;
132+
max-width: 100%;
133+
margin: 20px 0;
134+
background-color: hsl(0, 0%, 98%);
135+
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, 0.1);
136+
z-index: 100;
137+
}
138+
#carbonads a {
139+
color: inherit;
140+
text-decoration: none;
141+
}
142+
#carbonads a:hover {
143+
color: inherit;
144+
}
145+
#carbonads span {
146+
position: relative;
147+
display: block;
148+
overflow: hidden;
149+
}
150+
#carbonads .carbon-wrap {
151+
display: flex;
152+
}
153+
#carbonads .carbon-img {
154+
display: block;
155+
margin: 0;
156+
line-height: 1;
157+
}
158+
#carbonads .carbon-img img {
159+
display: block;
160+
}
161+
#carbonads .carbon-text {
162+
font-size: 13px;
163+
padding: 10px;
164+
margin-bottom: 16px;
165+
line-height: 1.5;
166+
text-align: left;
167+
}
168+
#carbonads .carbon-poweredby {
169+
display: block;
170+
padding: 6px 8px;
171+
background: #f1f1f2;
172+
text-align: center;
173+
text-transform: uppercase;
174+
letter-spacing: 0.5px;
175+
font-weight: 600;
176+
font-size: 8px;
177+
line-height: 1;
178+
border-top-left-radius: 3px;
179+
position: absolute;
180+
bottom: 0;
181+
right: 0;
182+
}
120183
`

0 commit comments

Comments
 (0)