mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-07 04:19:22 +00:00
Og image generator and small fix (#4)
* feat: og and ui * fix: lines and border issue * fix: changelog ux * fix: better * fix: ui revamp * feat: og image and small fix * fix: docs and parsing
This commit is contained in:
committed by
GitHub
parent
d17f151dff
commit
2a576c8ff3
1
docs/README.md
Normal file
1
docs/README.md
Normal file
@@ -0,0 +1 @@
|
||||
# Better-auth docs site
|
||||
345
docs/app/api/og/route.tsx
Normal file
345
docs/app/api/og/route.tsx
Normal file
@@ -0,0 +1,345 @@
|
||||
import { ImageResponse } from "@vercel/og";
|
||||
import { z } from "zod";
|
||||
import { Plus } from "lucide-react";
|
||||
export const runtime = "edge";
|
||||
const ogSchema = z.object({
|
||||
heading: z.string(),
|
||||
mode: z.string(),
|
||||
type: z.string(),
|
||||
});
|
||||
// Use this example object to work with og image generator
|
||||
|
||||
// const ogData = {
|
||||
// heading: "This is a test heading for the page",
|
||||
// mode: "dark",
|
||||
// type: "documentation",
|
||||
// };
|
||||
function GridPattern({
|
||||
width = 40,
|
||||
height = 40,
|
||||
x = -1,
|
||||
y = -1,
|
||||
squares,
|
||||
strokeDasharray = "1 1 1",
|
||||
}: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
squares?: [number, number][];
|
||||
strokeDasharray?: string;
|
||||
}) {
|
||||
const id = Math.random().toString(36).substr(2, 9);
|
||||
|
||||
return (
|
||||
<svg
|
||||
width="100%"
|
||||
height="100%"
|
||||
style={{
|
||||
pointerEvents: "none",
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
fill: "rgba(107, 114, 128, 0.3)",
|
||||
stroke: "rgba(107, 114, 128, 0.3)",
|
||||
}}
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<defs
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
}}
|
||||
>
|
||||
<pattern
|
||||
id={id}
|
||||
width={width}
|
||||
height={height}
|
||||
patternUnits="userSpaceOnUse"
|
||||
x={x}
|
||||
y={y}
|
||||
>
|
||||
<path
|
||||
d={`M.5 ${height}V.5H${width}`}
|
||||
fill="none"
|
||||
stroke="rgba(255,255,255,0.1)"
|
||||
strokeDasharray={strokeDasharray}
|
||||
/>
|
||||
</pattern>
|
||||
</defs>
|
||||
<defs
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
}}
|
||||
>
|
||||
<pattern
|
||||
id={id}
|
||||
width={width}
|
||||
height={height}
|
||||
patternUnits="userSpaceOnUse"
|
||||
x={x}
|
||||
y={y}
|
||||
>
|
||||
<path
|
||||
d={`M.5 ${height}V.5H${width}`}
|
||||
fill="none"
|
||||
stroke="rgba(255,255,255,0.1)"
|
||||
strokeDasharray={strokeDasharray}
|
||||
/>
|
||||
</pattern>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" strokeWidth={0} fill={`url(#${id})`} />
|
||||
{squares && (
|
||||
<svg x={x} y={y}>
|
||||
{squares.map(([squareX, squareY]) => (
|
||||
<rect
|
||||
key={`${squareX}-${squareY}`}
|
||||
width={width - 1}
|
||||
height={height - 1}
|
||||
x={squareX * width + 1}
|
||||
y={squareY * height + 1}
|
||||
fill="rgba(255,255,255,0.05)"
|
||||
/>
|
||||
))}
|
||||
</svg>
|
||||
)}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export async function GET(req: Request) {
|
||||
try {
|
||||
const geist = await fetch(
|
||||
new URL("../../../assets/Geist.ttf", import.meta.url),
|
||||
).then((res) => res.arrayBuffer());
|
||||
const geistMono = await fetch(
|
||||
new URL("../../../assets/GeistMono.ttf", import.meta.url),
|
||||
).then((res) => res.arrayBuffer());
|
||||
|
||||
const url = new URL(req.url);
|
||||
const urlParamsValues = Object.fromEntries(url.searchParams);
|
||||
// this is used with the above example
|
||||
// const validParams = ogSchema.parse(ogData);
|
||||
const validParams = ogSchema.parse(urlParamsValues);
|
||||
console.log({ urlParamsValues });
|
||||
console.log("THE VALUD PARAMS: ", { validParams });
|
||||
const { heading, type, mode } = validParams;
|
||||
const trueHeading =
|
||||
heading.length > 140 ? `${heading.substring(0, 140)}...` : heading;
|
||||
|
||||
const paint = mode === "dark" ? "#fff" : "#000";
|
||||
|
||||
const fontSize = trueHeading.length > 100 ? "30px" : "60px";
|
||||
return new ImageResponse(
|
||||
(
|
||||
<div
|
||||
tw="flex w-full relative flex-col p-9"
|
||||
style={{
|
||||
color: paint,
|
||||
backgroundColor: "transparent",
|
||||
border: "1px solid rgba(255, 255, 255, 0.1)",
|
||||
boxShadow: "0 -20px 80px -20px rgba(134, 134, 240, 0.1) inset",
|
||||
background: mode === "dark" ? "#1A0D0D" : "white",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
tw={`relative flex flex-col w-full h-full border-2 border-[${paint}]/20 p-8}`}
|
||||
>
|
||||
<GridPattern
|
||||
width={40}
|
||||
height={40}
|
||||
squares={[
|
||||
[1, 3],
|
||||
[2, 1],
|
||||
[5, 3],
|
||||
[4, 1],
|
||||
[-1, -1],
|
||||
]}
|
||||
/>
|
||||
<svg
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: "-9px",
|
||||
right: "-9px",
|
||||
}}
|
||||
width="17"
|
||||
height="17"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M7 1a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1H1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V8a1 1 0 0 1 1-1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H8a1 1 0 0 1-1-1V1z"
|
||||
fill="#ada8c4"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<svg
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: "-9px",
|
||||
left: "-9px",
|
||||
}}
|
||||
width="17"
|
||||
height="17"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M7 1a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1H1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V8a1 1 0 0 1 1-1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H8a1 1 0 0 1-1-1V1z"
|
||||
fill="#ada8c4"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
style={{
|
||||
position: "absolute",
|
||||
bottom: "-9px",
|
||||
left: "-9px",
|
||||
}}
|
||||
width="17"
|
||||
height="17"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M7 1a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1H1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V8a1 1 0 0 1 1-1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H8a1 1 0 0 1-1-1V1z"
|
||||
fill="#ada8c4"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
style={{
|
||||
position: "absolute",
|
||||
bottom: "-9px",
|
||||
right: "-9px",
|
||||
}}
|
||||
width="17"
|
||||
height="17"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M7 1a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1H1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V8a1 1 0 0 1 1-1h2a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H8a1 1 0 0 1-1-1V1z"
|
||||
fill="#ada8c4"
|
||||
/>
|
||||
</svg>
|
||||
<svg
|
||||
width="110"
|
||||
height="110"
|
||||
viewBox="0 0 200 200"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<rect width="200" height="200" fill="#D9D9D9" />
|
||||
<line
|
||||
x1="21.5"
|
||||
y1="2.18557e-08"
|
||||
x2="21.5"
|
||||
y2="200"
|
||||
stroke="#C4C4C4"
|
||||
/>
|
||||
<line
|
||||
x1="173.5"
|
||||
y1="2.18557e-08"
|
||||
x2="173.5"
|
||||
y2="200"
|
||||
stroke="#C4C4C4"
|
||||
/>
|
||||
<line
|
||||
x1="200"
|
||||
y1="176.5"
|
||||
x2="-4.37114e-08"
|
||||
y2="176.5"
|
||||
stroke="#C4C4C4"
|
||||
/>
|
||||
<line
|
||||
x1="200"
|
||||
y1="24.5"
|
||||
x2="-4.37114e-08"
|
||||
y2="24.5"
|
||||
stroke="#C4C4C4"
|
||||
/>
|
||||
<path
|
||||
d="M64.4545 135V65.1818H88.8636C93.7273 65.1818 97.7386 66.0227 100.898 67.7045C104.057 69.3636 106.409 71.6023 107.955 74.4205C109.5 77.2159 110.273 80.3182 110.273 83.7273C110.273 86.7273 109.739 89.2045 108.67 91.1591C107.625 93.1136 106.239 94.6591 104.511 95.7955C102.807 96.9318 100.955 97.7727 98.9545 98.3182V99C101.091 99.1364 103.239 99.8864 105.398 101.25C107.557 102.614 109.364 104.568 110.818 107.114C112.273 109.659 113 112.773 113 116.455C113 119.955 112.205 123.102 110.614 125.898C109.023 128.693 106.511 130.909 103.08 132.545C99.6477 134.182 95.1818 135 89.6818 135H64.4545ZM72.9091 127.5H89.6818C95.2045 127.5 99.125 126.432 101.443 124.295C103.784 122.136 104.955 119.523 104.955 116.455C104.955 114.091 104.352 111.909 103.148 109.909C101.943 107.886 100.227 106.273 98 105.068C95.7727 103.841 93.1364 103.227 90.0909 103.227H72.9091V127.5ZM72.9091 95.8636H88.5909C91.1364 95.8636 93.4318 95.3636 95.4773 94.3636C97.5455 93.3636 99.1818 91.9545 100.386 90.1364C101.614 88.3182 102.227 86.1818 102.227 83.7273C102.227 80.6591 101.159 78.0568 99.0227 75.9205C96.8864 73.7614 93.5 72.6818 88.8636 72.6818H72.9091V95.8636ZM131.665 135.545C129.983 135.545 128.54 134.943 127.335 133.739C126.131 132.534 125.528 131.091 125.528 129.409C125.528 127.727 126.131 126.284 127.335 125.08C128.54 123.875 129.983 123.273 131.665 123.273C133.347 123.273 134.79 123.875 135.994 125.08C137.199 126.284 137.801 127.727 137.801 129.409C137.801 130.523 137.517 131.545 136.949 132.477C136.403 133.409 135.665 134.159 134.733 134.727C133.824 135.273 132.801 135.545 131.665 135.545Z"
|
||||
fill="#302208"
|
||||
/>
|
||||
</svg>
|
||||
<div tw="flex flex-col flex-1 py-10">
|
||||
<div
|
||||
style={{ fontFamily: "GeistMono", fontWeight: "normal" }}
|
||||
tw="relative flex text-xl uppercase font-bold tracking-tight"
|
||||
>
|
||||
{type}
|
||||
</div>
|
||||
<div
|
||||
tw="flex max-w-[70%] mt-5 tracking-tighter leading-[1.1] text-[30px] font-bold"
|
||||
style={{
|
||||
fontWeight: "bold",
|
||||
marginLeft: "-3px",
|
||||
fontSize,
|
||||
|
||||
fontFamily: "GeistMono",
|
||||
}}
|
||||
>
|
||||
{trueHeading}
|
||||
</div>
|
||||
</div>
|
||||
<div tw="flex items-center w-full justify-between">
|
||||
<div
|
||||
tw="flex text-xl"
|
||||
style={{ fontFamily: "GeistMono", fontWeight: "semibold" }}
|
||||
>
|
||||
Better Auth
|
||||
</div>
|
||||
<div tw="flex gap-2 items-center text-xl">
|
||||
<div
|
||||
style={{
|
||||
fontFamily: "GeistMono",
|
||||
}}
|
||||
tw="flex ml-2"
|
||||
>
|
||||
<svg width="32" height="32" viewBox="0 0 48 48" fill="none">
|
||||
<path
|
||||
d="M30 44v-8a9.6 9.6 0 0 0-2-7c6 0 12-4 12-11 .16-2.5-.54-4.96-2-7 .56-2.3.56-4.7 0-7 0 0-2 0-6 3-5.28-1-10.72-1-16 0-4-3-6-3-6-3-.6 2.3-.6 4.7 0 7a10.806 10.806 0 0 0-2 7c0 7 6 11 12 11a9.43 9.43 0 0 0-1.7 3.3c-.34 1.2-.44 2.46-.3 3.7v8"
|
||||
stroke={paint}
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M18 36c-9.02 4-10-4-14-4"
|
||||
stroke={paint}
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
github.com/better-auth/better-auth
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
{
|
||||
width: 1200,
|
||||
height: 630,
|
||||
fonts: [
|
||||
{
|
||||
name: "Geist",
|
||||
data: geist,
|
||||
weight: 400,
|
||||
style: "normal",
|
||||
},
|
||||
{
|
||||
name: "GeistMono",
|
||||
data: geistMono,
|
||||
weight: 700,
|
||||
style: "normal",
|
||||
},
|
||||
],
|
||||
},
|
||||
);
|
||||
} catch (err) {
|
||||
console.log({ err });
|
||||
|
||||
return new Response("Failed to generate the og image", { status: 500 });
|
||||
}
|
||||
}
|
||||
39
docs/app/changelogs/_logs/2024-08-09.tsx
Normal file
39
docs/app/changelogs/_logs/2024-08-09.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import { AnimatePresence } from "@/components/ui/fade-in"
|
||||
|
||||
const ChangelogOne = () => {
|
||||
return (
|
||||
<AnimatePresence>
|
||||
<div className="flex flex-col gap-4 items-start justify-center max-w-full md:max-w-2xl">
|
||||
<img src="https://camo.githubusercontent.com/3282afc585d07e52e883ac2345467841e5c9cbe3befdec9dd6f84c603748e0d4/68747470733a2f2f726573656e642e636f6d2f5f6e6578742f696d6167653f75726c3d253246737461746963253246706f737473253246776562686f6f6b732e6a706726773d36343026713d3735" className="w-full h-[400px] object-cover rounded-lg" />
|
||||
<div className="flex flex-col gap-2">
|
||||
<h2 className="text-2xl font-bold tracking-tighter">
|
||||
Commit message suggestions
|
||||
</h2>
|
||||
</div>
|
||||
<p className="text-gray-600 dark:text-gray-300 text-[0.855rem]">
|
||||
In the latest release, I've added support for commit message and description suggestions via an integration with OpenAI. Commit looks at all of your changes, and feeds that into the machine with a bit of prompt-tuning to get back a commit message that does a surprisingly good job at describing the intent of your changes.
|
||||
It's also been a pretty helpful way to remind myself what the hell I was working on at the end of the day yesterday when I get back to my computer and realize I didn't commit any of my work.
|
||||
</p>
|
||||
<div className="flex flex-col gap-2">
|
||||
<h4 className="text-xl tracking-tighter"> Improvement</h4>
|
||||
</div>
|
||||
<ul className="list-disc ml-10 text-[0.855rem] text-gray-600 dark:text-gray-300">
|
||||
<li>
|
||||
Added commit message and description suggestions powered by OpenAI
|
||||
</li>
|
||||
<li>
|
||||
Started commit message and description suggestions powered by OpenAI
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Restored message and description suggestions powered by OpenAI
|
||||
</li>
|
||||
<li>
|
||||
Added commit message and description suggestions powered by OpenAI
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</AnimatePresence >
|
||||
)
|
||||
}
|
||||
export default ChangelogOne
|
||||
@@ -2,6 +2,7 @@ import { getPage, getPages } from "@/app/source";
|
||||
import type { Metadata } from "next";
|
||||
import { DocsPage, DocsBody, DocsTitle } from "fumadocs-ui/page";
|
||||
import { notFound } from "next/navigation";
|
||||
import { absoluteUrl } from "@/lib/utils";
|
||||
|
||||
export default async function Page({
|
||||
params,
|
||||
@@ -13,7 +14,6 @@ export default async function Page({
|
||||
if (page == null) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const MDX = page.data.exports.default;
|
||||
|
||||
return (
|
||||
@@ -49,11 +49,37 @@ export async function generateStaticParams() {
|
||||
|
||||
export function generateMetadata({ params }: { params: { slug?: string[] } }) {
|
||||
const page = getPage(params.slug);
|
||||
|
||||
if (page == null) notFound();
|
||||
const baseUrl = process.env.NEXT_APP_PUBLIC_URL;
|
||||
const url = new URL(`${baseUrl}/api/og`);
|
||||
const { title, description } = page.data;
|
||||
const pageSlug = page.file.path;
|
||||
url.searchParams.set("type", "Documentation");
|
||||
url.searchParams.set("mode", "dark");
|
||||
url.searchParams.set("heading", `${title}`);
|
||||
|
||||
return {
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
} satisfies Metadata;
|
||||
title,
|
||||
description,
|
||||
openGraph: {
|
||||
title,
|
||||
description,
|
||||
type: "Documentation",
|
||||
url: absoluteUrl(`docs/${pageSlug}`),
|
||||
images: [
|
||||
{
|
||||
url: url.toString(),
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: title,
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title,
|
||||
description,
|
||||
images: [url.toString()],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ export default function Layout({ children }: { children: ReactNode }) {
|
||||
Github.
|
||||
</Link>{" "}
|
||||
</Banner>
|
||||
<body className={`${GeistSans.variable} ${GeistMono.variable} font-sans overflow-x-hidden`}>
|
||||
<RootProvider>
|
||||
<NavbarProvider>
|
||||
<Navbar />
|
||||
|
||||
10
docs/app/robots.ts
Normal file
10
docs/app/robots.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { MetadataRoute } from "next";
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: "*",
|
||||
allow: "/",
|
||||
},
|
||||
};
|
||||
}
|
||||
BIN
docs/assets/Geist.ttf
Normal file
BIN
docs/assets/Geist.ttf
Normal file
Binary file not shown.
BIN
docs/assets/GeistMono.ttf
Normal file
BIN
docs/assets/GeistMono.ttf
Normal file
Binary file not shown.
@@ -19,9 +19,9 @@
|
||||
transition: all 0.3s ease-in-out;
|
||||
user-select: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.beta::before {
|
||||
.beta::before {
|
||||
content: " ";
|
||||
width: 1.5625rem;
|
||||
height: 2px;
|
||||
@@ -31,10 +31,12 @@
|
||||
position: absolute;
|
||||
transform: translateY(-50%);
|
||||
transform-origin: center;
|
||||
transition: background 0.3s linear, width 0.3s linear;
|
||||
}
|
||||
transition:
|
||||
background 0.3s linear,
|
||||
width 0.3s linear;
|
||||
}
|
||||
|
||||
.beta .text {
|
||||
.beta .text {
|
||||
font-size: 1.125em;
|
||||
line-height: 1.33333em;
|
||||
padding-left: 2em;
|
||||
@@ -44,70 +46,74 @@
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.beta .top_key {
|
||||
.beta .top_key {
|
||||
height: 2px;
|
||||
width: 1.5625rem;
|
||||
top: -2px;
|
||||
left: 0.625rem;
|
||||
position: absolute;
|
||||
background: #0c0a09;
|
||||
transition: width 0.5s ease-out, left 0.3s ease-out;
|
||||
}
|
||||
transition:
|
||||
width 0.5s ease-out,
|
||||
left 0.3s ease-out;
|
||||
}
|
||||
|
||||
.beta .bottom_key_1 {
|
||||
.beta .bottom_key_1 {
|
||||
height: 2px;
|
||||
width: 1.5625rem;
|
||||
right: 1.875rem;
|
||||
bottom: -2px;
|
||||
position: absolute;
|
||||
background: #0c0a09;
|
||||
transition: width 0.5s ease-out, right 0.3s ease-out;
|
||||
}
|
||||
transition:
|
||||
width 0.5s ease-out,
|
||||
right 0.3s ease-out;
|
||||
}
|
||||
|
||||
.beta .bottom_key_2 {
|
||||
.beta .bottom_key_2 {
|
||||
height: 2px;
|
||||
width: 0.625rem;
|
||||
right: 0.625rem;
|
||||
bottom: -2px;
|
||||
position: absolute;
|
||||
background: #0c0a09;
|
||||
transition: width 0.5s ease-out, right 0.3s ease-out;
|
||||
}
|
||||
transition:
|
||||
width 0.5s ease-out,
|
||||
right 0.3s ease-out;
|
||||
}
|
||||
|
||||
.beta {
|
||||
.beta {
|
||||
color: white;
|
||||
background: rgb(247, 247, 255);
|
||||
}
|
||||
}
|
||||
|
||||
.beta:hover {
|
||||
.beta:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
.beta:hover .text {
|
||||
.beta:hover .text {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.beta::before {
|
||||
.beta::before {
|
||||
width: 0.9375rem;
|
||||
background: rgb(39, 37, 42);
|
||||
}
|
||||
}
|
||||
|
||||
.beta .text {
|
||||
.beta .text {
|
||||
color: black;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.beta:hover .top_key {
|
||||
.beta:hover .top_key {
|
||||
left: -2px;
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.beta:hover .bottom_key_1,
|
||||
.beta:hover .bottom_key_2 {
|
||||
.beta:hover .bottom_key_1,
|
||||
.beta:hover .bottom_key_2 {
|
||||
right: 0;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,6 @@ export default function Hero() {
|
||||
const theme = useTheme();
|
||||
const [activeTab, setActiveTab] = useState("auth.ts");
|
||||
const code = tabs.find((tab) => tab.name === activeTab)?.code ?? "";
|
||||
93;
|
||||
return (
|
||||
<section className="w-full mx-auto px-10 flex min-h-[85vh] py-16 items-center justify-center gap-20">
|
||||
<div className="overflow-hidden bg-transparent dark:-mb-32 dark:mt-[-4.75rem] dark:pb-32 dark:pt-[4.75rem] md:px-10">
|
||||
@@ -99,14 +98,14 @@ export default function Hero() {
|
||||
<div className="relative z-10 md:text-center lg:text-left">
|
||||
<div className="relative">
|
||||
<div className="flex flex-col items-start gap-2">
|
||||
<div className="flex items-center gap-2 relative">
|
||||
<PulicBetaBadge text="Public Beta" />
|
||||
<div className="flex mt-2 items-center gap-2 relative">
|
||||
<Cover>
|
||||
<p className="inline dark:text-white opacity-90 2xl md:text-3xl lg:text-5xl tracking-tight relative">
|
||||
Better Auth.
|
||||
</p>
|
||||
</Cover>
|
||||
</div>
|
||||
<PulicBetaBadge text="Public Beta" />
|
||||
</div>
|
||||
|
||||
<p className="mt-3 md:text-2xl tracking-tight dark:text-zinc-300 text-zinc-800">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
const SectionSvg = ({
|
||||
crossesOffset,
|
||||
}: {
|
||||
|
||||
@@ -33,12 +33,18 @@ description: Apple
|
||||
provider: "sqlite",
|
||||
url: "./db.sqlite",
|
||||
},
|
||||
socialProvider: { // [!code highlight]
|
||||
apple: { // [!code highlight]
|
||||
socialProvider: [ // [!code highlight]
|
||||
apple({ // [!code highlight]
|
||||
clientId: process.env.APPLE_CLIENT_ID as string, // [!code highlight]
|
||||
clientSecret: process.env.APPLE_CLIENT_SECRET as string, // [!code highlight]
|
||||
} // [!code highlight]
|
||||
}, // [!code highlight]
|
||||
/** // [!code highlight]
|
||||
* this is optional. // [!code highlight]
|
||||
* only needed if you passed a custom basePath from `/api/auth` to `betterAuth` // [!code highlight]
|
||||
* or if you're using a custom domain. // [!code highlight]
|
||||
*/ // [!code highlight]
|
||||
redirectURI: "https://example.com/api/auth/callback/apple", // [!code highlight]
|
||||
}), // [!code highlight]
|
||||
], // [!code highlight]
|
||||
})
|
||||
```
|
||||
</Step>
|
||||
|
||||
@@ -4,3 +4,6 @@ import { twMerge } from "tailwind-merge";
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
export function absoluteUrl(path: string) {
|
||||
return `${process.env.NEXT_PUBLIC_APP_URL}${path}`;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"@tsparticles/engine": "^3.5.0",
|
||||
"@tsparticles/react": "^3.0.0",
|
||||
"@tsparticles/slim": "^3.5.0",
|
||||
"@vercel/og": "^0.6.3",
|
||||
"better-auth": "workspace:*",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
|
||||
18065
pnpm-lock.yaml
generated
18065
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user