From 293869e1743c925519d938ebeeff033c773a1ec6 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 7 Feb 2024 16:57:47 +0000
Subject: [ui] Styling the bookmarks page

---
 web/components/ui/imageCard.tsx | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 web/components/ui/imageCard.tsx

(limited to 'web/components/ui/imageCard.tsx')

diff --git a/web/components/ui/imageCard.tsx b/web/components/ui/imageCard.tsx
new file mode 100644
index 00000000..1394ae08
--- /dev/null
+++ b/web/components/ui/imageCard.tsx
@@ -0,0 +1,56 @@
+import * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+export function ImageCard({
+  children,
+  image,
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement> & { image?: string }) {
+  return (
+    <div
+      className={cn("h-96 rounded-lg overflow-hidden shadow-md", className)}
+      {...props}
+    >
+      <div
+        className="h-3/5 bg-cover bg-center"
+        style={{
+          backgroundImage: image ? `url(${image})` : undefined,
+        }}
+      ></div>
+      <div className="flex flex-col h-2/5 p-2">{children}</div>
+    </div>
+  );
+}
+
+export function ImageCardTitle({
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+  return (
+    <div
+      className={cn("order-first flex-none font-bold text-lg", className)}
+      {...props}
+    />
+  );
+}
+
+export function ImageCardBody({
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+  return (
+    <div
+      className={cn("grow order-1 font-bold text-lg", className)}
+      {...props}
+    />
+  );
+}
+
+export function ImageCardFooter({
+  className,
+  ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+  return <div className={cn("order-last", className)} {...props} />;
+}
-- 
cgit v1.2.3-70-g09d2

