Skip to content

Commit aa1ff6a

Browse files
authored
Stop overflowing the upsell block on top of the footer (#6444)
1 parent 69a28e2 commit aa1ff6a

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

packages/web/docs/src/app/case-studies/(posts)/layout.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ import { LookingToUseHiveUpsellBlock } from '../looking-to-use-hive-upsell-block
99
// because the class responsible for dark mode gets transformed
1010
// so `dark:` prefixes don't work.
1111
const ONE_OFF_CLASS_CASE_STUDIES = 'case-studies';
12+
const MAIN_CONTENT = 'main-content';
1213

1314
export default function CaseStudiesLayout({ children }: { children: React.ReactNode }) {
1415
return (
1516
<div className={cn(ONE_OFF_CLASS_CASE_STUDIES, 'mx-auto box-content max-w-[90rem]')}>
1617
<CaseStudiesHeader className="mx-auto max-w-[--nextra-content-width] pl-6 sm:my-12 md:pl-12 lg:my-24" />
17-
<aside className="sticky top-[92px] mx-auto max-w-[--nextra-content-width]">
18-
<LookingToUseHiveUpsellBlock className="absolute right-2 top-4 max-lg:hidden lg:w-[320px] xl:w-[400px]" />
19-
</aside>
20-
{children}
18+
<div className={cn(MAIN_CONTENT, 'mx-auto flex')}>
19+
{children}
20+
<LookingToUseHiveUpsellBlock className="sticky right-2 top-[108px] mb-8 h-min max-lg:hidden lg:w-[320px] xl:w-[400px]" />
21+
</div>
2122
<MoreStoriesSection />
2223
<GetYourAPIGameWhite className="sm:my-24" />
2324
</div>

packages/web/docs/src/app/case-studies/case-studies-styles.css

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,30 @@
22
--nextra-content-width: 1208px;
33
--article-max-width: 640px;
44

5-
/* hide leftmost column to left-align the case study */
6-
& > div:first-of-type > :first-child {
7-
@apply hidden;
8-
}
9-
10-
& > div > article {
5+
& > .main-content {
116
box-sizing: content-box;
12-
max-width: var(--article-max-width);
7+
width: var(--nextra-content-width);
8+
max-width: 100%;
9+
10+
/* hide leftmost column to left-align the case study */
11+
& > div:first-of-type > :first-child {
12+
@apply hidden;
13+
}
14+
15+
& > div {
16+
@apply ml-0 pl-6 md:pl-12;
17+
}
18+
19+
& > div > article {
20+
box-sizing: content-box;
21+
max-width: 100%;
22+
width: var(--article-max-width);
23+
padding: 0;
24+
}
25+
26+
& nav.nextra-toc {
27+
@apply hidden;
28+
}
1329
}
1430

1531
@apply text-green-1000 dark:text-white;

0 commit comments

Comments
 (0)