Skip to content

Commit 75925c5

Browse files
committed
fix
1 parent c8e2bdd commit 75925c5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

website/functions/generate-image.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ export async function onRequest(context) {
55
const url = new URL(context.request.url)
66

77
const title = url.searchParams.get('title') || 'Default Title'
8-
const fontSize = url.searchParams.get('fontSize') || '72px'
9-
108
const html = `
119
<div style="height: 100%; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: black; font-family: 'Open Sans', sans-serif; background-repeat: no-repeat; background-size: cover;">
1210
<div style="display: flex; flex-direction: column; height: 100%; width: 100%; background-image: url('${url.protocol}//${url.host}/img/bg-articles.png'); background-size: 100% 100%;">
1311
<div style="display: flex; flex-direction: column; width: 100%; height: 100%; align-items: center; justify-content: center;">
1412
<div style="display: flex; width: 100%;">
1513
<div style="display: flex; flex-direction: column; width: 100%; justify-content: space-between;">
16-
<div style="font-family: 'Open Sans', sans-serif; font-size: ${fontSize}; font-weight: bold; letter-spacing: -0.05em; color: white; text-align: left; margin-left: 12%; width: 70%;">
17-
${title}
18-
</div>
14+
<div style="font-family: 'Open Sans', sans-serif; font-size: 72px; font-weight: bold; letter-spacing: -0.05em; color: white; text-align: left; margin-left: 12%; width: 70%;">
15+
${title}
16+
</div>
1917
</div>
2018
</div>
2119
</div>

0 commit comments

Comments
 (0)