Skip to content

Commit

Permalink
refactor: Update import statements in TimelineListItem.astro
Browse files Browse the repository at this point in the history
  • Loading branch information
EliaGuarnieri committed Jul 16, 2024
1 parent 83cfc45 commit 159679c
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions src/components/TimelineListItem.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { string } from 'astro/zod';
import { text } from 'd3';
import { string } from "astro/zod";
import { text } from "d3";
type Props = {
icon?: string;
Expand All @@ -13,39 +13,45 @@ type Props = {
pilltext?: string;
};
const { icon, title, info, published, approach, features, link, pilltext } = Astro.props;
const { icon, title, info, published, approach, features, link, pilltext } =
Astro.props;
const bgpills = () => {
if (pilltext === "Tool") return "bg-pink-700";
if (pilltext === "Tool") return "bg-pink-700";
if (pilltext === "UI") return "bg-blue-700";
if (pilltext === "Approach") return "bg-green-700";
if (pilltext === "Dataset") return "bg-teal-700";
}
};
---

<li class="relative mb-6 sm:mb-0 sm:w-1/4">
<div class="flex items-center">
<div
class="flex items-center justify-center w-6 h-6 bg-purple-600 rounded-full ring-0 ring-purple-500 ring-8 shrink-0"
class="flex items-center justify-center w-6 h-6 bg-purple-600 rounded-full ring-purple-500 ring-8 shrink-0"
>
<slot/>
<slot />
</div>
<div class="hidden sm:flex w-full bg-purple-500 h-0.5"></div>
</div>
<div class="mt-4 sm:pe-8 max-w-full">
<div>
<div>
<a href={link}
><h3 class="text-lg font-semibold text-foreground">
{title}
</h3>
</a>
<span class:list={["text-xs font-medium me-2 px-2.5 py-0.5 rounded-full", bgpills()]}>{pilltext}</span>
><h3 class="text-lg font-semibold text-foreground">
{title}
</h3>
</a>
<span
class:list={[
"text-xs font-medium me-2 px-2.5 py-0.5 rounded-full",
bgpills(),
]}>{pilltext}</span
>
</div>
<p class="block mt-2 mb-2 text-sm font-normal leading-none text-gray-500">
{info}
</p>
<p class="text-base font-bold text-purple-500">
{published}
</p>
<p class="text-sm font-semibold text-foreground text-gray-400">{features}</p>
<p class="text-sm font-semibold text-gray-400">{features}</p>
</div>
</li>

0 comments on commit 159679c

Please sign in to comment.