mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 15:05:42 -05:00
chore: remove unused socialImage2.tsx component
This commit is contained in:
parent
6655f6ced5
commit
299c53955d
@ -1,80 +0,0 @@
|
|||||||
import { SatoriOptions } from "satori/wasm"
|
|
||||||
import { GlobalConfiguration } from "../cfg"
|
|
||||||
import { SocialImageOptions, UserOpts } from "./imageHelper"
|
|
||||||
import { QuartzPluginData } from "../plugins/vfile"
|
|
||||||
|
|
||||||
export const defaultImage: SocialImageOptions["imageStructure"] = (
|
|
||||||
cfg: GlobalConfiguration,
|
|
||||||
userOpts: UserOpts,
|
|
||||||
title: string,
|
|
||||||
description: string,
|
|
||||||
fonts: SatoriOptions["fonts"],
|
|
||||||
fileData: QuartzPluginData,
|
|
||||||
) => {
|
|
||||||
// How many characters are allowed before switching to smaller font
|
|
||||||
const fontBreakPoint = 22
|
|
||||||
const useSmallerFont = title.length > fontBreakPoint
|
|
||||||
|
|
||||||
const { colorScheme } = userOpts
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "row",
|
|
||||||
justifyContent: "flex-start",
|
|
||||||
alignItems: "center",
|
|
||||||
height: "100%",
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
height: "100%",
|
|
||||||
width: "100%",
|
|
||||||
backgroundColor: cfg.theme.colors[colorScheme].light,
|
|
||||||
flexDirection: "column",
|
|
||||||
gap: "2.5rem",
|
|
||||||
paddingTop: "2rem",
|
|
||||||
paddingBottom: "2rem",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<p
|
|
||||||
style={{
|
|
||||||
color: cfg.theme.colors[colorScheme].dark,
|
|
||||||
fontSize: useSmallerFont ? 70 : 82,
|
|
||||||
marginLeft: "4rem",
|
|
||||||
textAlign: "center",
|
|
||||||
marginRight: "4rem",
|
|
||||||
fontFamily: fonts[0].name,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{title}
|
|
||||||
</p>
|
|
||||||
<p
|
|
||||||
style={{
|
|
||||||
color: cfg.theme.colors[colorScheme].dark,
|
|
||||||
fontSize: 44,
|
|
||||||
marginLeft: "8rem",
|
|
||||||
marginRight: "8rem",
|
|
||||||
lineClamp: 3,
|
|
||||||
fontFamily: fonts[1].name,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{description}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
height: "100%",
|
|
||||||
width: "2vw",
|
|
||||||
position: "absolute",
|
|
||||||
backgroundColor: cfg.theme.colors[colorScheme].tertiary,
|
|
||||||
opacity: 0.85,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user