mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
chore(share): basic integration of CSS
This commit is contained in:
@@ -18,6 +18,7 @@ import utils, { isDev, safeExtractMessageAndStackFromError } from "../services/u
|
||||
import options from "../services/options.js";
|
||||
import { t } from "i18next";
|
||||
import shareThemeRoot from "@triliumnext/share-theme/templates/page.ejs";
|
||||
import shareThemeCss from "@triliumnext/share-theme/styles.css";
|
||||
import ejs from "ejs";
|
||||
|
||||
function getSharedSubTreeRoot(note: SNote): { note?: SNote; branch?: SBranch } {
|
||||
@@ -212,7 +213,10 @@ function register(router: Router) {
|
||||
|
||||
if (useDefaultView) {
|
||||
console.log("Got share theme path", shareThemeRoot);
|
||||
const ejsResult = ejs.render(shareThemeRoot, opts, {
|
||||
const ejsResult = ejs.render(shareThemeRoot, {
|
||||
shareThemeCss,
|
||||
...opts
|
||||
}, {
|
||||
includer(originalPath, parsedPath: string) {
|
||||
console.log("Path ", originalPath, parsedPath);
|
||||
throw new Error("Hi");
|
||||
|
||||
5
apps/server/src/types.d.ts
vendored
5
apps/server/src/types.d.ts
vendored
@@ -33,3 +33,8 @@ declare module "@triliumnext/share-theme/*.ejs" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module "@triliumnext/share-theme/styles.css" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user