HomeFeedWithTagSidebar

These templates include the full document shell. Each variant is shown in a separate frame (same URL as “open alone”).


src/ui/3_templates/HomeFeedWithTagSidebar.astro
---
import { Content as HomeIntro } from '../../home-intro.md'
import MarkdownBlock from '../2_organisms/MarkdownBlock.astro'
import PostFeedRow from '../2_organisms/PostFeedRow.astro'
import PaginationNav from '../2_organisms/PaginationNav.astro'
import TagSidebar from '../2_organisms/TagSidebar.astro'
import type { FeedPost } from '../../lib/feed-types'
import Base from './Base.astro'
interface Props {
posts: FeedPost[]
sortedTags: { tag: string; count: number }[]
totalPages: number
prevHref: string | null
nextHref: string | null
/** Passed through to `Base` (detail pages, home pagination). */
title?: string
canonicalHref?: string
/** When true, renders `src/home-intro.md` above the feed (homepage only). */
showHomeIntro?: boolean
}
const {
posts,
sortedTags,
totalPages,
prevHref,
nextHref,
title = 'Jacob Bennett',
canonicalHref,
showHomeIntro = false,
} = Astro.props
---
<Base title={title} width="wide" canonicalHref={canonicalHref}>
{showHomeIntro ? (
<MarkdownBlock class="mb-8 text-ink">
<HomeIntro />
</MarkdownBlock>
) : null}
<div class="grid grid-cols-1 md:grid-cols-[1fr_200px] gap-8 items-start">
<div>
<ul class="list-none p-0 m-0 [&>li:last-child]:border-b-0">
{posts.map(post => <PostFeedRow post={post} />)}
</ul>
<PaginationNav totalPages={totalPages} prevHref={prevHref} nextHref={nextHref} />
</div>
<TagSidebar sortedTags={sortedTags} />
</div>
</Base>