Skip to content
Open
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
43 changes: 27 additions & 16 deletions resources/js/layouts/app-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ export default function AppLayout({ children }: AppLayoutProps) {

return (
<>
<a
href="#main"
className="sr-only rounded-md bg-primary text-sm font-medium text-primary-foreground outline-none focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-50 focus:px-3 focus:py-2 focus-visible:ring-[3px] focus-visible:ring-ring/50"
>
Skip to main content
</a>
{!isMessages && <ProductHuntBanner />}
<ExternalLinkGuard />
<div
Expand All @@ -142,22 +148,27 @@ export default function AppLayout({ children }: AppLayoutProps) {
<AppNav onSearch={openSearch} onCompose={compose} />
</div>

<main
data-main
className={cn(
'min-w-0 flex-1 bg-card pb-40 md:max-w-[620px] md:border-x md:pb-0 lg:max-w-[calc(876px-var(--sidebar-width))]',
{
'pb-20 md:max-w-[940px] lg:max-w-[calc(1196px-var(--sidebar-width))]':
isMessages,
},
)}
>
<div data-nav-content>
{/* Remotes have their own bar, so phones keep the height for the chat. */}
{!isMessages && <MobileHeader onSearch={openSearch} />}
<CommitStarPolling>{children}</CommitStarPolling>
</div>
</main>
<div className="flex min-w-0 flex-1 flex-col bg-card md:contents">
{/* Remotes have their own bar, so phones keep the height for the chat.
Outside #main so the skip link lands after these repeated controls. */}
{!isMessages && <MobileHeader onSearch={openSearch} />}
<main
id="main"
tabIndex={-1}
data-main
className={cn(
'min-w-0 flex-1 bg-card pb-40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring md:max-w-[620px] md:border-x md:pb-0 lg:max-w-[calc(876px-var(--sidebar-width))]',
{
'pb-20 md:max-w-[940px] lg:max-w-[calc(1196px-var(--sidebar-width))]':
isMessages,
},
)}
>
<div data-nav-content>
<CommitStarPolling>{children}</CommitStarPolling>
</div>
</main>
</div>

{!isMessages && (
<AppAside
Expand Down