Merge branch 'main' into tailwind-v4-poc-1
This commit is contained in:
commit
d7714c1bd6
29 files changed
+1250
-975
No files matched your search
@@ -19,5 +19,5 @@ const len = page.data.length;
|
||||
|
||||
<MainGridLayout>
|
||||
<PostPage page={page}></PostPage>
|
||||
<Pagination class="mx-auto onload-animation" page={page} style=`animation-delay: calc(var(--content-delay) + ${(len)*50}ms)`></Pagination>
|
||||
<Pagination class="mx-auto onload-animation" page={page} style={`animation-delay: calc(var(--content-delay) + ${(len)*50}ms)`}></Pagination>
|
||||
</MainGridLayout>
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
import ArchivePanel from "@components/ArchivePanel.svelte";
|
||||
import I18nKey from "@i18n/i18nKey";
|
||||
import { i18n } from "@i18n/translation";
|
||||
import MainGridLayout from "@layouts/MainGridLayout.astro";
|
||||
import { getSortedPosts } from "../utils/content-utils";
|
||||
|
||||
const sortedPosts = await getSortedPosts();
|
||||
---
|
||||
|
||||
<MainGridLayout title={i18n(I18nKey.archive)}>
|
||||
<ArchivePanel sortedPosts={sortedPosts} client:only="svelte"></ArchivePanel>
|
||||
</MainGridLayout>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
import ArchivePanel from "@components/ArchivePanel.astro";
|
||||
import I18nKey from "@i18n/i18nKey";
|
||||
import { i18n } from "@i18n/translation";
|
||||
import MainGridLayout from "@layouts/MainGridLayout.astro";
|
||||
import { getCategoryList } from "@utils/content-utils";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const categories = await getCategoryList();
|
||||
return categories.map((category) => {
|
||||
return {
|
||||
params: {
|
||||
category: category.name,
|
||||
},
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
const category = Astro.params.category as string;
|
||||
---
|
||||
|
||||
<MainGridLayout title={i18n(I18nKey.archive)} description={i18n(I18nKey.archive)}>
|
||||
<ArchivePanel categories={[category]}></ArchivePanel>
|
||||
</MainGridLayout>
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
import ArchivePanel from "@components/ArchivePanel.astro";
|
||||
import { UNCATEGORIZED } from "@constants/constants";
|
||||
import I18nKey from "@i18n/i18nKey";
|
||||
import { i18n } from "@i18n/translation";
|
||||
import MainGridLayout from "@layouts/MainGridLayout.astro";
|
||||
---
|
||||
|
||||
<MainGridLayout title={i18n(I18nKey.archive)}>
|
||||
<ArchivePanel categories={[UNCATEGORIZED]}></ArchivePanel>
|
||||
</MainGridLayout>
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
import ArchivePanel from "@components/ArchivePanel.astro";
|
||||
import I18nKey from "@i18n/i18nKey";
|
||||
import { i18n } from "@i18n/translation";
|
||||
import MainGridLayout from "@layouts/MainGridLayout.astro";
|
||||
---
|
||||
|
||||
<MainGridLayout title={i18n(I18nKey.archive)}>
|
||||
<ArchivePanel></ArchivePanel>
|
||||
</MainGridLayout>
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
import ArchivePanel from "@components/ArchivePanel.astro";
|
||||
import I18nKey from "@i18n/i18nKey";
|
||||
import { i18n } from "@i18n/translation";
|
||||
import MainGridLayout from "@layouts/MainGridLayout.astro";
|
||||
import { getSortedPosts } from "@utils/content-utils";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getSortedPosts();
|
||||
|
||||
// タグを集めるための Set の型を指定
|
||||
const allTags = posts.reduce<Set<string>>((acc, post) => {
|
||||
// biome-ignore lint/complexity/noForEach: <explanation>
|
||||
post.data.tags.forEach((tag) => acc.add(tag));
|
||||
return acc;
|
||||
}, new Set());
|
||||
|
||||
const allTagsArray = Array.from(allTags);
|
||||
|
||||
return allTagsArray.map((tag) => ({
|
||||
params: {
|
||||
tag: tag,
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
const tag = Astro.params.tag as string;
|
||||
---
|
||||
|
||||
<MainGridLayout title={i18n(I18nKey.archive)} description={i18n(I18nKey.archive)}>
|
||||
<ArchivePanel tags={[tag]}></ArchivePanel>
|
||||
</MainGridLayout>
|
||||
Reference in new issue
Block a user