Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/components/guide-header.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/components/guide-header.tsx |
| Original SHA-256 | c6602071a7a3253ee33df64aee7ba920a24e260403c6bf5c6387a5426ccd719e |
| Git blob SHA | 10e72d0c7b4b231ecdf939ef0b05325212164592 |
| Reading-copy SHA-256 | c6602071a7a3253ee33df64aee7ba920a24e260403c6bf5c6387a5426ccd719e |
Recovered source transcript
Download complete source text ↓46 lines · 1.3 KB
import { format } from 'date-fns'
import Link from 'next/link'
interface GuideHeaderProps {
title: string
description: string
date: string
authors: Array<{
name: string
url?: string
}>
category?: string
}
export function GuideHeader({ title, description, date, authors, category }: GuideHeaderProps) {
return (
<div className="space-y-4 pb-8 border-b">
<h1 className="text-4xl font-bold tracking-tight lg:text-5xl">{title}</h1>
{description && <p className="text-xl text-muted-foreground">{description}</p>}
<div className="flex items-center space-x-2 text-sm text-muted-foreground">
<time dateTime={date}>{format(new Date(date), 'MMMM dd, yyyy')}</time>
<span>•</span>
<div className="flex items-center space-x-1">
{authors.map((author, index) => (
<span key={author.name}>
{author.url ? (
<Link
href={author.url}
className="hover:underline"
target="_blank"
rel="noopener noreferrer"
>
{author.name}
</Link>
) : (
author.name
)}
{index < authors.length - 1 && ', '}
</span>
))}
</div>
</div>
</div>
)
}