diff --git a/src/components/Card.astro b/src/components/Card.astro
index 63a38f5..1bf61da 100644
--- a/src/components/Card.astro
+++ b/src/components/Card.astro
@@ -1,36 +1,31 @@
---
-import { slugifyStr } from "@/utils/slugify";
import type { CollectionEntry } from "astro:content";
+import { slugifyStr } from "@/utils/slugify";
import { getPath } from "@/utils/getPath";
import Datetime from "./Datetime.astro";
-export interface Props extends CollectionEntry<"blog"> {
+type Props = {
variant?: "h2" | "h3";
-}
+} & CollectionEntry<"blog">;
-const { variant = "h2", data, id, filePath } = Astro.props;
+const { variant: Heading = "h2", id, data, filePath } = Astro.props;
-const { title, description, pubDatetime, modDatetime, timezone } = data;
-
-const headerProps = {
- style: { viewTransitionName: slugifyStr(title) },
- class: "text-lg font-medium decoration-dashed hover:underline",
-};
+const { title, description, ...props } = data;
---
- {
- variant === "h2" ? (
- {title}
- ) : (
- {title}
- )
- }
+
+ {title}
+
-
+
{description}
diff --git a/src/components/Datetime.astro b/src/components/Datetime.astro
index 000dd84..e16834f 100644
--- a/src/components/Datetime.astro
+++ b/src/components/Datetime.astro
@@ -8,13 +8,13 @@ import { SITE } from "@/config";
dayjs.extend(utc);
dayjs.extend(timezone);
-export interface Props {
+type Props = {
class?: string;
size?: "sm" | "lg";
- timezone: string | undefined;
pubDatetime: string | Date;
- modDatetime: string | Date | undefined | null;
-}
+ timezone?: string;
+ modDatetime?: string | Date | null;
+};
const {
pubDatetime,
@@ -37,7 +37,7 @@ const date = datetime.format("D MMM, YYYY"); // e.g., '22 Mar, 2025'
diff --git a/src/components/EditPost.astro b/src/components/EditPost.astro
index 79d7d5a..fe3726b 100644
--- a/src/components/EditPost.astro
+++ b/src/components/EditPost.astro
@@ -3,11 +3,11 @@ import type { CollectionEntry } from "astro:content";
import IconEdit from "@/assets/icons/IconEdit.svg";
import { SITE } from "@/config";
-export interface Props {
+type Props = {
hideEditPost?: CollectionEntry<"blog">["data"]["hideEditPost"];
class?: string;
post: CollectionEntry<"blog">;
-}
+};
const { hideEditPost, post, class: className = "" } = Astro.props;
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index 27d9f70..2283c7f 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -1,16 +1,20 @@
---
+import type { HTMLAttributes } from "astro/types";
import Socials from "./Socials.astro";
const currentYear = new Date().getFullYear();
-export interface Props {
+type Props = {
noMarginTop?: boolean;
-}
+} & HTMLAttributes<"footer">;
-const { noMarginTop = false } = Astro.props;
+const { noMarginTop = false, class: className, ...attrs } = Astro.props;
---
-