Skip to content

Commit f6b246b

Browse files
authored
fix(docs): restore media centering and full-width intro image (#4570)
* fix(docs): restore media centering and full-width intro image * fix(docs): drop overflow-hidden from intro media wrappers so focus ring is not clipped * fix(docs): use inset focus ring on lightbox media so parent overflow-hidden cannot clip it * fix(docs): drop focus ring on lightbox media to match original UI
1 parent d1eb79e commit f6b246b

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

apps/docs/components/ui/image.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function Image({
2525
<NextImage
2626
className={cn(
2727
'overflow-hidden rounded-xl border border-border object-cover',
28-
enableLightbox && 'transition-opacity group-hover:opacity-95',
28+
enableLightbox && 'cursor-pointer transition-opacity group-hover:opacity-95',
2929
className
3030
)}
3131
alt={alt}
@@ -41,7 +41,7 @@ export function Image({
4141
type='button'
4242
onClick={openLightbox}
4343
aria-label={`Open ${alt} in media viewer`}
44-
className='group block w-full cursor-pointer rounded-xl p-0 text-left'
44+
className='group contents'
4545
>
4646
{image}
4747
</button>

apps/docs/components/ui/video.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ export function Video({
4545
playsInline={playsInline}
4646
width={width}
4747
height={height}
48-
className={cn(className, enableLightbox && 'transition-opacity group-hover:opacity-[0.97]')}
48+
className={cn(
49+
className,
50+
enableLightbox && 'cursor-pointer transition-opacity group-hover:opacity-[0.97]'
51+
)}
4952
src={getAssetUrl(src)}
5053
/>
5154
)
@@ -57,7 +60,7 @@ export function Video({
5760
type='button'
5861
onClick={openLightbox}
5962
aria-label={`Open ${src} in media viewer`}
60-
className='group block w-full cursor-pointer rounded-xl p-0 text-left'
63+
className='group contents'
6164
>
6265
{video}
6366
</button>

apps/docs/content/docs/en/introduction/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import { FAQ } from '@/components/ui/faq'
1010

1111
Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Create agents visually with the workflow builder, conversationally through Mothership, or programmatically with the API. Connect AI models, databases, APIs, and 1,000+ business tools to build agents that automate real work — from chatbots and compliance agents to data pipelines and ITSM automation.
1212

13-
<div className="flex justify-center">
13+
<div className="mx-auto w-full overflow-hidden rounded-lg my-6">
1414
<Image
1515
src="/static/introduction.png"
1616
alt="Sim visual workflow canvas"
1717
width={700}
1818
height={450}
19-
className="my-6"
19+
className="w-full"
2020
/>
2121
</div>
2222

0 commit comments

Comments
 (0)