42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import { c as defineEventHandler, h as setHeader } from '../_/nitro.mjs';
|
|
import { f as fetchSite } from '../_/api.mjs';
|
|
import { s as siteConfig } from '../_/site.mjs';
|
|
import 'unhead/server';
|
|
import 'vue';
|
|
import 'unhead/legacy';
|
|
import 'unhead/plugins';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'node:url';
|
|
|
|
const manifest_webmanifest = defineEventHandler(async (event) => {
|
|
const name = await fetchSite().then((s) => s.sections.settings.name).catch(() => "\u0627\u06CC\u0645\u0646 \u067E\u06CC\u0634\u06AF\u0627\u0645\u0627\u0646");
|
|
setHeader(event, "Content-Type", "application/manifest+json; charset=utf-8");
|
|
return {
|
|
name,
|
|
short_name: name,
|
|
lang: siteConfig.lang,
|
|
dir: siteConfig.dir,
|
|
start_url: "/",
|
|
display: "standalone",
|
|
background_color: siteConfig.themeColor,
|
|
theme_color: siteConfig.themeColor,
|
|
icons: [
|
|
{
|
|
src: siteConfig.favicon,
|
|
sizes: "any",
|
|
type: "image/svg+xml",
|
|
purpose: "any"
|
|
}
|
|
]
|
|
};
|
|
});
|
|
|
|
export { manifest_webmanifest as default };
|
|
//# sourceMappingURL=manifest.webmanifest.mjs.map
|