File tree Expand file tree Collapse file tree 4 files changed +36
-61
lines changed
Expand file tree Collapse file tree 4 files changed +36
-61
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { render } from "svelte/server";
22import { read } from "$app/server" ;
33import DMSerifDisplay from "@fontsource/dm-serif-display/files/dm-serif-display-latin-400-normal.woff" ;
44import Pretendard from "@fontsource/pretendard/files/pretendard-latin-400-normal.woff" ;
5+ import PretendardSemibold from "@fontsource/pretendard/files/pretendard-latin-600-normal.woff" ;
56import { Resvg } from "@resvg/resvg-js" ;
67import satori from "satori" ;
78import { html } from "satori-html" ;
@@ -10,6 +11,7 @@ import Thumbnail from "./Thumbnail.svelte";
1011import { OG_HEIGHT , OG_WIDTH } from "./constants" ;
1112
1213const sansFont = read ( Pretendard ) . arrayBuffer ( ) ;
14+ const sansFontSemibold = read ( PretendardSemibold ) . arrayBuffer ( ) ;
1315const displayFont = read ( DMSerifDisplay ) . arrayBuffer ( ) ;
1416
1517// Sources: https://github.com/huggingface/chat-ui/blob/main/src/routes/assistant/%5BassistantId%5D/thumbnail.png/%2Bserver.ts#L44-L82
@@ -29,13 +31,19 @@ export const GET: RequestHandler = async ({ url }) => {
2931 height : OG_HEIGHT ,
3032 fonts : [
3133 {
32- name : "Pretendard " ,
34+ name : "SansFont " ,
3335 data : await sansFont ,
3436 weight : 400 ,
3537 style : "normal"
3638 } ,
3739 {
38- name : "DM Serif Display" ,
40+ name : "SansFontSemibold" ,
41+ data : await sansFontSemibold ,
42+ weight : 600 ,
43+ style : "normal"
44+ } ,
45+ {
46+ name : "DisplayFont" ,
3947 data : await displayFont ,
4048 weight : 400 ,
4149 style : "normal"
Original file line number Diff line number Diff line change 22 type Props = {
33 title: string ;
44 description? : string ;
5+ secondaryIconUrl? : string ;
56 };
67
7- let { title, description = undefined }: Props = $props ();
8+ let { title, description, secondaryIconUrl }: Props = $props ();
89 </script >
910
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 }
11+ <div class =" flex h-full w-full border-b border-orange-600" style:border-bottom-width =" 32px" >
12+ <div class =" flex flex-col p-8" >
13+ <div class =" flex items-center" style:gap =" 8" >
14+ <img
15+ src =" https://raw.githubusercontent.com/sveltejs/branding/master/svelte-logo.svg"
16+ alt =" Svelte"
17+ class =" w-16"
18+ />
19+ <span class =" flex text-4xl" style:gap =" 6" >
20+ <span style:font-family =" DisplayFont" >Svelte</span >
21+ <span class =" text-orange-600" style:font-family =" SansFontSemibold" >Changelog</span >
22+ </span >
23+ </div >
24+ {#if secondaryIconUrl }
25+ {@const src = secondaryIconUrl }
26+ <img {src } alt =" Secondary icon" class =" ml-auto w-16" />
27+ {/if }
28+ <div class =" my-auto flex flex-col justify-center" >
29+ <p class ="text-7xl" style:font-family ="DisplayFont" >{title }</p >
30+ {#if description }
31+ <p class ="text-4xl text-gray-600" style:font-family ="SansFont" >{description }</p >
32+ {/if }
33+ </div >
34+ </div >
1535</div >
You can’t perform that action at this time.
0 commit comments