Skip to content

Commit 890d1b3

Browse files
committed
fix(docs): fix sidebar-divider grid regression, footer-peel path/positioning, OG sizing, and prune stray comments
- #nd-docs-layout::before divider now spans the full grid explicitly (grid-row/grid-column: 1 / -1) instead of being auto-placed into a real content cell, which was pushing page content down - footer-peel.jpg moved under /static/landing/ (was 404ing behind the i18n proxy's non-static path matcher) and wrapped in a relative div so next/image's fill positioning is valid under the sticky container - OG route: corrected title font sizes and char-width ratio so long titles wrap to 2 lines instead of 3, and resized the corner arrow to match the reference cover template's proportions - swapped the icon-only desktop navbar logo back to the wordmark - removed stray non-TSDoc comments, folded into TSDoc where the explanation was worth keeping
1 parent 41f474c commit 890d1b3

8 files changed

Lines changed: 43 additions & 32 deletions

File tree

apps/docs/app/api/og/route.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ import type { NextRequest } from 'next/server'
55
export const runtime = 'edge'
66

77
const TITLE_FONT_SIZE = {
8-
large: 88,
9-
medium: 76,
10-
small: 68,
8+
large: 105,
9+
medium: 91,
10+
small: 81,
1111
} as const
1212
/** Average glyph width as a fraction of font size, for this weight/family — used to pack words into lines. */
13-
const AVG_CHAR_WIDTH_EM = 0.5
13+
const AVG_CHAR_WIDTH_EM = 0.46
1414
const TITLE_BOX_WIDTH = 1020
1515
const FONT_CACHE_REVALIDATE_SECONDS = 60 * 60 * 24 * 30
16-
// Measured directly off the reference cover template
17-
// (apps/sim/public/library/best-zapier-alternatives/cover.jpg): #c3c3c3
18-
// background, median ink #525252, ~26px margin on every edge.
16+
/** Measured off the reference cover template (`apps/sim/public/library/best-zapier-alternatives/cover.jpg`). */
1917
const INK_COLOR = '#525252'
2018
const OG_CONTAINER_STYLE = {
2119
height: '100%',
@@ -133,9 +131,9 @@ function SimWordmark() {
133131
/** Diagonal "open" arrow, top-right — matches the library/blog cover template. */
134132
function CornerArrow() {
135133
return (
136-
<svg width='56' height='56' viewBox='0 0 24 24' fill='none'>
134+
<svg width='58' height='58' viewBox='0 0 24 24' fill='none'>
137135
<path
138-
d='M7 17 17 7M17 7H9M17 7V15'
136+
d='M2 22 22 2M22 2H12M22 2V12'
139137
stroke={INK_COLOR}
140138
strokeWidth={3.6}
141139
strokeLinecap='round'

apps/docs/app/global.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,20 @@ aside#nd-sidebar [data-radix-scroll-area-viewport] {
296296
min-height: var(--fd-docs-height) !important;
297297
}
298298

299-
/* Sidebar divider line — fixed to viewport, full height from navbar to bottom */
299+
/* Sidebar divider line — sticky within the docs layout box, so it ends where
300+
the layout does instead of bleeding into (or past) the footer below it.
301+
#nd-docs-layout is a CSS grid (see fumadocs' Container slot); a sticky
302+
pseudo-element stays in normal flow, so without an explicit grid-area it
303+
gets auto-placed into a real content cell and skews that cell's sizing.
304+
Spanning the full grid keeps it purely decorative/overlaid instead. */
300305
#nd-docs-layout::before {
301306
content: "";
302-
position: fixed;
307+
display: block;
308+
position: sticky;
309+
grid-row: 1 / -1;
310+
grid-column: 1 / -1;
303311
top: 92px; /* below navbar */
304-
bottom: 0;
312+
height: calc(100dvh - 92px);
305313
left: calc(var(--sidebar-offset) + var(--fd-sidebar-width));
306314
width: 1px;
307315
background-color: var(--surface-active);

apps/docs/components/footer/footer-peel.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ export function FooterPeel() {
2121
className='-z-10 sticky bottom-0 h-[320px] w-full overflow-hidden max-sm:h-[200px]'
2222
aria-hidden='true'
2323
>
24-
<Image
25-
src='/images/footer-peel.jpg'
26-
alt=''
27-
fill
28-
sizes='100vw'
29-
className='object-cover object-[center_38%]'
30-
/>
24+
<div className='relative h-full w-full'>
25+
<Image
26+
src='/static/landing/footer-peel.jpg'
27+
alt=''
28+
fill
29+
sizes='100vw'
30+
className='object-cover object-[center_38%]'
31+
/>
32+
</div>
3133
</div>
3234
)
3335
}

apps/docs/components/footer/footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function FooterColumn({ title, items }: { title: string; items: FooterItem[] })
130130

131131
export function Footer() {
132132
return (
133-
<div className='relative isolate mt-[120px] pb-[320px] max-sm:mt-16 max-sm:pb-[200px] max-lg:mt-[88px]'>
133+
<div className='relative isolate z-30 mt-[120px] pb-[320px] max-sm:mt-16 max-sm:pb-[200px] max-lg:mt-[88px]'>
134134
<FooterPeel />
135135
<footer className='-mt-[320px] max-sm:-mt-[200px] relative z-30 w-full border-[var(--border)] border-t bg-[var(--bg)]'>
136136
<div className='mx-auto w-full max-w-[1460px] px-20 pt-16 pb-16 max-sm:px-5 max-lg:px-8 max-lg:pt-12 max-lg:pb-12'>

apps/docs/components/navbar/navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Link from 'next/link'
55
import { usePathname } from 'next/navigation'
66
import { LanguageDropdown } from '@/components/ui/language-dropdown'
77
import { SearchTrigger } from '@/components/ui/search-trigger'
8-
import { SimLogoIcon } from '@/components/ui/sim-logo'
8+
import { SimWordmark } from '@/components/ui/sim-logo'
99
import { ThemeToggle } from '@/components/ui/theme-toggle'
1010
import { cn } from '@/lib/utils'
1111

@@ -45,7 +45,7 @@ export function Navbar() {
4545
}}
4646
>
4747
<Link href='/' className='flex items-center'>
48-
<SimLogoIcon className='size-[22px]' />
48+
<SimWordmark className='h-[18px]' />
4949
</Link>
5050

5151
<div className='-translate-x-1/2 absolute left-1/2 flex items-center justify-center'>
File renamed without changes.

apps/sim/app/(landing)/components/footer/components/footer-peel/footer-peel.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ export function FooterPeel() {
1919
className='-z-10 sticky bottom-0 h-[320px] w-full overflow-hidden max-sm:h-[200px]'
2020
aria-hidden='true'
2121
>
22-
<Image
23-
src='/landing/footer-peel.jpg'
24-
alt=''
25-
fill
26-
sizes='100vw'
27-
className='object-cover object-[center_38%]'
28-
/>
22+
<div className='relative h-full w-full'>
23+
<Image
24+
src='/landing/footer-peel.jpg'
25+
alt=''
26+
fill
27+
sizes='100vw'
28+
className='object-cover object-[center_38%]'
29+
/>
30+
</div>
2931
</div>
3032
)
3133
}

apps/sim/app/(landing)/components/footer/footer.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import { MODEL_PROVIDERS_WITH_CATALOGS } from '@/app/(landing)/models/utils'
1616
* (edge-to-edge): the border lives on the full-width `<footer>` landmark while
1717
* an inner container caps and centers the content at the shared
1818
* `max-w-[1460px]` with the same `px-20` gutter as every section above.
19+
*
20+
* The wrapper's bottom padding matches {@link FooterPeel}'s own height and is
21+
* the "reveal window" - the extra scroll room, past the footer's own opaque
22+
* background, where the sticky-pinned peel image becomes visible.
1923
*/
2024

2125
const LINK_CLASS =
@@ -132,9 +136,6 @@ function FooterColumn({ title, items }: { title: string; items: FooterItem[] })
132136

133137
export function Footer() {
134138
return (
135-
// The bottom padding here (matching FooterPeel's own height, `footer-peel.tsx`)
136-
// is the "reveal window": the extra scroll room, past the footer's own opaque
137-
// background, where the sticky-pinned peel image becomes visible.
138139
<div className='relative isolate mt-[120px] pb-[320px] max-sm:mt-16 max-sm:pb-[200px] max-lg:mt-[88px]'>
139140
<FooterPeel />
140141
<footer className='-mt-[320px] max-sm:-mt-[200px] relative z-30 w-full border-[var(--border)] border-t bg-[var(--bg)]'>

0 commit comments

Comments
 (0)