File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ import { OG_HEIGHT, OG_WIDTH } from "./constants";
12
12
const sansFont = read ( Pretendard ) . arrayBuffer ( ) ;
13
13
const displayFont = read ( DMSerifDisplay ) . arrayBuffer ( ) ;
14
14
15
- // Sources: https://github.com/huggingface/chat-ui/blob/main/src/routes/assistant/%5BassistantId%5D/thumbnail.png/%2Bserver.ts#L44-L82,
15
+ // Sources: https://github.com/huggingface/chat-ui/blob/main/src/routes/assistant/%5BassistantId%5D/thumbnail.png/%2Bserver.ts#L44-L82
16
16
// https://geoffrich.net/posts/svelte-social-image/
17
17
export const GET : RequestHandler = async ( { url } ) => {
18
18
const renderedComponent = render ( Thumbnail , {
19
19
props : {
20
20
title : url . searchParams . get ( "title" ) ?? "" ,
21
- description : url . searchParams . get ( "description" )
21
+ description : url . searchParams . get ( "description" ) ?? undefined
22
22
}
23
23
} ) ;
24
24
@@ -31,12 +31,14 @@ export const GET: RequestHandler = async ({ url }) => {
31
31
{
32
32
name : "Pretendard" ,
33
33
data : await sansFont ,
34
- weight : 400
34
+ weight : 400 ,
35
+ style : "normal"
35
36
} ,
36
37
{
37
38
name : "DM Serif Display" ,
38
39
data : await displayFont ,
39
- weight : 400
40
+ weight : 400 ,
41
+ style : "normal"
40
42
}
41
43
]
42
44
} ) ;
Original file line number Diff line number Diff line change 7
7
let { title, description = undefined }: Props = $props ();
8
8
</script >
9
9
10
- <div class =" size-full" >
11
- <p class ="font-display" >{title }</p >
12
- <p class ="text-muted-foreground" >{description }</p >
10
+ <div class =" my-auto flex h-full w-full flex-col justify-center p-4" >
11
+ <p class ="font-display text-7xl" >{title }</p >
12
+ {#if description }
13
+ <p class ="text-4xl text-muted-foreground" >{description }</p >
14
+ {/if }
13
15
</div >
You can’t perform that action at this time.
0 commit comments