Skip to content

Commit 8173bd9

Browse files
committed
docs: add ad banner to examples
1 parent 19f4679 commit 8173bd9

File tree

1 file changed

+92
-56
lines changed

1 file changed

+92
-56
lines changed

docs/app/routes/examples.tsx

Lines changed: 92 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -164,68 +164,86 @@ export default function Examples() {
164164
<>
165165
<Header />
166166
<Main>
167-
<Heading
168-
fontStyle="$XL"
169-
css={{
170-
mb: 20,
171-
'@tabletUp': {
172-
mb: 30,
173-
},
174-
}}>
175-
Examples
176-
</Heading>
177-
<Copy
178-
css={{
179-
'& > a': {
180-
...InlineLinkStyles,
181-
},
182-
maxWidth: 680,
183-
}}>
184-
{`Got an example you want to see here & share with the community?`}{' '}
185-
Check out{' '}
186-
<Anchor href="https://github.com/pmndrs/react-spring/tree/master/demo/CONTRIBUTING.md">
187-
this guide
188-
</Anchor>
189-
.
190-
</Copy>
191-
<ExampleFilters method="post" ref={formRef}>
192-
<Heading tag="h2" fontStyle="$XS" style={{ display: 'inline-block' }}>
193-
{`Alternatively, check out examples by `}
194-
</Heading>
195-
<Select
196-
placeholder="Tags"
197-
options={tags}
198-
onChange={handleSelectChange('tags')}
199-
value={selectStates.tags}
200-
/>
201-
<Heading tag="h2" fontStyle="$XS" style={{ display: 'inline-block' }}>
202-
{` or `}
203-
</Heading>
204-
<Select
205-
placeholder="Components"
206-
options={components}
207-
onChange={handleSelectChange('components')}
208-
value={selectStates.components}
209-
/>
210-
{selectStates.tags.length > 0 ||
211-
selectStates.components.length > 0 ? (
167+
<Flex>
168+
<div>
212169
<Heading
213-
tag="h2"
214-
fontStyle="$XS"
170+
fontStyle="$XL"
171+
css={{
172+
mb: 20,
173+
'@tabletUp': {
174+
mb: 30,
175+
},
176+
}}>
177+
Examples
178+
</Heading>
179+
<Copy
215180
css={{
216-
display: 'inline',
217-
ml: -6,
218-
219181
'& > a': {
220182
...InlineLinkStyles,
221-
fontWeight: '$bold',
222183
},
184+
maxWidth: 680,
223185
}}>
224-
{'. Or maybe, you want to see them '}
225-
<Anchor href="/examples">all?</Anchor>
226-
</Heading>
227-
) : null}
228-
</ExampleFilters>
186+
{`Got an example you want to see here & share with the community?`}{' '}
187+
Check out{' '}
188+
<Anchor href="https://github.com/pmndrs/react-spring/tree/master/demo/CONTRIBUTING.md">
189+
this guide
190+
</Anchor>
191+
.
192+
</Copy>
193+
<ExampleFilters method="post" ref={formRef}>
194+
<Heading
195+
tag="h2"
196+
fontStyle="$XS"
197+
style={{ display: 'inline-block' }}>
198+
{`Alternatively, check out examples by `}
199+
</Heading>
200+
<Select
201+
placeholder="Tags"
202+
options={tags}
203+
onChange={handleSelectChange('tags')}
204+
value={selectStates.tags}
205+
/>
206+
<Heading
207+
tag="h2"
208+
fontStyle="$XS"
209+
style={{ display: 'inline-block' }}>
210+
{` or `}
211+
</Heading>
212+
<Select
213+
placeholder="Components"
214+
options={components}
215+
onChange={handleSelectChange('components')}
216+
value={selectStates.components}
217+
/>
218+
{selectStates.tags.length > 0 ||
219+
selectStates.components.length > 0 ? (
220+
<Heading
221+
tag="h2"
222+
fontStyle="$XS"
223+
css={{
224+
display: 'inline',
225+
ml: -6,
226+
227+
'& > a': {
228+
...InlineLinkStyles,
229+
fontWeight: '$bold',
230+
},
231+
}}>
232+
{'. Or maybe, you want to see them '}
233+
<Anchor href="/examples">all?</Anchor>
234+
</Heading>
235+
) : null}
236+
</ExampleFilters>
237+
</div>
238+
<div>
239+
<script
240+
async
241+
type="text/javascript"
242+
src="https://cdn.carbonads.com/carbon.js?serve=CEAIPK7I&placement=react-springdev"
243+
id="_carbonads_js"
244+
/>
245+
</div>
246+
</Flex>
229247
<SandboxesList
230248
css={{
231249
opacity: state === 'loading' ? 0.5 : 1,
@@ -257,6 +275,24 @@ const Main = styled('main', {
257275
},
258276
})
259277

278+
const Flex = styled('div', {
279+
'#carbonads': {
280+
mb: '$20',
281+
},
282+
283+
'@tabletUp': {
284+
display: 'flex',
285+
justifyContent: 'space-between',
286+
alignItems: 'flex-end',
287+
gap: '$40',
288+
289+
'#carbonads': {
290+
maxWidth: '400px',
291+
mb: '$40',
292+
},
293+
},
294+
})
295+
260296
const SandboxesList = styled('ul', {
261297
display: 'grid',
262298
gridRowGap: '20px',

0 commit comments

Comments
 (0)