mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
fix: images in /today expanding parent
This commit is contained in:
1 parent
632881c6b0
commit
26e78c72b9
7 files changed
+13
-30
No files matched your search
@@ -2,7 +2,6 @@ import { Resvg } from '@resvg/resvg-js';
|
||||
import { readFile } from 'fs';
|
||||
import { ReactNode } from 'react';
|
||||
import satori from 'satori';
|
||||
import { WRAPPER_SIZE_WIDTHS, WrapperSize } from '../../components/Wrapper.js';
|
||||
|
||||
const FONT_NAME = 'Roboto';
|
||||
const FONT_FILES = ['Roboto', 'Roboto-Bold', 'Roboto-Black'];
|
||||
@@ -21,12 +20,9 @@ const [robotoFlex, robotoFlexBold, robotoFlexBlack] = await Promise.all(
|
||||
);
|
||||
console.log('Fonts imported');
|
||||
|
||||
export default async function render(
|
||||
element: ReactNode,
|
||||
size: WrapperSize = WrapperSize.Regular,
|
||||
) {
|
||||
export default async function render(element: ReactNode) {
|
||||
const svg = await satori(element, {
|
||||
width: WRAPPER_SIZE_WIDTHS[size],
|
||||
width: 640,
|
||||
fonts: [
|
||||
{ data: robotoFlex, name: FONT_NAME, weight: 400 },
|
||||
{ data: robotoFlexBold, name: FONT_NAME, weight: 700 },
|
||||
|
||||
Reference in new issue
Block a user