-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
67 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { ImageResponse } from 'next/og'; | ||
|
||
export const runtime = 'edge'; | ||
|
||
export const GET = async (req: Request) => { | ||
const url = new URL(req.url); | ||
|
||
const page = url.searchParams.get('page'); | ||
|
||
const fontRegular = fetch( | ||
new URL('../../assets/fonts/JetBrainsMono-Regular.ttf', import.meta.url) | ||
).then((res) => res.arrayBuffer()); | ||
|
||
const fontBold = fetch( | ||
new URL('../../assets/fonts/JetBrainsMono-Bold.ttf', import.meta.url) | ||
).then((res) => res.arrayBuffer()); | ||
|
||
return new ImageResponse( | ||
( | ||
<div | ||
style={{ width: '100%', height: '100%', display: 'flex' }} | ||
tw="justify-center flex-col gap-10 bg-white items-center" | ||
> | ||
<h1 tw="text-7xl font-bold">Federico Minaya</h1> | ||
|
||
<div | ||
// style={{ borderWidth: 4, borderStyle: 'solid' }} | ||
tw="flex flex-col" | ||
> | ||
<h2 tw="text-4xl mb-2 font-normal text-purple-800"> | ||
{page ?? 'Full Stack Developer'} | ||
</h2> | ||
|
||
<div tw="h-1 bg-purple-800"></div> | ||
</div> | ||
</div> | ||
), | ||
{ | ||
width: 1200, | ||
fonts: [ | ||
{ | ||
name: 'JetBrains Mono', | ||
data: await fontRegular, | ||
style: 'normal', | ||
weight: 400, | ||
}, | ||
{ | ||
name: 'JetBrains Mono', | ||
data: await fontBold, | ||
style: 'normal', | ||
weight: 700, | ||
}, | ||
], | ||
height: 630, | ||
} | ||
); | ||
}; |
Binary file not shown.
Binary file not shown.