From 6d39cee75e7ef7c5e06d1a745a32224e11d68c37 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 23 Jan 2026 23:16:45 +0800 Subject: HALF WORK! --- www-2/src/components/ArticlePreviewList.astro | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 www-2/src/components/ArticlePreviewList.astro (limited to 'www-2/src/components/ArticlePreviewList.astro') diff --git a/www-2/src/components/ArticlePreviewList.astro b/www-2/src/components/ArticlePreviewList.astro new file mode 100644 index 0000000..abe54f2 --- /dev/null +++ b/www-2/src/components/ArticlePreviewList.astro @@ -0,0 +1,35 @@ +--- +import ArticlePreview, { + type Props as ArticlePreviewProps, +} from "./ArticlePreview.astro"; + +type Props = { + articles: ArticlePreviewProps["article"][]; +} & Omit; + +export type { Props }; + +const { articles, ...otherProps } = Astro.props; +--- + +{ + articles.length > 0 && ( + + ) +} + +{ + articles.slice(1).map((a) => ( + <> +
+ + + )) +} + + -- cgit v1.2.3