Skip to content

Commit 724fa00

Browse files
committed
improvement(docs): updated logo, added lightbox to action media, fixed minor styling inconsistencies between themes
1 parent ebf2852 commit 724fa00

File tree

9 files changed

+263
-82
lines changed

9 files changed

+263
-82
lines changed

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
185185
tableOfContent={{
186186
style: 'clerk',
187187
enabled: true,
188-
header: (
189-
<div key='toc-header' className='mb-2 font-medium text-sm'>
190-
On this page
191-
</div>
192-
),
193188
footer: <TOCFooter />,
194189
single: false,
195190
}}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export async function GET(request: NextRequest) {
5757
fontFamily: 'Geist',
5858
}}
5959
>
60-
{/* Base gradient layer - subtle purple tint across the entire image */}
60+
{/* Base gradient layer - subtle green tint across the entire image */}
6161
<div
6262
style={{
6363
position: 'absolute',
@@ -66,7 +66,7 @@ export async function GET(request: NextRequest) {
6666
width: '100%',
6767
height: '100%',
6868
background:
69-
'radial-gradient(ellipse 150% 100% at 50% 100%, rgba(88, 28, 135, 0.15) 0%, rgba(88, 28, 135, 0.08) 25%, rgba(88, 28, 135, 0.03) 50%, transparent 80%)',
69+
'radial-gradient(ellipse 150% 100% at 50% 100%, rgba(51, 196, 130, 0.15) 0%, rgba(51, 196, 130, 0.08) 25%, rgba(51, 196, 130, 0.03) 50%, transparent 80%)',
7070
display: 'flex',
7171
}}
7272
/>
@@ -80,7 +80,7 @@ export async function GET(request: NextRequest) {
8080
width: '100%',
8181
height: '100%',
8282
background:
83-
'radial-gradient(ellipse 100% 80% at 80% 90%, rgba(112, 31, 252, 0.12) 0%, rgba(112, 31, 252, 0.04) 40%, transparent 70%)',
83+
'radial-gradient(ellipse 100% 80% at 80% 90%, rgba(51, 196, 130, 0.12) 0%, rgba(51, 196, 130, 0.04) 40%, transparent 70%)',
8484
display: 'flex',
8585
}}
8686
/>

apps/docs/app/global.css

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ body {
99
}
1010

1111
@theme {
12-
--color-fd-primary: #802fff; /* Purple from control-bar component */
12+
--color-fd-primary: #33c482; /* Green from Sim logo */
1313
--font-geist-sans: var(--font-geist-sans);
1414
--font-geist-mono: var(--font-geist-mono);
1515
}
1616

17+
/* Ensure primary color is set in both light and dark modes */
18+
:root {
19+
--color-fd-primary: #33c482;
20+
}
21+
22+
.dark {
23+
--color-fd-primary: #33c482;
24+
}
25+
1726
/* Font family utilities */
1827
.font-sans {
1928
font-family: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
@@ -34,7 +43,7 @@ body {
3443
:root {
3544
--fd-border: transparent !important;
3645
--fd-border-sidebar: transparent !important;
37-
--fd-nav-height: 64px; /* Custom navbar height (h-16 = 4rem = 64px) */
46+
--fd-nav-height: 65px; /* Custom navbar height (h-16 = 64px + 1px border) */
3847
/* Content container width used to center main content */
3948
--spacing-fd-container: 1400px;
4049
/* Edge gutter = leftover space on each side of centered container */
@@ -136,11 +145,11 @@ aside#nd-sidebar {
136145
/* On mobile, let fumadocs handle the layout natively */
137146
@media (min-width: 1024px) {
138147
:root {
139-
--fd-banner-height: 64px !important;
148+
--fd-banner-height: 65px !important; /* 64px navbar + 1px border */
140149
}
141150

142151
#nd-docs-layout {
143-
--fd-docs-height: calc(100dvh - 64px) !important;
152+
--fd-docs-height: calc(100dvh - 65px) !important; /* 64px navbar + 1px border */
144153
--fd-sidebar-width: 300px !important;
145154
margin-left: var(--sidebar-offset) !important;
146155
margin-right: var(--toc-offset) !important;
@@ -227,19 +236,19 @@ html:not(.dark) #nd-sidebar button:not([aria-label*="ollapse"]):not([aria-label*
227236
letter-spacing: 0.05em !important;
228237
}
229238

230-
/* Override active state (NO PURPLE) */
239+
/* Override active state */
231240
#nd-sidebar a[data-active="true"],
232241
#nd-sidebar button[data-active="true"],
233242
#nd-sidebar a.bg-fd-primary\/10,
234243
#nd-sidebar a.text-fd-primary,
235244
#nd-sidebar a[class*="bg-fd-primary"],
236245
#nd-sidebar a[class*="text-fd-primary"],
237-
/* Override custom sidebar purple classes */
246+
/* Override custom sidebar green classes */
238247
#nd-sidebar
239-
a.bg-purple-50\/80,
240-
#nd-sidebar a.text-purple-600,
241-
#nd-sidebar a[class*="bg-purple"],
242-
#nd-sidebar a[class*="text-purple"] {
248+
a.bg-emerald-50\/80,
249+
#nd-sidebar a.text-emerald-600,
250+
#nd-sidebar a[class*="bg-emerald"],
251+
#nd-sidebar a[class*="text-emerald"] {
243252
background-image: none !important;
244253
}
245254

@@ -250,10 +259,10 @@ html.dark #nd-sidebar a.bg-fd-primary\/10,
250259
html.dark #nd-sidebar a.text-fd-primary,
251260
html.dark #nd-sidebar a[class*="bg-fd-primary"],
252261
html.dark #nd-sidebar a[class*="text-fd-primary"],
253-
html.dark #nd-sidebar a.bg-purple-50\/80,
254-
html.dark #nd-sidebar a.text-purple-600,
255-
html.dark #nd-sidebar a[class*="bg-purple"],
256-
html.dark #nd-sidebar a[class*="text-purple"] {
262+
html.dark #nd-sidebar a.bg-emerald-50\/80,
263+
html.dark #nd-sidebar a.text-emerald-600,
264+
html.dark #nd-sidebar a[class*="bg-emerald"],
265+
html.dark #nd-sidebar a[class*="text-emerald"] {
257266
background-color: rgba(255, 255, 255, 0.15) !important;
258267
color: rgba(255, 255, 255, 1) !important;
259268
}
@@ -265,10 +274,10 @@ html:not(.dark) #nd-sidebar a.bg-fd-primary\/10,
265274
html:not(.dark) #nd-sidebar a.text-fd-primary,
266275
html:not(.dark) #nd-sidebar a[class*="bg-fd-primary"],
267276
html:not(.dark) #nd-sidebar a[class*="text-fd-primary"],
268-
html:not(.dark) #nd-sidebar a.bg-purple-50\/80,
269-
html:not(.dark) #nd-sidebar a.text-purple-600,
270-
html:not(.dark) #nd-sidebar a[class*="bg-purple"],
271-
html:not(.dark) #nd-sidebar a[class*="text-purple"] {
277+
html:not(.dark) #nd-sidebar a.bg-emerald-50\/80,
278+
html:not(.dark) #nd-sidebar a.text-emerald-600,
279+
html:not(.dark) #nd-sidebar a[class*="bg-emerald"],
280+
html:not(.dark) #nd-sidebar a[class*="text-emerald"] {
272281
background-color: rgba(0, 0, 0, 0.07) !important;
273282
color: rgba(0, 0, 0, 0.9) !important;
274283
}
@@ -286,17 +295,17 @@ html:not(.dark) #nd-sidebar button:hover:not([data-active="true"]) {
286295
}
287296

288297
/* Dark mode - ensure active/selected items don't change on hover */
289-
html.dark #nd-sidebar a.bg-purple-50\/80:hover,
290-
html.dark #nd-sidebar a[class*="bg-purple"]:hover,
298+
html.dark #nd-sidebar a.bg-emerald-50\/80:hover,
299+
html.dark #nd-sidebar a[class*="bg-emerald"]:hover,
291300
html.dark #nd-sidebar a[data-active="true"]:hover,
292301
html.dark #nd-sidebar button[data-active="true"]:hover {
293302
background-color: rgba(255, 255, 255, 0.15) !important;
294303
color: rgba(255, 255, 255, 1) !important;
295304
}
296305

297306
/* Light mode - ensure active/selected items don't change on hover */
298-
html:not(.dark) #nd-sidebar a.bg-purple-50\/80:hover,
299-
html:not(.dark) #nd-sidebar a[class*="bg-purple"]:hover,
307+
html:not(.dark) #nd-sidebar a.bg-emerald-50\/80:hover,
308+
html:not(.dark) #nd-sidebar a[class*="bg-emerald"]:hover,
300309
html:not(.dark) #nd-sidebar a[data-active="true"]:hover,
301310
html:not(.dark) #nd-sidebar button[data-active="true"]:hover {
302311
background-color: rgba(0, 0, 0, 0.07) !important;
@@ -515,6 +524,15 @@ pre code .line {
515524
color: var(--color-fd-primary);
516525
}
517526

527+
/* ============================================
528+
TOC (Table of Contents) Styling
529+
============================================ */
530+
531+
/* Remove the thin border-left on nested TOC items (keeps main indicator only) */
532+
#nd-toc a[style*="padding-inline-start"] {
533+
border-left: none !important;
534+
}
535+
518536
/* Add bottom spacing to prevent abrupt page endings */
519537
[data-content] {
520538
padding-top: 1.5rem !important;

apps/docs/components/docs-layout/sidebar-components.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function SidebarItem({ item }: { item: Item }) {
4444
'lg:text-gray-600 lg:dark:text-gray-400',
4545
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
4646
active &&
47-
'lg:bg-purple-50/80 lg:font-normal lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
47+
'lg:bg-emerald-50/80 lg:font-normal lg:text-emerald-600 lg:dark:bg-emerald-900/15 lg:dark:text-emerald-400'
4848
)}
4949
>
5050
{item.name}
@@ -79,7 +79,7 @@ export function SidebarFolder({ item, children }: { item: Folder; children: Reac
7979
'lg:text-gray-600 lg:dark:text-gray-400',
8080
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
8181
active &&
82-
'lg:bg-purple-50/80 lg:font-normal lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
82+
'lg:bg-emerald-50/80 lg:font-normal lg:text-emerald-600 lg:dark:bg-emerald-900/15 lg:dark:text-emerald-400'
8383
)}
8484
>
8585
{item.name}
@@ -104,7 +104,7 @@ export function SidebarFolder({ item, children }: { item: Folder; children: Reac
104104
'lg:text-gray-800 lg:dark:text-gray-200',
105105
!active && 'lg:hover:bg-gray-100/60 lg:dark:hover:bg-gray-800/40',
106106
active &&
107-
'lg:bg-purple-50/80 lg:text-purple-600 lg:dark:bg-purple-900/15 lg:dark:text-purple-400'
107+
'lg:bg-emerald-50/80 lg:text-emerald-600 lg:dark:bg-emerald-900/15 lg:dark:text-emerald-400'
108108
)}
109109
>
110110
{item.name}

apps/docs/components/docs-layout/toc-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function TOCFooter() {
2323
rel='noopener noreferrer'
2424
onMouseEnter={() => setIsHovered(true)}
2525
onMouseLeave={() => setIsHovered(false)}
26-
className='group mt-2 inline-flex h-8 w-fit items-center justify-center gap-1 whitespace-nowrap rounded-[10px] border border-[#6F3DFA] bg-gradient-to-b from-[#8357FF] to-[#6F3DFA] px-3 pr-[10px] pl-[12px] font-medium text-sm text-white shadow-[inset_0_2px_4px_0_#9B77FF] outline-none transition-all hover:shadow-lg focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50'
26+
className='group mt-2 inline-flex h-8 w-fit items-center justify-center gap-1 whitespace-nowrap rounded-[10px] border border-[#2AAD6C] bg-gradient-to-b from-[#3ED990] to-[#2AAD6C] px-3 pr-[10px] pl-[12px] font-medium text-sm text-white shadow-[inset_0_2px_4px_0_#5EE8A8] outline-none transition-all hover:shadow-lg focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50'
2727
aria-label='Get started with Sim - Sign up for free'
2828
>
2929
<span>Get started</span>

apps/docs/components/navbar/navbar.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use client'
22

3-
import Image from 'next/image'
43
import Link from 'next/link'
54
import { LanguageDropdown } from '@/components/ui/language-dropdown'
65
import { SearchTrigger } from '@/components/ui/search-trigger'
6+
import { SimLogoFull } from '@/components/ui/sim-logo'
77
import { ThemeToggle } from '@/components/ui/theme-toggle'
88

99
export function Navbar() {
@@ -27,13 +27,7 @@ export function Navbar() {
2727
{/* Left cluster: logo */}
2828
<div className='flex items-center'>
2929
<Link href='/' className='flex min-w-[100px] items-center'>
30-
<Image
31-
src='/static/logo.png'
32-
alt='Sim'
33-
width={72}
34-
height={28}
35-
className='h-7 w-auto'
36-
/>
30+
<SimLogoFull className='h-7 w-auto' />
3731
</Link>
3832
</div>
3933

Lines changed: 62 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,85 @@
11
'use client'
22

3+
import { useState } from 'react'
34
import { getAssetUrl } from '@/lib/utils'
5+
import { Lightbox } from './lightbox'
46

57
interface ActionImageProps {
68
src: string
79
alt: string
10+
enableLightbox?: boolean
811
}
912

1013
interface ActionVideoProps {
1114
src: string
1215
alt: string
16+
enableLightbox?: boolean
1317
}
1418

15-
export function ActionImage({ src, alt }: ActionImageProps) {
19+
export function ActionImage({ src, alt, enableLightbox = true }: ActionImageProps) {
20+
const [isLightboxOpen, setIsLightboxOpen] = useState(false)
21+
22+
const handleClick = () => {
23+
if (enableLightbox) {
24+
setIsLightboxOpen(true)
25+
}
26+
}
27+
1628
return (
17-
<img
18-
src={src}
19-
alt={alt}
20-
className='inline-block w-full max-w-[200px] rounded border border-neutral-200 dark:border-neutral-700'
21-
/>
29+
<>
30+
<img
31+
src={src}
32+
alt={alt}
33+
onClick={handleClick}
34+
className={`inline-block w-full max-w-[200px] rounded border border-neutral-200 dark:border-neutral-700 ${
35+
enableLightbox ? 'cursor-pointer transition-opacity hover:opacity-90' : ''
36+
}`}
37+
/>
38+
{enableLightbox && (
39+
<Lightbox
40+
isOpen={isLightboxOpen}
41+
onClose={() => setIsLightboxOpen(false)}
42+
src={src}
43+
alt={alt}
44+
type='image'
45+
/>
46+
)}
47+
</>
2248
)
2349
}
2450

25-
export function ActionVideo({ src, alt }: ActionVideoProps) {
51+
export function ActionVideo({ src, alt, enableLightbox = true }: ActionVideoProps) {
52+
const [isLightboxOpen, setIsLightboxOpen] = useState(false)
2653
const resolvedSrc = getAssetUrl(src)
2754

55+
const handleClick = () => {
56+
if (enableLightbox) {
57+
setIsLightboxOpen(true)
58+
}
59+
}
60+
2861
return (
29-
<video
30-
src={resolvedSrc}
31-
autoPlay
32-
loop
33-
muted
34-
playsInline
35-
className='inline-block w-full max-w-[200px] rounded border border-neutral-200 dark:border-neutral-700'
36-
/>
62+
<>
63+
<video
64+
src={resolvedSrc}
65+
autoPlay
66+
loop
67+
muted
68+
playsInline
69+
onClick={handleClick}
70+
className={`inline-block w-full max-w-[200px] rounded border border-neutral-200 dark:border-neutral-700 ${
71+
enableLightbox ? 'cursor-pointer transition-opacity hover:opacity-90' : ''
72+
}`}
73+
/>
74+
{enableLightbox && (
75+
<Lightbox
76+
isOpen={isLightboxOpen}
77+
onClose={() => setIsLightboxOpen(false)}
78+
src={src}
79+
alt={alt}
80+
type='video'
81+
/>
82+
)}
83+
</>
3784
)
3885
}

0 commit comments

Comments
 (0)