Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

✨ feat: update og image and icon

Dillion Vermaa6fa2fedbbe5
diff --git a/app/api/og/route.tsx b/app/api/og/route.tsx
index 8a498988..7599e86b 100644
--- a/app/api/og/route.tsx
+++ b/app/api/og/route.tsx
@@ -3,16 +3,31 @@ import { ImageResponse } from "next/og";
export const runtime = "edge";
-const interSemiBold = fetch(
- new URL("../../../assets/fonts/Inter-SemiBold.ttf", import.meta.url),
+const inter600 = fetch(
+ new URL(
+ `../../../node_modules/@fontsource/inter/files/inter-latin-600-normal.woff`,
+ import.meta.url,
+ ),
+).then((res) => res.arrayBuffer());
+
+const inter700 = fetch(
+ new URL(
+ `../../../node_modules/@fontsource/inter/files/inter-latin-700-normal.woff`,
+ import.meta.url,
+ ),
).then((res) => res.arrayBuffer());
const image = fetch(
- new URL("../../../assets/images/og-bg.png", import.meta.url),
+ new URL("../../../assets/images/og-bg-2.png", import.meta.url),
).then((res) => res.arrayBuffer());
+const logo = fetch(new URL("../../../app/icon.png", import.meta.url)).then(
+ (res) => res.arrayBuffer(),
+);
+
export async function GET(req: Request) {
const imageData = await image;
+ const logoData = await logo;
const url = new URL(req.url);
const params = Object.fromEntries(url.searchParams);
@@ -21,28 +36,12 @@ export async function GET(req: Request) {
try {
return new ImageResponse(
(
- <div
- style={{
- display: "flex",
- justifyContent: "center",
- alignItems: "center",
- flexDirection: "column",
- position: "relative",
- width: "100%",
- height: "100%",
- }}
- >
- {/* @ts-ignore */}
+ <div tw="flex justify-center flex-col relative w-full h-full items-center bg-white">
<img
+ tw="absolute inset-0 w-full h-full"
+ alt={title}
// @ts-ignore
src={imageData}
- alt={title}
- style={{
- position: "absolute",
- inset: 0,
- width: "100%",
- height: "100%",
- }}
/>
{/* Lighting Effects */}
@@ -53,38 +52,75 @@ export async function GET(req: Request) {
width: "100%",
height: "100%",
backgroundImage:
- "radial-gradient(circle at 0% 15%, rgba(171, 112, 243, 0.1), rgba(0,0,0,0) 40%), radial-gradient(circle at 100% 85%, rgba(233, 132, 23, 0.1),rgba(0,0,0,0) 40%)",
+ "radial-gradient(circle at 0% 15%, #FFBD7A22, rgba(0,0,0,0) 40%), radial-gradient(circle at 100% 85%, #9E7AFF22,rgba(0,0,0,0) 40%)",
}}
></div> */}
+ <h1 tw="absolute inset-0 flex justify-center items-center mb-55 flex-row">
+ <img
+ tw="h-12 w-12"
+ alt={title}
+ // @ts-ignore
+ src={logoData}
+ />
+ <span
+ tw="ml-4"
+ style={{
+ background:
+ // "linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%)",
+ "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 1) 100%)",
+ backgroundClip: "text",
+ WebkitBackgroundClip: "text",
+ color: "transparent",
+ fontSize: 40,
+ letterSpacing: "-1.5px",
+ ...font("Inter 700"),
+ }}
+ >
+ Magic UI
+ </span>
+ </h1>
+
{title && (
<p
style={{
- fontSize: 150,
+ position: "absolute",
+ whiteSpace: "pre-wrap",
+ // background:
+ // "linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%)",
+ // background:
+ // "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 0.6) 100%)",
background:
- "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 0.6) 100%)",
+ "linear-gradient(315deg,#9E7AFF 0%,#FE8BBB 33.33%,#FFBD7A 66.67%,#F8EAC3 100%)",
backgroundClip: "text",
WebkitBackgroundClip: "text",
+ textAlign: "center",
+ fontSize: 150,
+ letterSpacing: "-10px",
color: "transparent",
+ WebkitTextFillColor: "transparent",
+ ...font("Inter 600"),
}}
>
{title}
</p>
)}
- <h1 tw="text-gray-300 font-medium bg-clip-text bg-gradient-to-b from-white to-gray-300/90 mx-auto text-center text-3xl">
+
+ <h1 tw="absolute inset-0 flex justify-center items-center mt-55 flex-col">
<span
style={{
- letterSpacing: 1,
- opacity: 0.8,
background:
- "linear-gradient(90deg, rgba(171, 112, 243, 1) 0%, rgba(238, 90, 132, 1) 50%, rgba(233, 132, 23, 1) 100%)",
+ "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 1) 100%)",
+ // "linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%)",
backgroundClip: "text",
- // @ts-ignore
- "-webkit-background-clip": "text",
+ WebkitBackgroundClip: "text",
color: "transparent",
+ fontSize: 25,
+ letterSpacing: "-1.5px",
+ ...font("Inter 700"),
}}
>
- Beautifully Crafted React + Tailwind CSS components
+ Create magical landing pages in minutes.
</span>
</h1>
</div>
@@ -94,10 +130,12 @@ export async function GET(req: Request) {
height: 630,
fonts: [
{
- name: "Inter",
- data: await interSemiBold,
- style: "normal",
- weight: 400,
+ name: "Inter 600",
+ data: await inter600,
+ },
+ {
+ name: "Inter 700",
+ data: await inter700,
},
],
},
@@ -109,3 +147,7 @@ export async function GET(req: Request) {
});
}
}
+
+function font(fontFamily: string) {
+ return { fontFamily };
+}
diff --git a/app/apple-icon.png b/app/apple-icon.png
index 6c68be2c..71a4e841 100644
Binary files a/app/apple-icon.png and b/app/apple-icon.png differ
diff --git a/app/favicon.ico b/app/favicon.ico
index 7f89e8fc..2aae2aa8 100644
Binary files a/app/favicon.ico and b/app/favicon.ico differ
diff --git a/app/icon.png b/app/icon.png
index 6c68be2c..f6023e45 100644
Binary files a/app/icon.png and b/app/icon.png differ
diff --git a/app/icon.svg b/app/icon.svg
deleted file mode 100644
index 70105f5e..00000000
--- a/app/icon.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0_6_3)">
-<g clip-path="url(#clip1_6_3)">
-<rect width="512" height="512" rx="30" fill="black"/>
-<path d="M406.336 125.563L386.37 105.597C384.615 103.824 382.526 102.416 380.223 101.455C377.921 100.495 375.45 100 372.955 100C370.46 100 367.99 100.495 365.688 101.455C363.385 102.416 361.296 103.824 359.541 105.597L105.597 359.541C103.824 361.296 102.416 363.385 101.455 365.688C100.495 367.99 100 370.46 100 372.955C100 375.45 100.495 377.921 101.455 380.223C102.416 382.526 103.824 384.615 105.597 386.37L125.563 406.336C127.307 408.129 129.393 409.553 131.697 410.526C134.001 411.499 136.477 412 138.978 412C141.479 412 143.955 411.499 146.259 410.526C148.563 409.553 150.648 408.129 152.393 406.336L406.336 152.393C408.129 150.648 409.553 148.563 410.526 146.259C411.499 143.955 412 141.479 412 138.978C412 136.477 411.499 134.001 410.526 131.697C409.553 129.393 408.129 127.307 406.336 125.563Z" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M287 178L334 225" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M147 162V225" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M365 287V350" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M225 100V131" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M178 194H116" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M396 318H334" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M240 116H209" stroke="white" stroke-width="32" stroke-linecap="round" stroke-linejoin="round"/>
-</g>
-</g>
-<defs>
-<clipPath id="clip0_6_3">
-<rect width="512" height="512" fill="white"/>
-</clipPath>
-<clipPath id="clip1_6_3">
-<rect width="512" height="512" fill="white"/>
-</clipPath>
-</defs>
-</svg>
diff --git a/assets/images/og-bg-2.png b/assets/images/og-bg-2.png
new file mode 100644
index 00000000..3f639fd7
Binary files /dev/null and b/assets/images/og-bg-2.png differ
diff --git a/assets/images/og-bg-3.png b/assets/images/og-bg-3.png
new file mode 100644
index 00000000..2ca84b3a
Binary files /dev/null and b/assets/images/og-bg-3.png differ
diff --git a/components/icons.tsx b/components/icons.tsx
index 14c8288e..b6610b8e 100644
--- a/components/icons.tsx
+++ b/components/icons.tsx
@@ -21,14 +21,15 @@ import {
SunMedium,
Trash,
User,
- Wand2,
X,
} from "lucide-react";
export type IconProps = React.HTMLAttributes<SVGElement>;
export const Icons = {
- logo: Wand2,
+ logo: ({ className, ...props }: { className: string }) => (
+ <img src="/icon.png" alt="Magic UI" className={className} {...props} />
+ ),
close: X,
spinner: Loader2,
chevronLeft: ChevronLeft,
diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png
index d91e4d34..15a57a16 100644
Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differ
diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png
index d9d56e7b..dbe40ee4 100644
Binary files a/public/android-chrome-512x512.png and b/public/android-chrome-512x512.png differ