feat(image-generator): add new default template

This commit is contained in:
Ben Schlegel 2024-08-29 15:11:48 +02:00
parent 29dc28d544
commit 75cf749fb0

View File

@ -26,73 +26,50 @@ export const defaultImage: SocialImageOptions["imageStructure"] = (
<div <div
style={{ style={{
display: "flex", display: "flex",
flexDirection: "row", flexDirection: "column",
justifyContent: "flex-start", justifyContent: "center",
alignItems: "center", alignItems: "center",
height: "100%", height: "100%",
width: "100%", width: "100%",
backgroundColor: cfg.theme.colors[colorScheme].light,
gap: "2rem",
paddingTop: "1.5rem",
paddingBottom: "1.5rem",
paddingLeft: "5rem",
paddingRight: "5rem",
}} }}
> >
<div <div
style={{ style={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center", justifyContent: "flex-start",
height: "100%",
width: "100%", width: "100%",
backgroundColor: cfg.theme.colors[colorScheme].light, flexDirection: "row",
flexDirection: "column",
gap: "2.5rem", gap: "2.5rem",
paddingTop: "2rem",
paddingBottom: "2rem",
}} }}
> >
<div <img src={iconPath} width={135} height={135} />
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
height: "100%",
width: "100%",
gap: "2rem",
}}
>
<img src={iconPath} width={200} height={200} />
<p
style={{
color: cfg.theme.colors[colorScheme].dark,
fontSize: useSmallerFont ? 70 : 82,
marginLeft: "4rem",
textAlign: "center",
marginRight: "4rem",
fontFamily: fonts[0].name,
}}
>
{title}
</p>
</div>
<p <p
style={{ style={{
color: cfg.theme.colors[colorScheme].dark, color: cfg.theme.colors[colorScheme].dark,
fontSize: 44, fontSize: useSmallerFont ? 70 : 82,
marginLeft: "8rem", fontFamily: fonts[0].name,
marginRight: "8rem",
lineClamp: 3,
fontFamily: fonts[1].name,
}} }}
> >
{description} {title}
</p> </p>
</div> </div>
<div <p
style={{ style={{
height: "100%", color: cfg.theme.colors[colorScheme].dark,
width: "2vw", fontSize: 44,
position: "absolute", lineClamp: 3,
backgroundColor: cfg.theme.colors[colorScheme].tertiary, fontFamily: fonts[1].name,
opacity: 0.85,
}} }}
/> >
{description}
</p>
</div> </div>
) )
} }