From afdc982863b6cca573f1db58e1795aa8c45fabca Mon Sep 17 00:00:00 2001
From: schererleander <leander@schererleander.de>
Date: Fri, 30 May 2025 01:01:17 +0200
Subject: rewrite site

---
 src/components/CardLink.tsx | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 src/components/CardLink.tsx

(limited to 'src/components/CardLink.tsx')

diff --git a/src/components/CardLink.tsx b/src/components/CardLink.tsx
new file mode 100644
index 0000000..3492038
--- /dev/null
+++ b/src/components/CardLink.tsx
@@ -0,0 +1,29 @@
+import ExternalLinkIcon from "./ExternalLink";
+
+interface Props {
+  title: string;
+  body: string;
+  href?: string;
+  imgSrc?: string;
+}
+
+export default function CardLink({ title, body, href, imgSrc }: Props) {
+  const Wrapper = href ? 'a' : 'div';
+  return (
+    <Wrapper
+      {...(href && {
+        href,
+        target: '_blank',
+        rel: 'noopener noreferrer',
+      })}
+      className="group flex items-center gap-4 py-2 px-2 rounded-lg"
+    >
+      <img src={imgSrc || ''} className="w-20 h-20 object-cover rounded-lg transition-transform duration-200 group-hover:scale-105"/>
+      <div className="flex-1">
+        <h3 className="font-medium">{title}</h3>
+        <p className="text-sm text-gray-600 black:text-gray-300">{body}</p>
+      </div>
+      {href && <ExternalLinkIcon />}
+    </Wrapper>
+  );
+}
\ No newline at end of file
-- 
cgit v1.3.1

