Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop overflowing the upsell block on top of the footer #6444

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/web/docs/src/app/case-studies/(posts)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ import { LookingToUseHiveUpsellBlock } from '../looking-to-use-hive-upsell-block
// because the class responsible for dark mode gets transformed
// so `dark:` prefixes don't work.
const ONE_OFF_CLASS_CASE_STUDIES = 'case-studies';
const MAIN_CONTENT = 'main-content';

export default function CaseStudiesLayout({ children }: { children: React.ReactNode }) {
return (
<div className={cn(ONE_OFF_CLASS_CASE_STUDIES, 'mx-auto box-content max-w-[90rem]')}>
<CaseStudiesHeader className="mx-auto max-w-[--nextra-content-width] pl-6 sm:my-12 md:pl-12 lg:my-24" />
<aside className="sticky top-[92px] mx-auto max-w-[--nextra-content-width]">
<LookingToUseHiveUpsellBlock className="absolute right-2 top-4 max-lg:hidden lg:w-[320px] xl:w-[400px]" />
</aside>
{children}
<div className={cn(MAIN_CONTENT, 'mx-auto flex')}>
{children}
<LookingToUseHiveUpsellBlock className="sticky right-2 top-[108px] mb-8 h-min max-lg:hidden lg:w-[320px] xl:w-[400px]" />
</div>
<MoreStoriesSection />
<GetYourAPIGameWhite className="sm:my-24" />
</div>
Expand Down
30 changes: 23 additions & 7 deletions packages/web/docs/src/app/case-studies/case-studies-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,30 @@
--nextra-content-width: 1208px;
--article-max-width: 640px;

/* hide leftmost column to left-align the case study */
& > div:first-of-type > :first-child {
@apply hidden;
}

& > div > article {
& > .main-content {
box-sizing: content-box;
max-width: var(--article-max-width);
width: var(--nextra-content-width);
max-width: 100%;

/* hide leftmost column to left-align the case study */
& > div:first-of-type > :first-child {
@apply hidden;
}

& > div {
@apply ml-0 pl-6 md:pl-12;
}

& > div > article {
box-sizing: content-box;
max-width: 100%;
width: var(--article-max-width);
padding: 0;
}

& nav.nextra-toc {
@apply hidden;
}
}

@apply text-green-1000 dark:text-white;
Expand Down
Loading