Skip to content

Commit e92d4f8

Browse files
committed
Stop overflowing the upsell block on top of the footer
1 parent 09c7719 commit e92d4f8

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-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-16 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: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
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-
}
5+
& > .main-content {
6+
width: var(--nextra-content-width);
7+
8+
/* hide leftmost column to left-align the case study */
9+
& > div:first-of-type > :first-child {
10+
@apply hidden;
11+
}
912

10-
& > div > article {
11-
box-sizing: content-box;
12-
max-width: var(--article-max-width);
13+
& > div > article {
14+
box-sizing: content-box;
15+
max-width: var(--article-max-width);
16+
}
1317
}
1418

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

0 commit comments

Comments
 (0)