-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
47 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
import BlogLayout from '@/layouts/BlogLayout.astro' | ||
import { getCollection } from 'astro:content' | ||
import BlogListSection from '@/components/blog/BlogListSection.astro' | ||
import type { BlogCategory } from '@/content/config' | ||
import BlogCategoryNav from '@/components/blog/BlogCategoryNav.astro' | ||
interface Props { | ||
category: 'all' | BlogCategory | ||
} | ||
const { category } = Astro.props | ||
const blogEntries = (await getCollection('blogs')).filter( | ||
({ data: { category: c } }) => category === 'all' || c === category, | ||
) | ||
--- | ||
|
||
<BlogLayout title="記事一覧" description="メンバーのブログです。"> | ||
<main class="flex h-full flex-col"> | ||
<BlogListSection title="最新の記事一覧" blogs={blogEntries}> | ||
<Fragment slot="nav"><BlogCategoryNav category={category} /></Fragment> | ||
</BlogListSection> | ||
</main> | ||
</BlogLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
--- | ||
import BlogLayout from '@/layouts/BlogLayout.astro' | ||
import { getCollection } from 'astro:content' | ||
import BlogListSection from '@/components/blog/BlogListSection.astro' | ||
import BlogCategoryNav from '@/components/blog/BlogCategoryNav.astro' | ||
const blogEntries = await getCollection('blogs') | ||
import IndexPage from './_IndexPage.astro' | ||
--- | ||
|
||
<BlogLayout title="記事一覧" description="メンバーのブログです。"> | ||
<main class="flex h-full flex-col"> | ||
<BlogListSection title="最新の記事一覧" blogs={blogEntries}> | ||
<Fragment slot="nav"><BlogCategoryNav category="all" /></Fragment> | ||
</BlogListSection> | ||
</main> | ||
</BlogLayout> | ||
<IndexPage category="all" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters