add fallback style tag

This commit is contained in:
Alec Armbruster 2023-06-22 10:32:39 -04:00
parent 1eec46be96
commit 5512ee205a
No known key found for this signature in database
GPG key ID: 52BC7C84E960FD1B

View file

@ -8,6 +8,8 @@ import { fetchIconPng } from "./fetch-icon-png";
const customHtmlHeader = process.env["LEMMY_UI_CUSTOM_HTML_HEADER"] || ""; const customHtmlHeader = process.env["LEMMY_UI_CUSTOM_HTML_HEADER"] || "";
const fallbackStyleTag = `<link rel="stylesheet" type="text/css" href="/css/themes/darkly.css" />`;
let appleTouchIcon: string | undefined = undefined; let appleTouchIcon: string | undefined = undefined;
export async function createSsrHtml( export async function createSsrHtml(
@ -85,7 +87,7 @@ export async function createSsrHtml(
<link rel="stylesheet" type="text/css" href="/static/styles/styles.css" /> <link rel="stylesheet" type="text/css" href="/static/styles/styles.css" />
<!-- Current theme and more --> <!-- Current theme and more -->
${helmet.link.toString()} ${helmet.link.toString() || fallbackStyleTag}
</head> </head>