Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(share): remove leftover color management logic
Elian Doranb06aa29ea34d
diff --git a/packages/share-theme/src/templates/page.ejs b/packages/share-theme/src/templates/page.ejsindex 9b8433b905..26f35f538a 100644--- a/packages/share-theme/src/templates/page.ejs+++ b/packages/share-theme/src/templates/page.ejs@@ -83,8 +83,6 @@ const logoWidth = subRoot.note.getLabelValue("shareLogoWidth") ?? 53;const logoHeight = subRoot.note.getLabelValue("shareLogoHeight") ?? 40;const mobileLogoHeight = logoHeight && logoWidth ? 32 / (logoWidth / logoHeight) : "";const shareRootLink = subRoot.note.hasLabel("shareRootLink") ? subRoot.note.getLabelValue("shareRootLink") : `./${subRoot.note.noteId}`;-const currentTheme = note.getLabel("shareTheme") === "light" ? "light" : "dark";-const themeClass = currentTheme === "light" ? " theme-light" : " theme-dark";const headingRe = /(<h[1-6]>)(.+?)(<\/h[1-6]>)/g;const headingMatches = [...content.matchAll(headingRe)];content = content.replaceAll(headingRe, (...match) => {@@ -93,7 +91,7 @@ content = content.replaceAll(headingRe, (...match) => {return match[0];});%>-<body data-note-id="<%= note.noteId %>" class="type-<%= note.type %><%= themeClass %>" data-ancestor-note-id="<%= subRoot.note.noteId %>">+<body data-note-id="<%= note.noteId %>" class="type-<%= note.type %>" data-ancestor-note-id="<%= subRoot.note.noteId %>"><%- renderSnippets("body:start") %><div id="mobile-header"><a href="<%= shareRootLink %>">@@ -113,7 +111,7 @@ content = content.replaceAll(headingRe, (...match) => {<div class="theme-selection"><span id="sitetheme"><%= t("share_theme.site-theme") %></span><label class="switch">- <input type="checkbox" checked="<%= currentTheme === "dark" %>" aria-labelledby="sitetheme">+ <input type="checkbox" aria-labelledby="sitetheme"><span class="slider"></span><svg class="dark-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M20.742 13.045a8.088 8.088 0 0 1-2.077.271c-2.135 0-4.14-.83-5.646-2.336a8.025 8.025 0 0 1-2.064-7.723A1 1 0 0 0 9.73 2.034a10.014 10.014 0 0 0-4.489 2.582c-3.898 3.898-3.898 10.243 0 14.143a9.937 9.937 0 0 0 7.072 2.93 9.93 9.93 0 0 0 7.07-2.929 10.007 10.007 0 0 0 2.583-4.491 1.001 1.001 0 0 0-1.224-1.224zm-2.772 4.301a7.947 7.947 0 0 1-5.656 2.343 7.953 7.953 0 0 1-5.658-2.344c-3.118-3.119-3.118-8.195 0-11.314a7.923 7.923 0 0 1 2.06-1.483 10.027 10.027 0 0 0 2.89 7.848 9.972 9.972 0 0 0 7.848 2.891 8.036 8.036 0 0 1-1.484 2.059z"></path></svg><svg class="light-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M6.993 12c0 2.761 2.246 5.007 5.007 5.007s5.007-2.246 5.007-5.007S14.761 6.993 12 6.993 6.993 9.239 6.993 12zM12 8.993c1.658 0 3.007 1.349 3.007 3.007S13.658 15.007 12 15.007 8.993 13.658 8.993 12 10.342 8.993 12 8.993zM10.998 19h2v3h-2zm0-17h2v3h-2zm-9 9h3v2h-3zm17 0h3v2h-3zM4.219 18.363l2.12-2.122 1.415 1.414-2.12 2.122zM16.24 6.344l2.122-2.122 1.414 1.414-2.122 2.122zM6.342 7.759 4.22 5.637l1.415-1.414 2.12 2.122zm13.434 10.605-1.414 1.414-2.122-2.122 1.414-1.414z"></path></svg>