Skip to content

Commit

Permalink
みす
Browse files Browse the repository at this point in the history
  • Loading branch information
akku1139 authored Feb 15, 2024
1 parent 42dafcf commit 907499c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Articles.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//---
---
import { ofetch } from "ofetch";
import ArticleCard from "./ArticleCard.astro";
Expand Down Expand Up @@ -70,7 +70,7 @@ const compareDates = (a: { published_at: string } | { publish_at: string } | { c
};
const sortedData = combinedData.sort(compareDates);
console.log(sortedData);
//---
---

<div class="grid grid-cols-1 sms:grid-cols-2 sm:grid-cols-3 gap-2">
{
Expand All @@ -83,23 +83,23 @@ console.log(sortedData);
poster_name={article.user.name}
poster_icon_url={article.user.avatar_small_url}
tag={(article.article_type === "idea" ? {text: "IDEA", bg: "bg-violet-500"} : {text: "TECH", bg: "bg-blue-200"})}
></ArticleCard>);
/>);
} else if(article.site === "note") {
return (<ArticleCard
title={article.name}
link={`https://note.com/${article.user.urlname}/n/${article.key}`}
thumbnail={<img src={article.eyecatch || "./no-thumbnail.png"} class="border border-1 border-gray-400 w-full h-full object-cover rounded-t-xl h-full" />}
poster_name={article.user.name}
poster_icon_url={article.user.profile_image_path}
></ArticleCard>);
/>);
} else if(article.site === "qiita") {
return (<ArticleCard
title={article.title}
link={article.url}
thumbnail={<img src="https://cdn.qiita.com/assets/public/qiita-pwa-icon_512-4f5b031e6cb002cb865db0dd38635a78.png" class="border border-1 border-gray-400 w-full h-full object-cover rounded-t-xl h-full" />}
poster_name={article.user.id}
poster_icon_url={article.user.profile_image_url}
></ArticleCard>);
/>);
}
})
}
Expand Down

0 comments on commit 907499c

Please sign in to comment.