@@ -107,38 +107,40 @@ export async function GET(request: NextRequest) {
107107 />
108108 ) ;
109109 }
110-
111- // Fetch Roboto font
112- const fontReg = await fetch (
113- new URL ( 'https://cdn.jsdelivr.net/fontsource/fonts/roboto@latest/latin-400-normal.ttf' )
114- ) . then ( ( res ) => res . arrayBuffer ( ) ) ;
115-
116- const fontBold = await fetch (
117- new URL ( 'https://cdn.jsdelivr.net/fontsource/fonts/roboto@latest/latin-700-normal.ttf' )
118- ) . then ( ( res ) => res . arrayBuffer ( ) ) ;
119-
120- const fontMegaBold = await fetch (
121- new URL ( 'https://cdn.jsdelivr.net/fontsource/fonts/roboto@latest/latin-900-normal.ttf' )
122- ) . then ( ( res ) => res . arrayBuffer ( ) ) ;
110+ const [ fontReg , fontBold , fontMegaBold ] = await Promise . all ( [
111+ fetch (
112+ new URL ( 'https://cdn.jsdelivr.net/fontsource/fonts/roboto@latest/latin-400-normal.ttf' ) ,
113+ { next : { revalidate : 60 * 60 * 24 * 30 } } // Cache for 30 days
114+ ) . then ( ( res ) => res . arrayBuffer ( ) ) ,
115+ fetch (
116+ new URL ( 'https://cdn.jsdelivr.net/fontsource/fonts/roboto@latest/latin-700-normal.ttf' ) ,
117+ { next : { revalidate : 60 * 60 * 24 * 30 } } // Cache for 30 days
118+ ) . then ( ( res ) => res . arrayBuffer ( ) ) ,
119+ fetch (
120+ new URL ( 'https://cdn.jsdelivr.net/fontsource/fonts/roboto@latest/latin-900-normal.ttf' ) ,
121+ { next : { revalidate : 60 * 60 * 24 * 30 } } // Cache for 30 days
122+ ) . then ( ( res ) => res . arrayBuffer ( ) ) ,
123+ ] ) ;
123124
124125 return new ImageResponse (
125126 (
126127 < div
127128 tw = "flex h-full w-full flex-col items-center justify-center p-10 text-white relative overflow-hidden"
128129 style = { { background : bgGradient } }
129130 >
130- < div tw = "flex w-full max-w-[800px] flex-col items-center justify-center rounded-xl bg-black/10 p-10 " >
131- < div tw = "mb-2 text-center text-7xl font-extrabold" > { artistName } </ div >
132- < div tw = "mb-2 text-center text-6xl font-bold" > { show . display_date } </ div >
133- < div tw = "flex items-center justify-center" style = { { gap : 4 } } >
131+ < div tw = "flex w-full max-w-[800px] flex-col items-center justify-center rounded-2xl bg-black/20 p-12 backdrop-blur-sm shadow-2xl " >
132+ < div tw = "mb-4 text-center text-7xl font-extrabold tracking-tight " > { artistName } </ div >
133+ < div tw = "mb-6 text-center text-6xl font-bold" > { show . display_date } </ div >
134+ < div tw = "flex items-center justify-center" style = { { gap : 8 } } >
134135 { show . venue ?. name && (
135- < div tw = "rounded-lg bg-white/20 px-4 py-2 text-4xl flex" >
136- { show . venue ?. name } { show . venue ?. location ?? '' }
136+ < div tw = "rounded-xl bg-white/25 px-6 py-3 text-4xl flex text-center backdrop-blur-sm " >
137+ { show . venue ?. name } { show . venue ?. location ? `• ${ show . venue . location } ` : '' }
137138 </ div >
138139 ) }
139140 </ div >
140141 </ div >
141- < div tw = "absolute bottom-5 right-5 text-4xl opacity-80 font-bold" > Relisten.net</ div >
142+
143+ < div tw = "absolute bottom-6 right-6 text-4xl font-bold" > Relisten.net</ div >
142144 { patternElements }
143145 </ div >
144146 ) ,
0 commit comments