This commit is contained in:
parent
f6699095d3
commit
bcf7f109df
|
@ -457,7 +457,23 @@ await commander.program
|
||||||
response: express.Response<HTML, ResponseLocalsBase>;
|
response: express.Response<HTML, ResponseLocalsBase>;
|
||||||
head: HTML;
|
head: HTML;
|
||||||
body: HTML;
|
body: HTML;
|
||||||
}) => html`
|
}) => {
|
||||||
|
const layoutBody = html`
|
||||||
|
<body
|
||||||
|
css="${response.locals.css(css`
|
||||||
|
background-color: var(--color--cyan--50);
|
||||||
|
color: var(--color--cyan--900);
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
background-color: var(--color--cyan--900);
|
||||||
|
color: var(--color--cyan--50);
|
||||||
|
}
|
||||||
|
`)}"
|
||||||
|
>
|
||||||
|
$${body}
|
||||||
|
</body>
|
||||||
|
`;
|
||||||
|
|
||||||
|
return html`
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -474,8 +490,8 @@ await commander.program
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://${application.configuration.hostname}/${application
|
href="https://${application.configuration
|
||||||
.static["index.css"]}"
|
.hostname}/${application.static["index.css"]}"
|
||||||
/>
|
/>
|
||||||
$${response.locals.css.toString()}
|
$${response.locals.css.toString()}
|
||||||
|
|
||||||
|
@ -488,9 +504,10 @@ await commander.program
|
||||||
$${head}
|
$${head}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
$${body} $${response.locals.javascript.toString()}
|
$${layoutBody} $${response.locals.javascript.toString()}
|
||||||
</html>
|
</html>
|
||||||
`;
|
`;
|
||||||
|
};
|
||||||
|
|
||||||
application.web.get<{}, any, {}, {}, ResponseLocalsBase>(
|
application.web.get<{}, any, {}, {}, ResponseLocalsBase>(
|
||||||
"/",
|
"/",
|
||||||
|
|
Loading…
Reference in New Issue