v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com> Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import * as send from 'koa-send';
|
||||
import * as glob from 'glob';
|
||||
import config from '../../config';
|
||||
import { licenseHtml } from '../../misc/license';
|
||||
import { copyright } from '../../const.json';
|
||||
import * as locales from '../../../locales';
|
||||
import * as nestedProperty from 'nested-property';
|
||||
|
||||
@@ -48,7 +47,7 @@ async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
||||
|
||||
vars['config'] = config;
|
||||
|
||||
vars['copyright'] = copyright;
|
||||
vars['copyright'] = '(c) Misskey';
|
||||
|
||||
vars['license'] = licenseHtml;
|
||||
|
||||
|
@@ -31,6 +31,7 @@ const app = new Koa();
|
||||
app.use(views(__dirname + '/views', {
|
||||
extension: 'pug',
|
||||
options: {
|
||||
version: config.version,
|
||||
config
|
||||
}
|
||||
}));
|
||||
|
@@ -10,7 +10,7 @@ html
|
||||
meta(charset='utf-8')
|
||||
meta(name='application-name' content='Misskey')
|
||||
meta(name='referrer' content='origin')
|
||||
meta(name='theme-color' content='#105779')
|
||||
meta(name='theme-color' content='#86b300')
|
||||
meta(property='og:site_name' content= instanceName || 'Misskey')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
link(rel='icon' href= icon || '/favicon.ico')
|
||||
@@ -30,12 +30,23 @@ html
|
||||
meta(property='og:image' content=img)
|
||||
|
||||
style
|
||||
include ./../../../../built/client/assets/init.css
|
||||
script
|
||||
include ./../../../../built/client/assets/boot.js
|
||||
|
||||
script
|
||||
include ./../../../../built/client/assets/safe.js
|
||||
include ./../../../../built/client/assets/style.css
|
||||
script(src=`/assets/app.${version}.js` async defer)
|
||||
script.
|
||||
const theme = localStorage.getItem('theme');
|
||||
if (theme) {
|
||||
for (const [k, v] of Object.entries(JSON.parse(theme))) {
|
||||
document.documentElement.style.setProperty(`--${k}`, v.toString());
|
||||
if (k === 'accent') {
|
||||
for (const tag of document.head.children) {
|
||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||
tag.setAttribute('content', v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body
|
||||
noscript: p
|
||||
|
Reference in New Issue
Block a user