My personal site hosted @ https://indexx.dev

feat: link my Hardcover account and my new fediverse account

Index 9bfda9b3 d4465064

Changed files
+49 -7
public
src
components
-4
public/style.css
···
--animatedBorder: 360deg;
}
}
-
-
/*
-
not sure why this file didn't fucking update
-
*/
+11 -1
src/components/SocialLinks.astro
···
---
import Bluesky from "./icons/Bluesky.astro";
+
import Book from "./icons/Book.astro";
import Discord from "./icons/Discord.astro";
import Github from "./icons/Github.astro";
import Lastfm from "./icons/Lastfm.astro";
···
href: "https://github.com/indexxing/",
},
{
+
icon: Book,
+
name: "Hardcover",
+
href: "https://hardcover.app/@indexcard",
+
},
+
{
icon: Mastodon,
name: "Mastodon",
-
href: "https://mastodon.social/@indexcard",
+
href: "https://mastodon.social/@index@indexx.dev",
+
tooltip: {
+
title: "My GoToSocial instance: @index@indexx.dev",
+
placement: "top",
+
},
},
{
icon: Lastfm,
+31
src/components/icons/Book.astro
···
+
---
+
const props = Astro.props;
+
---
+
+
<svg
+
xmlns="http://www.w3.org/2000/svg"
+
width="24"
+
height="24"
+
viewBox="0 0 24 24"
+
{...props}
+
>
+
<g fill="none">
+
<rect
+
width="16"
+
height="18"
+
x="4"
+
y="3"
+
fill="currentColor"
+
fill-opacity="0.25"
+
rx="2"></rect>
+
<path
+
stroke="currentColor"
+
stroke-linecap="round"
+
d="M8.5 6.5h7m-7 3h4m-4 3h6"
+
stroke-width="1"></path>
+
<path
+
fill="currentColor"
+
d="M4 19a2 2 0 0 1 2-2h11c.932 0 1.398 0 1.765-.152a2 2 0 0 0 1.083-1.083C20 15.398 20 14.932 20 14v3c0 1.886 0 2.828-.586 3.414S17.886 21 16 21H6a2 2 0 0 1-2-2"
+
></path>
+
</g>
+
</svg>
+7 -2
src/components/islands/Status.jsx
···
const now = new Date();
const diff = now.getTime() - date.getTime();
+
const days = Math.floor(diff / (1000 * 60 * 60 * 24)); // Calculate days
+
+
if (days >= 2) {
+
return null; // Don't render the component if it's been 2 or more days
+
}
+
const minutes = Math.floor(diff / 60000);
const hours = Math.floor(minutes / 60);
-
const days = Math.floor(hours / 24);
let timeAgo = "just now";
if (days > 0) timeAgo = `${days} days ago`;
else if (hours > 0) timeAgo = `${hours} hours ago`;
else if (minutes > 0) timeAgo = `${minutes} minutes ago`;
-
const oldStatusClasses = days > 3
+
const oldStatusClasses = days >= 1
? "opacity-75 text-decoration-line-through"
: "";