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
feat(share): name the theme buttons "Appearance" and hide the caption
Elian Dorand399348af4a9
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.htmlindex 0c0f1bc117..da72e6ac05 100644--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html@@ -11,9 +11,9 @@ class="image"><li>Searching by note title.</li><li>Light and dark mode, following the visitor's system setting by default,also while the page is open. The visitor can pick <em>Light</em>, <em>Dark</em> or <em>System</em> with- the buttons next to <em>Site Theme</em> at the top of the navigation pane,- or on narrow screens with the button in the header, which cycles through- the three; the choice is remembered by the browser.</li>+ the buttons at the top of the navigation pane, or on narrow screens with+ the button in the header, which cycles through the three; the choice is+ remembered by the browser.</li><li>A layout centered on wide screens, with the navigation tree and the tableof contents at either side of the content, and a mobile-friendly layoutwith sliding panes on narrow ones.</li>diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.jsonindex 5a7acdf80a..1fca577caf 100644--- a/apps/server/src/assets/translations/en/server.json+++ b/apps/server/src/assets/translations/en/server.json@@ -448,10 +448,11 @@},"share_theme": {"site-theme": "Site Theme",+ "appearance": "Appearance","theme-light": "Light","theme-dark": "Dark","theme-system": "System",- "theme-current": "Site Theme: {{- theme}}",+ "theme-current": "Appearance: {{- theme}}","search_placeholder": "Search...","image_alt": "Article Image","last-updated": "Last updated on {{- date}}",diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing.md b/docs/User Guide/User Guide/Advanced Usage/Sharing.mdindex 92d5ee3a22..de96dc9da5 100644--- a/docs/User Guide/User Guide/Advanced Usage/Sharing.md+++ b/docs/User Guide/User Guide/Advanced Usage/Sharing.md@@ -6,7 +6,7 @@ Trilium allows you to share selected notes as **publicly accessible** read-only## Features, interaction and limitations* Searching by note title.-* Light and dark mode, following the visitor's system setting by default, also while the page is open. The visitor can pick _Light_, _Dark_ or _System_ with the buttons next to _Site Theme_ at the top of the navigation pane, or on narrow screens with the button in the header, which cycles through the three; the choice is remembered by the browser.+* Light and dark mode, following the visitor's system setting by default, also while the page is open. The visitor can pick _Light_, _Dark_ or _System_ with the buttons at the top of the navigation pane, or on narrow screens with the button in the header, which cycles through the three; the choice is remembered by the browser.* A layout centered on wide screens, with the navigation tree and the table of contents at either side of the content, and a mobile-friendly layout with sliding panes on narrow ones.* Collapsible tree with the same note icons as the application.* Customizable logo.diff --git a/packages/share-theme/src/page/theme_switch.css b/packages/share-theme/src/page/theme_switch.cssindex 2b65c60acd..67c6325965 100644--- a/packages/share-theme/src/page/theme_switch.css+++ b/packages/share-theme/src/page/theme_switch.css@@ -91,6 +91,7 @@ input:focus + .slider {.theme-options {display: flex;+ margin-inline-start: auto;gap: 2px;padding: 2px;border-radius: 8px;diff --git a/packages/share-theme/src/templates/page.ejs b/packages/share-theme/src/templates/page.ejsindex 5c1c4e06f7..33e03eb9b0 100644--- a/packages/share-theme/src/templates/page.ejs+++ b/packages/share-theme/src/templates/page.ejs@@ -46,8 +46,8 @@<div id="navigation"><div id="site-header"><%- include("site_logo", { id: "site-logo" }) %>- <div class="theme-selection" role="group" aria-labelledby="sitetheme">- <span id="sitetheme"><%= t("share_theme.site-theme") %></span>+ <div class="theme-selection" role="group" aria-labelledby="theme-selection-label">+ <span id="theme-selection-label" class="visually-hidden"><%= t("share_theme.appearance") %></span><div class="theme-options"><button type="button" class="theme-option" data-theme="light" aria-label="<%= t("share_theme.theme-light") %>" title="<%= t("share_theme.theme-light") %>"><span class="tn-icon bx bx-sun" aria-hidden="true"></span></button><button type="button" class="theme-option" data-theme="dark" aria-label="<%= t("share_theme.theme-dark") %>" title="<%= t("share_theme.theme-dark") %>"><span class="tn-icon bx bx-moon" aria-hidden="true"></span></button>