fix: theme plugins didn't have priority over base style

Massimo Melina committed Apr 16, 2023 at 20:13 UTC b5ff4965d7af1192c1d1c0ba9384fa9f3aadace7
1 file changed +2 -2
src/serveGuiFiles.ts
+2 -2
@@ -88,7 +88,7 @@ async function treatIndex(ctx: Koa.Context, filesUri: string, body: string) {
88 const lang = await getLangData(ctx)
89 let ret = body
90 .replace(/((?:src|href) *= *['"])\/?(?![a-z]+:\/\/)/g, '$1' + ctx.state.revProxyPath + filesUri)
91 - .replace('</head>', () => `
91 + .replace('<body>', () => `<body>
92 ${!isFrontend ? '' : `
93 <title>${title.get()}</title>
94 <link rel="icon" href="${favicon.get() ? '/favicon.ico' : 'data:;'}" />
@@ -126,7 +126,7 @@ async function treatIndex(ctx: Koa.Context, filesUri: string, body: string) {
126 plug.frontend_js?.map(f =>
127 `<script defer plugin=${JSON.stringify(k)} src='${pub + k + '/' + f}'></script>`))
128 .flat().filter(Boolean).join('\n')}
129 - </head>`)
129 + `)
130 if (isFrontend)
131 ret = ret
132 .replace('<body>', '<body>' + getSection('top'))