feat: change PinnedItem to PortfolioItem and surrounding changes

Changed files
+27 -11
src
+5 -1
src/components/Pinned.astro
···
---
import Label from "./Label.astro"
-
import Item from "./PinnedItem.astro"
+
import Item from "./PortfolioItem.astro"
---
<div class="flex flex-col p-8 border-ctp-surface0 border w-full h-min relative">
···
subtitle="An MCC Island Discord statistics bot that renders beautiful stat cards to show off your stats."
icon="Archive"
href="https://islestats.net"
+
tag="Python"
+
tagcolor="--catppuccin-color-blue"
badges={[
{
icon: "Github",
···
subtitle="An indie software development studio for the creative and insane, founded by me!"
icon="Users"
href="https://tangled.org/@banana.tngl.sh/dotfiles"
+
tag="Java"
+
tagcolor="--catppuccin-color-teal"
badges={[
{
icon: "Mail",
+18 -5
src/components/PinnedItem.astro src/components/PortfolioItem.astro
···
icon: string,
title: string,
subtitle: string,
+
tag?: string,
+
tagcolor?: string,
href: string
badges: Badge[]
}
-
const { type, title, subtitle, icon, badges, href } = Astro.props
+
const { type, icon, title, subtitle, tag, tagcolor, href, badges } = Astro.props
-
var color
+
var color = "--catppuccin-color-yellow"
if (type=="project") {
color = "--catppuccin-color-red"
} else if (type=="repo") {
···
color = "--catppuccin-color-mauve"
} else if (type=="misc") {
color = "--catppuccin-color-maroon"
+
} else if (type=="freelance") {
+
color = "--catppuccin-color-sky"
}
-
color = "var(" + color + ")"
+
const colorCss = "var(" + color + ")"
import LucideIcon from "./LucideIcon.astro";
import Badgebar from "./Badgebar.astro"
+
import Tag from "./Tag.astro"
---
<div class="p-4 border border-ctp-surface0 flex flex-col -mt-px w-full">
<div class="flex justify-between gap-16">
<a href=`${href}` class="flex flex-col gap-1 group">
-
<span class="text-xl flex gap-2 items-center font-bold group-hover:underline">
-
<LucideIcon name=`${icon}` width="20" height="20" style={`stroke:${color}`} /> {title}</span>
+
<span class="text-xl flex gap-2 items-center">
+
<LucideIcon name=`${icon}` width="20" height="20" style={`stroke:${colorCss}`} />
+
<span class="group-hover:underline font-bold">{title} </span>
+
{tag && tagcolor && (
+
<Tag text={tag} color={tagcolor} />
+
)}
+
</span>
<span class="text-sm">
<span class="flex gap-1">{subtitle}</span>
</span>
</a>
<Badgebar badges={badges} size="20"/>
+
</div>
+
<div>
+
<slot/>
</div>
</div>
+1 -1
src/components/Quote.astro
···
quoteElement.textContent = '"' + quote.quote + '"'
quoteeElement.textContent = "- " + quote.quotee
</script>
-
<span class="relative p-3 -mt-px border border-ctp-surface0 text-ctp-subtext0 text-sm w-full">
+
<span class="relative p-3 -mt-px border border-ctp-surface0 text-sm w-full">
<Label name="Quote"/>
<div class="flex flex-col text-sm gap-1">
<span id="quote" class="italic"></span>
+3 -4
src/components/Tag.astro
···
}
const { text, color } = Astro.props
-
const bgColorCss = "var(" + color + "-950)"
-
const borderColorCss = "var(" + color + "-800)"
+
const colorCss = "var(" + color + "-700)"
---
-
<span class="p-0.5 pl-2 pr-2 border text-xs rounded-full scale-95 font-extrabold"
-
style={`background:${bgColorCss};border-color:${borderColorCss};`}>
+
<span class="p-1 pl-2 pr-2 text-xs rounded-full scale-95 font-bold bg-ctp-base border border-ctp-surface0"
+
style={`color:${colorCss};`}>
{text}
</span>