mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 23:54:59 -05:00
Revert "fix: don't load banner locally"
This reverts commit b35f04020d318b67908fe1723a66be0b2b6e8716.
This commit is contained in:
parent
17dbc9e751
commit
7e806cd335
@ -35,6 +35,14 @@ export async function GET(
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
try {
|
||||
// Load banner image from filesystem
|
||||
const bannerPath = path.join(
|
||||
process.cwd(),
|
||||
"public",
|
||||
"branding",
|
||||
"bg-banner.png"
|
||||
);
|
||||
const bannerImageData = fs.readFileSync(bannerPath);
|
||||
|
||||
const id = (await params).id;
|
||||
|
||||
@ -60,7 +68,7 @@ export async function GET(
|
||||
textAlign: "center",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundImage: `url(data:image/png;base64,${bannerImageData.toString("base64")})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
fontFamily: "Inter",
|
||||
@ -248,7 +256,7 @@ export async function GET(
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
fontFamily: "Inter",
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundImage: `url(data:image/png;base64,${bannerImageData.toString("base64")})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
}}
|
||||
|
||||
@ -128,6 +128,10 @@ export async function GET(
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
try {
|
||||
// Load banner image
|
||||
const bannerImageData = await fetch(
|
||||
new URL("/branding/bg-banner.png", request.url)
|
||||
).then((res) => res.arrayBuffer());
|
||||
|
||||
const id = (await params).id;
|
||||
|
||||
@ -154,7 +158,7 @@ export async function GET(
|
||||
textAlign: "center",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundImage: `url(data:image/png;base64,${Buffer.from(bannerImageData).toString("base64")})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
fontFamily: "Inter",
|
||||
@ -222,7 +226,7 @@ export async function GET(
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
fontFamily: "Inter",
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundImage: `url(data:image/png;base64,${Buffer.from(bannerImageData).toString("base64")})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user