diff options
Diffstat (limited to 'src/components/BlogItem.astro')
| -rw-r--r-- | src/components/BlogItem.astro | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/components/BlogItem.astro b/src/components/BlogItem.astro deleted file mode 100644 index 8440d85..0000000 --- a/src/components/BlogItem.astro +++ /dev/null @@ -1,40 +0,0 @@ ---- -import TerminalBorder from "@components/TerminalBorder.astro"; - -function formatDate(date: Date) { - const day = date.getDate(); - const month = date.toLocaleString("default", { month: "long" }); - const year = date.getFullYear(); - return `${month} ${day}, ${year}`; -} - -interface Props { - title: string; - description: string; - date: Date; - href?: string; - header?: string; -} - -const { title, description, date, href, header } = Astro.props; ---- - -<TerminalBorder header={header} footer={formatDate(date)} extra="mr-[0.1vw] sm:mr-0 mb-[5vw] sm:mb-[2vw]"> - <span class="cursor-pointer group block w-full"> - { - href ? ( - <a href={href} style="all: unset;"> - <h1 class="text-[130%] text-[var(--accent)] group-hover:underline"> - {title} - </h1> - <p class="text-[var(--secondary)]">{description}</p> - </a> - ) : ( - <> - <h1 class="text-[130%] text-[var(--accent)]">{title}</h1> - <p class="text-[var(--secondary)]">{description}</p> - </> - ) - } - </span> -</TerminalBorder> |
