Skip to content

Commit

Permalink
Improve responsive behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChristophFH committed May 24, 2024
1 parent 2e61764 commit e8fd3a4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function Dashboard() {
</div>
<div className="grid gap-4 grid-cols-1 md:gap-8 lg:grid-cols-2 xl:grid-cols-3">
<ModelReadme readme={selectedLLM?.readme}></ModelReadme>
<ModelCard llm={selectedLLM} />
<ModelCard llm={selectedLLM} className="order-first lg:order-1"/>
</div>
</main>
</div>
Expand Down
6 changes: 4 additions & 2 deletions components/lms/model-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ import {
import { Separator } from "@/components/ui/separator"
import { LLM } from "@/lib/types/llm"
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar"
import { cn } from "@/lib/utils"

interface ModelCardProps {
llm: LLM | null;
className?: string;
}

const ModelCard: React.FC<ModelCardProps> = ({ llm }) => {
const ModelCard: React.FC<ModelCardProps> = ({ llm, className}) => {
if (!llm) {
return null;
}

return (
<Card className="overflow-hidden h-min">
<Card className={cn("overflow-hidden h-min", className)}>
<CardHeader className="flex flex-row items-start bg-muted/50 py-6 pr-6 pl-4">
<Avatar className="h-12 w-12 self-center mr-2">
<AvatarImage src={`logos/${llm.from}.svg`} alt={llm.from} className="object-scale-down p-1" />
Expand Down
7 changes: 7 additions & 0 deletions components/lms/model-readme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ const ModelReadme: React.FC<ModelReadmeProps> = ({ readme }) => {
{children}
</code>
)
},
table(props) {
return (
<div className="overflow-x-auto">
<table {...props} />
</div>
)
}
}}
>
Expand Down

0 comments on commit e8fd3a4

Please sign in to comment.