chore(share): basic integration of CSS

This commit is contained in:
Elian Doran
2025-06-08 23:12:09 +03:00
parent 881a015f68
commit 9469433143
4 changed files with 15 additions and 2 deletions

View File

@@ -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");

View File

@@ -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;
}