Skip to content

Commit

Permalink
[Amir] some temp fixes for doc on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
anagri committed Feb 5, 2025
1 parent 91ca814 commit fca0746
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 5 additions & 3 deletions crates/bodhi/src/app/docs/DocSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function DocSidebar({ navigation }: DocSidebarProps) {
>
<div className="h-16 border-b px-6 flex items-center">
<Link href={DOCS_BASE_PATH}>
<h1 className="text-lg font-semibold">Documentation</h1>
<h1 className="text-lg font-semibold">Home</h1>
</Link>
</div>
{sidebarContent}
Expand All @@ -91,7 +91,7 @@ export function DocSidebar({ navigation }: DocSidebarProps) {
<Button
variant="ghost"
size="icon"
className="lg:hidden fixed left-4 top-4 z-[50]"
className="lg:hidden fixed left-4 top-100 z-[50]"
aria-label="Open documentation navigation"
data-testid="mobile-sidebar-trigger"
>
Expand All @@ -104,7 +104,9 @@ export function DocSidebar({ navigation }: DocSidebarProps) {
data-testid="mobile-sidebar"
>
<div className="h-16 border-b px-6 flex items-center">
<h2 className="text-lg font-semibold">Documentation</h2>
<Link href={DOCS_BASE_PATH}>
<h2 className="text-lg font-semibold">Home</h2>
</Link>
</div>
{sidebarContent}
</SheetContent>
Expand Down
7 changes: 5 additions & 2 deletions crates/bodhi/src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { DocSidebar } from '@/app/docs/DocSidebar';
import { DOCS_BASE_PATH, DocSidebar } from '@/app/docs/DocSidebar';
import '@/app/docs/prism-theme.css';
import type { NavItem } from '@/app/docs/types';
import { getAllDocPaths, getPathOrder } from '@/app/docs/utils';
import fs from 'fs';
import matter from 'gray-matter';
import Link from 'next/link';
import path from 'path';

function getDocTitle(filePath: string): string {
Expand Down Expand Up @@ -94,7 +95,9 @@ export default function DocsLayout({
{/* Main content */}
<main className="flex-1 min-w-0" role="main">
<div className="h-16 border-b px-6 flex items-center lg:hidden">
<h2 className="text-lg font-semibold ml-12">Documentation</h2>
<Link href={DOCS_BASE_PATH}>
<h2 className="text-lg font-semibold ml-10">Home</h2>
</Link>
</div>
<div className="container py-8 px-6">{children}</div>
</main>
Expand Down

0 comments on commit fca0746

Please sign in to comment.