Skip to content

Build your personal knowledge base with Trilium Notes

docs(user): use tabs where appropriate

Elian Doranadb93408e731
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html
index 4178ea8912..d7fdf79bdb 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).html
@@ -320,7 +320,10 @@
<li>You can use whichever format you prefer - both are equally valid</li>
</ul>
<h2>Examples</h2>
-<h3>Docker Compose Example</h3><pre><code class="language-text-x-yaml">services:
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-docker"></span> Docker Compose</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-x-yaml">services:
trilium:
image: triliumnext/trilium
environment:
@@ -335,7 +338,11 @@
# TRILIUM_NETWORK_CORS_ALLOW_ORIGIN: "https://myapp.com"
# TRILIUM_SYNC_SERVER_HOST: "https://sync.example.com"
# TRILIUM_OAUTH_BASE_URL: "https://auth.example.com"</code></pre>
-<h3>Shell Export Example</h3><pre><code class="language-text-x-trilium-auto"># Using either format
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-tux"></span> Linux Shell</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-x-trilium-auto"># Using either format
export TRILIUM_GENERAL_NOAUTHENTICATION=false
export TRILIUM_NETWORK_HTTPS=true
export TRILIUM_NETWORK_CERTPATH=/path/to/cert.pem
@@ -344,6 +351,9 @@ export TRILIUM_LOGGING_RETENTIONDAYS=30
# Start Trilium
npm start</code></pre>
+ </div>
+ </section>
+</div>
<h2>config.ini Reference</h2>
<p>For the complete list of configuration options and their INI file format,
please review the <a href="https://github.com/TriliumNext/Trilium/blob/main/apps/server/src/assets/config-sample.ini">config-sample.ini</a> file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html
index 17903b736f..742b4be033 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html
@@ -26,14 +26,22 @@
<h2>Automatically download and install the latest nightly</h2>
<p>This is pretty useful if you are a beta tester that wants to periodically
update their version:</p>
-<h2>On Ubuntu (Bash)</h2><pre><code class="language-text-x-sh">#!/usr/bin/env bash
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-tux"></span> Ubuntu (Bash)</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-x-sh">#!/usr/bin/env bash
name=TriliumNotes-linux-x64-nightly.deb
rm -f $name*
wget https://github.com/TriliumNext/Trilium/releases/download/nightly/$name
sudo apt-get install ./$name
rm $name</code></pre>
-<h2>On Windows (PowerShell)</h2><pre><code class="language-application-x-powershell">if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-windows"></span> Windows (PowerShell)</p>
+ <div
+ class="trilium-tab-panel"><pre><code class="language-application-x-powershell">if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
$arch = "arm64";
} else {
$arch = "x64";
@@ -57,4 +65,7 @@ try {
if (Test-Path $destination) {
Remove-Item -Path $destination -Force
}
-}</code></pre>
\ No newline at end of file
+}</code></pre>
+ </div>
+ </section>
+</div>
\ No newline at end of file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html
index 1f89ef0893..d93df045f6 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html
@@ -32,34 +32,104 @@
<p>If you want to use some other location for the data directory than the
default one, you may change it via <code>TRILIUM_DATA_DIR</code> environment
variable to some other location:</p>
-<h3>Windows</h3>
-<ol>
- <li>Press the Windows key on your keyboard.</li>
- <li>Search and select “Edit the system variables”.</li>
- <li>Press the “Environment Variables…” button in the bottom-right of the newly
- opened screen.</li>
- <li>On the top section ("User variables for [user]"), press the “New…” button.</li>
- <li>In the <em>Variable name</em> field insert <code>TRILIUM_DATA_DIR</code>.</li>
- <li>Press the <em>Browse Directory…</em> button and select the new directory
- where to store the database.</li>
- <li>Close all the windows by pressing the <em>OK</em> button for each of them.</li>
-</ol>
-<h4>Linux</h4><pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
-<h4>Mac OS X</h4>
-<p>You need to create a <code>.plist</code> file under <code>~/Library/LaunchAgents</code> to
- load it properly each login.</p>
-<p>To load it manually, you need to use <code>launchctl setenv TRILIUM_DATA_DIR &lt;yourpath&gt;</code>
-</p>
-<p>Here is a pre-defined template, where you just need to add your path to:</p><pre><code class="language-text-x-trilium-auto"> Label
- set.trilium.env
- RunAtLoad
-
- ProgramArguments
-
- launchctl
- setenv
- TRILIUM_DATA_DIR
- /Users/YourUserName/Library/Application Support/trilium-data </code></pre>
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-windows"></span> Windows</p>
+ <div class="trilium-tab-panel">
+ <ol>
+ <li>Press the&nbsp;<span class="tn-icon bx bxl-windows"></span> key on your
+ keyboard.</li>
+ <li>Search and select <em>Edit the system variables</em>.</li>
+ <li>Press the <em>Environment Variables…</em> button in the bottom-right of
+ the newly opened screen.</li>
+ <li>On the top section (<em>User variables for [user]</em>), press the <em>New…</em> button.</li>
+ <li>In the <em>Variable name</em> field insert <code>TRILIUM_DATA_DIR</code>.</li>
+ <li>Press the <em>Browse Directory…</em> button and select the new directory
+ where to store the database.</li>
+ <li>Close all the windows by pressing the <em>OK</em> button for each of them.</li>
+ </ol>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-tux"></span> Linux</p>
+ <div class="trilium-tab-panel">
+ <p>Trilium reads <code>TRILIUM_DATA_DIR</code> when it starts, so the variable
+ must be set in the environment that launches it.</p>
+ <aside class="admonition note">
+ <p>Setting the variable does not move existing notes. To keep them, close
+ Trilium and copy the old data directory to the new location first. Trilium
+ creates the last folder of the path if it is missing, but not its parent
+ folders.</p>
+ </aside>
+ <p><strong>Desktop application (.deb, .rpm, AppImage or .zip)</strong>
+ </p>
+ <p>To use the new location however Trilium is started (from the application
+ menu, a desktop shortcut, at login or from a terminal), set the variable
+ for the whole session:</p>
+ <ol>
+ <li>
+ <p>Create the file <code>~/.config/environment.d/trilium.conf</code> with the
+ following content, using the full path (<code>~</code> is not expanded in
+ this file):</p><pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
+ </li>
+ <li>
+ <p>Log out and log back in.</p>
+ </li>
+ </ol>
+ <p>This works on desktops started by <code>systemd</code>, which covers most
+ distributions running GNOME or KDE Plasma. On other systems, add the following
+ line to <code>~/.profile</code> instead, then log out and log back in:</p><pre><code class="language-text-x-sh">export TRILIUM_DATA_DIR="$HOME/data/my-trilium-data"</code></pre>
+ <p>The same line in <code>~/.bashrc</code> (or your shell's equivalent) only
+ applies when Trilium is started from a terminal, not from the application
+ menu.</p>
+ <p><strong>Flatpak (Flathub)</strong>
+ </p>
+ <p>The Flathub version runs in a sandbox that cannot see the rest of the
+ file system, so it needs access to the folder as well as the variable:</p><pre><code class="language-text-x-sh">flatpak override --user \
+ --env=TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data \
+ --filesystem=/home/myuser/data/my-trilium-data:create \
+ org.triliumnotes.Trilium</code></pre>
+ <p>To return to the default location, run <code>flatpak override --user --reset org.triliumnotes.Trilium</code>.
+ This also removes any other overrides set for Trilium.</p>
+ <p><strong>Server running as a systemd service</strong>
+ </p>
+ <p>Add an <code>Environment=</code> line to the <code>[Service]</code> section
+ of the unit file described in&nbsp;<a class="reference-link" href="#root/_help_3tW6mORuTHnB">Packaged version for Linux</a>:</p><pre><code class="language-text-x-trilium-auto">[Service]
+Environment=TRILIUM_DATA_DIR=/var/lib/trilium-data</code></pre>
+ <p>Then reload and restart the service:</p><pre><code class="language-text-x-sh">sudo systemctl daemon-reload
+sudo systemctl restart trilium</code></pre>
+ <p>The user set in <code>User=</code> must be able to write to the folder.
+ For Docker, see&nbsp;<a class="reference-link" href="#root/_help_rWX5eY045zbE">Using Docker</a>&nbsp;instead.</p>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-apple"></span> macOS</p>
+ <div class="trilium-tab-panel">
+ <p>You need to create a <code>.plist</code> file under <code>~/Library/LaunchAgents</code> to
+ load it properly each login.</p>
+ <p>To load it manually, you need to use <code>launchctl setenv TRILIUM_DATA_DIR &lt;yourpath&gt;</code>
+ </p>
+ <p>Here is a pre-defined template, where you just need to add your path to:</p><pre><code class="language-text-xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
+&lt;plist version="1.0"&gt;
+&lt;dict&gt;
+ &lt;key&gt;Label&lt;/key&gt;
+ &lt;string&gt;set.trilium.env&lt;/string&gt;
+ &lt;key&gt;RunAtLoad&lt;/key&gt;
+ &lt;true/&gt;
+ &lt;key&gt;ProgramArguments&lt;/key&gt;
+ &lt;array&gt;
+ &lt;string&gt;/bin/launchctl&lt;/string&gt;
+ &lt;string&gt;setenv&lt;/string&gt;
+ &lt;string&gt;TRILIUM_DATA_DIR&lt;/string&gt;
+ &lt;string&gt;/Users/YourUserName/Library/Application Support/trilium-data&lt;/string&gt;
+ &lt;/array&gt;
+&lt;/dict&gt;
+&lt;/plist&gt;
+</code></pre>
+ </div>
+ </section>
+</div>
<h3>Create a script to run with specific data directory</h3>
<p>An alternative to globally setting environment variable is to run only
the Trilium Notes with this environment variable. This then allows for
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html
index fee4c76c1f..ccfbd961b2 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html
@@ -1,4 +1,4 @@
-<figure class="image image_resized image-style-align-right" style="width:33.52%;">
+<figure class="image image-style-align-right image_resized" style="width:33.52%;">
<img style="aspect-ratio:1242/2688;" src="Mobile Frontend_IMG_1765.PNG"
width="1242" height="2688">
</figure>
@@ -13,10 +13,9 @@
<p>Here is a non-exhaustive list of differences between the desktop version
and the mobile one:</p>
<ul>
- <li>
- <p>The&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;is
- displayed as a sidebar. To display the sidebar, press the button in the
- top-left of the screen.</p>
+ <li>The&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>&nbsp;is
+ displayed as a sidebar. To display the sidebar, press the button in the
+ top-left of the screen.
<ul>
<li>There is also a swipe gesture that can be done from the left of the screen,
but the browser's navigation gesture interferes with it most of the time
@@ -24,97 +23,103 @@
<li>Press and hold a note to display the&nbsp;<a class="reference-link" href="#root/_help_YtSN43OrfzaA">Note tree contextual menu</a>.</li>
</ul>
</li>
- <li>
- <p>The&nbsp;<a class="reference-link" href="#root/_help_Ms1nauBra7gq">Quick search</a>&nbsp;bar
- is also displayed at the top of the note tree.</p>
- </li>
- <li>
- <p>The full&nbsp;<a class="reference-link" href="#root/_help_eIg8jdvaoNNd">Search</a>&nbsp;function
- can be triggered either from either the&nbsp;<a class="reference-link"
- href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;or from the&nbsp;<a
- class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
- if configured.</p>
- </li>
- <li>
- <p>The&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>&nbsp;is
- displayed at the bottom of the screen.</p>
+ <li>The&nbsp;<a class="reference-link" href="#root/_help_Ms1nauBra7gq">Quick search</a>&nbsp;bar
+ is also displayed at the top of the note tree.</li>
+ <li>The full&nbsp;<a class="reference-link" href="#root/_help_eIg8jdvaoNNd">Search</a>&nbsp;function
+ can be triggered either from either the&nbsp;<a class="reference-link"
+ href="#root/_help_x3i7MxGccDuM">Global menu</a>&nbsp;or from the&nbsp;<a
+ class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
+ if configured.</li>
+ <li>The&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>&nbsp;is
+ displayed at the bottom of the screen.
<ul>
<li>The launch bar uses a different configuration for icons than the desktop
version. See the dedicated page for more information on how to configure
it.</li>
</ul>
</li>
- <li>
- <p>Most of the note-related actions are grouped in the horizontal dots icon
- on the top-right of the note.</p>
- </li>
- <li>
- <p>The&nbsp;<a class="reference-link" href="#root/_help_3seOhtN8uLIY">Tabs</a>&nbsp;are
- grouped under a tab switcher in the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
- where the tabs are displayed in a full-screen grid with preview for easy
- switching, as well as additional options such as reopening closed tabs.</p>
- </li>
- <li>
- <p>Since v0.100.0,&nbsp;<a class="reference-link" href="#root/_help_luNhaphA37EO">Split View</a>&nbsp;can
- also be used in mobile view, but with a maximum of two panes at once. The
- splits are displayed vertically instead of horizontally.</p>
- </li>
- <li>
- <p>Starting with v0.102.0, the&nbsp;<a class="reference-link" href="#root/_help_IjZS7iK5EXtb">New Layout</a>&nbsp;is
- enforced on mobile. This brings features such as the note badges, note
- type switcher or collection properties which would otherwise not be available.</p>
- </li>
+ <li>Most of the note-related actions are grouped in the horizontal dots icon
+ on the top-right of the note.</li>
+ <li>The&nbsp;<a class="reference-link" href="#root/_help_3seOhtN8uLIY">Tabs</a>&nbsp;are
+ grouped under a tab switcher in the&nbsp;<a class="reference-link" href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>,
+ where the tabs are displayed in a full-screen grid with preview for easy
+ switching, as well as additional options such as reopening closed tabs.</li>
+ <li>Since v0.100.0,&nbsp;<a class="reference-link" href="#root/_help_luNhaphA37EO">Split View</a>&nbsp;can
+ also be used in mobile view, but with a maximum of two panes at once. The
+ splits are displayed vertically instead of horizontally.</li>
+ <li>Starting with v0.102.0, the&nbsp;<a class="reference-link" href="#root/_help_IjZS7iK5EXtb">New Layout</a>&nbsp;is
+ enforced on mobile. This brings features such as the note badges, note
+ type switcher or collection properties which would otherwise not be available.</li>
</ul>
<h2>Installing as a PWA</h2>
<p>The mobile view can be set up as a PWA. While this does not offer any
offline capabilities, it will display the application in full-screen and
makes it easy to access via your mobile phone's home screen.</p>
-<h3>On iOS with Safari</h3>
-<ol>
- <li>Open your default web browser and access your Trilium instance.</li>
- <li>Login.</li>
- <li>Press the […] button in the bottom-right of the screen and select Share.</li>
- <li>Scroll down to reveal the full list of items and choose “Add to Home Screen”.</li>
- <li>Press “Add” and the web app will be available.</li>
-</ol>
-<h3>On Android with Google Chrome</h3>
-<aside class="admonition important">
- <p>Google Chrome requires the server to be served over HTTPS in order to
- display in full-screen. If using HTTP, the app will appear like a normal
- web page (similar to a bookmark).</p>
-</aside>
-<ol>
- <li>Open your default web browser and access your Trilium instance.</li>
- <li>Login.</li>
- <li>Press the three vertical dots icon in the top-right of the screen and
- select <em>Add to Home screen.</em>
- </li>
- <li>Select the <em>Install</em> option.</li>
- <li>Select an appropriate name.</li>
- <li>The web app will appear as an application, not on the home screen.</li>
-</ol>
-<h3>On Android with Brave</h3>
-<aside class="admonition important">
- <p>Brave requires the server to be served over HTTPS in order to display
- in full-screen. If using HTTP, the app will appear like a normal web page
- (similar to a bookmark).</p>
-</aside>
-<ol>
- <li>Open your default web browser and access your Trilium instance.</li>
- <li>Login.</li>
- <li>Press the three vertical dots icon in the bottom-right of the screen and
- select <em>Add to Home screen</em>.</li>
- <li>Press the <em>Install</em> option.</li>
- <li>The web app will appear as an application, not on the home screen.</li>
-</ol>
-<h3>On Samsung Browser</h3>
-<ol>
- <li>Open your default web browser and access your Trilium instance.</li>
- <li>Login.</li>
- <li>Press the hamburger menu in the bottom-right of the screen.</li>
- <li>Select <em>Add to</em>, followed by <em>Home screen</em>.</li>
- <li>Press <em>Add</em> and the web app will appear on the home page.</li>
-</ol>
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-apple"></span> iOS with Safari</p>
+ <div class="trilium-tab-panel">
+ <ol>
+ <li>Open your default web browser and access your Trilium instance.</li>
+ <li>Login.</li>
+ <li>Press the […] button in the bottom-right of the screen and select Share.</li>
+ <li>Scroll down to reveal the full list of items and choose <em>Add to Home Screen</em>.</li>
+ <li>Press <em>Add</em> and the web app will be available.</li>
+ </ol>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-chrome"></span> Android with Google Chrome</p>
+ <div
+ class="trilium-tab-panel">
+ <aside class="admonition important">
+ <p>Google Chrome requires the server to be served over HTTPS in order to
+ display in full-screen. If using HTTP, the app will appear like a normal
+ web page (similar to a bookmark).</p>
+ </aside>
+ <ol>
+ <li>Open your default web browser and access your Trilium instance.</li>
+ <li>Login.</li>
+ <li>Press the three vertical dots icon in the top-right of the screen and
+ select <em>Add to Home screen.</em>
+ </li>
+ <li>Select the <em>Install</em> option.</li>
+ <li>Select an appropriate name.</li>
+ <li>The web app will appear as an application, not on the home screen.</li>
+ </ol>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title">Android with Brave</p>
+ <div class="trilium-tab-panel">
+ <aside class="admonition important">
+ <p>Brave requires the server to be served over HTTPS in order to display
+ in full-screen. If using HTTP, the app will appear like a normal web page
+ (similar to a bookmark).</p>
+ </aside>
+ <ol>
+ <li>Open your default web browser and access your Trilium instance.</li>
+ <li>Login.</li>
+ <li>Press the three vertical dots icon in the bottom-right of the screen and
+ select <em>Add to Home screen</em>.</li>
+ <li>Press the <em>Install</em> option.</li>
+ <li>The web app will appear as an application, not on the home screen.</li>
+ </ol>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title">Samsung Browser</p>
+ <div class="trilium-tab-panel">
+ <ol>
+ <li>Open your default web browser and access your Trilium instance.</li>
+ <li>Login.</li>
+ <li>Press the hamburger menu in the bottom-right of the screen.</li>
+ <li>Select <em>Add to</em>, followed by <em>Home screen</em>.</li>
+ <li>Press <em>Add</em> and the web app will appear on the home page.</li>
+ </ol>
+ </div>
+ </section>
+</div>
<h2>Testing via the desktop application</h2>
<p>If you are running Trilium without a dedicated <a href="#root/_help_WOcw2SLH6tbX">server installation</a>,
you can still test the mobile application using the desktop application.
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.html
index bf888d9d27..d116171174 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.html
@@ -38,27 +38,43 @@ class="admonition warning">
<p>Trilium requires a directory on the host system to store its data. This
directory must be mounted into the Docker container with write permissions.</p>
<h3>Running the Docker Container</h3>
-<h4>Local Access Only</h4>
-<p>Run the container to make it accessible only from the localhost. This
- setup is suitable for testing or when using a proxy server like Nginx or
- Apache.</p><pre><code class="language-text-x-trilium-auto">sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]</code></pre>
-<ol>
- <li>Verify the container is running using <code>docker ps</code>.</li>
- <li>Access Trilium via a web browser at <code>127.0.0.1:8080</code>.</li>
-</ol>
-<h4>Local Network Access</h4>
-<p>To make the container accessible only on your local network, first create
- a new Docker network:</p><pre><code class="language-text-x-trilium-auto">docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet</code></pre>
-<p>Then, run the container with the network settings:</p><pre><code class="language-text-x-trilium-auto">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest</code></pre>
-<p>To set a different user ID (UID) and group ID (GID) for the saved data,
- use the <code>USER_UID</code> and <code>USER_GID</code> environment variables:</p><pre><code class="language-text-x-trilium-auto">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest</code></pre>
-<p>Find the local IP address using <code>docker inspect [container_name]</code> and
- access the service from devices on the local network.</p><pre><code class="language-text-x-trilium-auto">docker ps
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title">Local Access Only</p>
+ <div class="trilium-tab-panel">
+ <p>Run the container to make it accessible only from the localhost. This
+ setup is suitable for testing or when using a proxy server like Nginx or
+ Apache.</p><pre><code class="language-text-x-sh">sudo docker run -t -i -p 127.0.0.1:8080:8080 \
+ -v ~/trilium-data:/home/node/trilium-data
+ triliumnext/trilium:[VERSION]</code></pre>
+ <ol>
+ <li>Verify the container is running using <code>docker ps</code>.</li>
+ <li>Access Trilium via a web browser at <code>127.0.0.1:8080</code>.</li>
+ </ol>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title">Local Network Access</p>
+ <div class="trilium-tab-panel">
+ <p>To make the container accessible only on your local network, first create
+ a new Docker network:</p><pre><code class="language-text-x-sh">docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet</code></pre>
+ <p>Then, run the container with the network settings:</p><pre><code class="language-text-x-sh">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest</code></pre>
+ <p>To set a different user ID (UID) and group ID (GID) for the saved data,
+ use the <code>USER_UID</code> and <code>USER_GID</code> environment variables:</p><pre><code class="language-text-x-sh">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest</code></pre>
+ <p>Find the local IP address using <code>docker inspect [container_name]</code> and
+ access the service from devices on the local network.</p><pre><code class="language-text-x-sh">docker ps
docker inspect [container_name]</code></pre>
-<h4>Global Access</h4>
-<p>To allow access from any IP address, run the container as follows:</p><pre><code class="language-text-x-trilium-auto">docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]</code></pre>
-<p>Stop the container with <code>docker stop &lt;CONTAINER ID&gt;</code>,
- where the container ID is obtained from <code>docker ps</code>.</p>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title">Global Access</p>
+ <div class="trilium-tab-panel">
+ <p>To allow access from any IP address, run the container as follows:</p><pre><code class="language-text-x-sh">docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]</code></pre>
+ <p>Stop the container with <code>docker stop &lt;CONTAINER ID&gt;</code>,
+ where the container ID is obtained from <code>docker ps</code>.</p>
+ </div>
+ </section>
+</div>
<h3>Custom Data Directory</h3>
<p>For a custom data directory, use:</p><pre><code class="language-text-x-trilium-auto">-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/trilium:[VERSION]</code></pre>
<p>If you want to run your instance in a non-default way, please use the
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html
index d266361b6a..a8a20c7680 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html
@@ -73,31 +73,41 @@
Once a workflow run is selected, the ZIP files are available in the <em>Artifacts</em> section,
under the name <code>web-clipper-extension</code>.</li>
</ul>
-<h3>For Chrome</h3>
-<ol>
- <li>Download <code>trilium-web-clipper-[x.y.z]-chrome.zip</code>.</li>
- <li>Extract the archive.</li>
- <li>In Chrome, navigate to <code>chrome://extensions/</code>
- </li>
- <li>Toggle <em>Developer Mode</em> in top-right of the page.</li>
- <li>Press the <em>Load unpacked</em> button near the header.</li>
- <li>Point to the extracted directory from step (2).</li>
-</ol>
-<h3>For Firefox</h3>
-<aside class="admonition warning">
- <p>Firefox prevents installation of unsigned packages in the “retail” version.
- To be able to install extensions from disk, consider using <em>Firefox Developer Edition</em> or
- a non-branded version of Firefox (e.g. <em>GNU IceCat</em>).</p>
- <p>One time, go to <code>about:config</code> and change <code>xpinstall.signatures.required</code> to <code>false</code>.</p>
-</aside>
-<ol>
- <li>Navigate to <code>about:addons</code>.</li>
- <li>Select <em>Extensions</em> in the left-side navigation.</li>
- <li>Press the <em>Gear</em> icon on the right of the <em>Manage Your Extensions</em> title.</li>
- <li>Select <em>Install Add-on From File…</em>
- </li>
- <li>Point it to <code>trilium-web-clipper-[x.y.z]-firefox.zip</code>.</li>
- <li>Press the <em>Add</em> button to confirm.</li>
-</ol>
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-chrome"></span> Chrome</p>
+ <div class="trilium-tab-panel">
+ <ol>
+ <li>Download <code>trilium-web-clipper-[x.y.z]-chrome.zip</code>.</li>
+ <li>Extract the archive.</li>
+ <li>In Chrome, navigate to <code>chrome://extensions/</code>
+ </li>
+ <li>Toggle <em>Developer Mode</em> in top-right of the page.</li>
+ <li>Press the <em>Load unpacked</em> button near the header.</li>
+ <li>Point to the extracted directory from step (2).</li>
+ </ol>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-firefox"></span> Firefox</p>
+ <div class="trilium-tab-panel">
+ <aside class="admonition warning">
+ <p>Firefox prevents installation of unsigned packages in the “retail” version.
+ To be able to install extensions from disk, consider using <em>Firefox Developer Edition</em> or
+ a non-branded version of Firefox (e.g. <em>GNU IceCat</em>).</p>
+ <p>One time, go to <code>about:config</code> and change <code>xpinstall.signatures.required</code> to <code>false</code>.</p>
+ </aside>
+ <ol>
+ <li>Navigate to <code>about:addons</code>.</li>
+ <li>Select <em>Extensions</em> in the left-side navigation.</li>
+ <li>Press the <em>Gear</em> icon on the right of the <em>Manage Your Extensions</em> title.</li>
+ <li>Select <em>Install Add-on From File…</em>
+ </li>
+ <li>Point it to <code>trilium-web-clipper-[x.y.z]-firefox.zip</code>.</li>
+ <li>Press the <em>Add</em> button to confirm.</li>
+ </ol>
+ </div>
+ </section>
+</div>
<h2>Credits</h2>
<p>Some parts of the code are based on the <a href="https://github.com/laurent22/joplin/tree/master/Clipper">Joplin Notes browser extension</a>.</p>
\ No newline at end of file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html
index 3497c13f71..e595b51df2 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html
@@ -5,9 +5,31 @@
<p>This is an example of a note context-aware widget, which reacts to the
currently opened note and refreshes automatically as the user navigates
through the notes.</p>
-<h2>Legacy widget</h2>
<p>In this example, the title of the note is displayed. It works best on
- the <a href="#root/_help_x0JgW8UqGXvq">horizontal layout</a>.</p><pre><code class="language-text-javascript">const TPL = `\
+ the <a href="#root/_help_x0JgW8UqGXvq">horizontal layout</a>.</p>
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-react"></span> Preact</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-x-trilium-auto">import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact";
+
+export default defineLauncherWidget({
+ render: () =&gt; {
+ const { note } = useActiveNoteContext();
+ return &lt;div style={{
+ display: "flex",
+ height: "53px",
+ width: "fit-content",
+ fontSize: "0.75em",
+ alignItems: "center",
+ flexShrink: 0
+ }}&gt;{note?.title}&lt;/div&gt;;
+ }
+});</code></pre>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-javascript"></span> Legacy</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-javascript">const TPL = `\
&lt;div style="
display: flex;
height: 53px;
@@ -30,18 +52,6 @@ class NoteTitleWidget extends api.NoteContextAwareWidget {
}
module.exports = new NoteTitleWidget();</code></pre>
-<h2>Preact widget (v0.101.0+)</h2><pre><code class="language-text-jsx">import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact";
-
-export default defineLauncherWidget({
- render: () =&gt; {
- const { note } = useActiveNoteContext();
- return &lt;div style={{
- display: "flex",
- height: "53px",
- width: "fit-content",
- fontSize: "0.75em",
- alignItems: "center",
- flexShrink: 0
- }}&gt;{note?.title}&lt;/div&gt;;
- }
-});</code></pre>
\ No newline at end of file
+ </div>
+ </section>
+</div>
\ No newline at end of file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Reference.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Reference.html
index a85dfdebc4..b9a4b2ce4d 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Reference.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Theme development/Reference.html
@@ -9,31 +9,23 @@ body.desktop #root-widget {
}</code></pre>
<p>Do note that there is also a “tablet mode” in the mobile layout. For that
particular case media queries are required:</p><pre><code class="language-text-css">@media (max-width: 991px) {
-
#launcher-pane {
-
/* Do something on mobile layout */
-
}
-
}
@media (min-width: 992px) {
-
#launcher-pane {
-
/* Do something on mobile tablet + desktop layout */
-
}
-
}</code></pre>
<h2>Detecting horizontal vs. vertical layout</h2>
<p>The user can select between vertical layout (the classical one, where
the launcher bar is on the left) and a horizontal layout (where the launcher
bar is on the top and tabs are full-width).</p>
-<p>Different styles can be applied by using classes at <code>body</code> level:</p><pre><code class="language-text-x-trilium-auto">body.layout-vertical #left-pane {
+<p>Different styles can be applied by using classes at <code>body</code> level:</p><pre><code class="language-text-css">body.layout-vertical #left-pane {
/* Do something */
}
@@ -44,30 +36,34 @@ body.layout-horizontal #center-pane {
in the DOM regardless of the user's choice), for example <code>#horizontal-main-container</code> and <code>#vertical-main-container</code> can
be used to customize the background of the content section.</p>
<h2>Detecting platform (Windows, macOS) or Electron</h2>
-<p>It is possible to add particular styles that only apply to a given platform
- by using the classes in <code>body</code>:</p>
-<figure class="table">
- <table>
- <thead>
- <tr>
- <th>Windows</th>
- <th>macOS</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>&lt;br&gt;body.platform-win32 {&lt;br&gt; background: red;&lt;br&gt;}&lt;br&gt;</code>
- </td>
- <td><code>&lt;br&gt;body.platform-darwin {&lt;br&gt; background: red;&lt;br&gt;}&lt;br&gt;</code>
- </td>
- </tr>
- </tbody>
- </table>
-</figure>
-<p>It is also possible to only apply a style if running under Electron (desktop
- application):</p><pre><code class="language-text-x-trilium-auto">body.electron {
+<div class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-windows"></span> Windows</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-css">body.platform-win32 {
+ background: red;
+}</code></pre>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-apple"></span> macOS</p>
+ <div class="trilium-tab-panel"><pre><code class="language-text-css">body.platform-darwin {
+ background: red;
+}</code></pre>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bx-windows"></span> Electron (desktop app)</p>
+ <div
+ class="trilium-tab-panel">
+ <p>To distinguish between a&nbsp;<a class="reference-link" href="#root/_help_poXkQfguuA0U">Desktop Installation</a>&nbsp;and
+ a&nbsp;<a class="reference-link" href="#root/_help_WOcw2SLH6tbX">Server Installation</a>:</p><pre><code class="language-text-x-trilium-auto">body.electron {
background: blue;
}</code></pre>
+ <p>Can be chained with detections for&nbsp;<a class="reference-link" href="#root/_help_WN5z4M8ASACJ">Reference</a>&nbsp;or&nbsp;<a
+ class="reference-link" href="#root/_help_WN5z4M8ASACJ">Reference</a>&nbsp;(e.g. <code>body.electron.platform-win32</code>).</p>
+ </div>
+ </section>
+</div>
<h3>Native title bar</h3>
<p>It's possible to detect if the user has selected the native title bar
or the custom title bar by querying against <code>body</code>:</p><pre><code class="language-text-x-trilium-auto">body.electron.native-titlebar {
@@ -82,25 +78,36 @@ body.electron:not(.native-titlebar) {
to use the platform-specific window buttons such as the semaphore on macOS.</p>
<p>See <a href="https://github.com/TriliumNext/Notes/pull/702">Native title bar buttons by eliandoran · Pull Request #702 · TriliumNext/Notes</a> for
the original implementation of this feature, including screenshots.</p>
-<h4>On Windows</h4>
-<p>The colors of the native window button area can be adjusted using a RGB
- hex color:</p><pre><code class="language-text-x-trilium-auto">body {
+<div
+class="trilium-tabs">
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-windows"></span> Windows</p>
+ <div class="trilium-tab-panel">
+ <p>The colors of the native window button area can be adjusted using a RGB
+ hex color:</p><pre><code class="language-text-x-trilium-auto">body {
--native-titlebar-foreground: #ffffff;
--native-titlebar-background: #ff0000;
}</code></pre>
-<p>It is also possible to use transparency at the cost of reduced hover colors
- using a RGBA hex color:</p><pre><code class="language-text-x-trilium-auto">body {
+ <p>It is also possible to use transparency at the cost of reduced hover colors
+ using a RGBA hex color:</p><pre><code class="language-text-x-trilium-auto">body {
--native-titlebar-background: #ff0000aa;
}</code></pre>
-<p>Note that the value is read when the window is initialized and then it
- is refreshed only when the user changes their light/dark mode preference.</p>
-<h4>On macOS</h4>
-<p>On macOS the semaphore window buttons are enabled by default when the
- native title bar is disabled. The offset of the buttons can be adjusted
- using:</p><pre><code class="language-text-css">body {
+ <p>Note that the value is read when the window is initialized and then it
+ is refreshed only when the user changes their light/dark mode preference.</p>
+ </div>
+ </section>
+ <section class="trilium-tab">
+ <p class="trilium-tab-title"><span class="tn-icon bx bxl-apple"></span> macOS</p>
+ <div class="trilium-tab-panel">
+ <p>On macOS the semaphore window buttons are enabled by default when the
+ native title bar is disabled. The offset of the buttons can be adjusted
+ using:</p><pre><code class="language-text-css">body {
--native-titlebar-darwin-x-offset: 12;
--native-titlebar-darwin-y-offset: 14 !important;
}</code></pre>
+ </div>
+ </section>
+</div>
<h3>Background/transparency effects on Windows (Mica)</h3>
<p>Windows 11 offers a special background/transparency effect called Mica,
which can be enabled by themes by setting the <code>--background-material</code> variable
diff --git a/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).md b/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).md
index 3c2b493727..826b7e4efd 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).md
+++ b/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables).md
@@ -131,39 +131,39 @@ Both naming patterns are fully supported and can be used interchangeably:
## Examples
-### Docker Compose Example
-
-```yaml
-services:
- trilium:
- image: triliumnext/trilium
- environment:
- # Using full format
- TRILIUM_GENERAL_INSTANCENAME: "My Trilium Instance"
- TRILIUM_NETWORK_PORT: "8080"
- TRILIUM_NETWORK_CORSALLOWORIGIN: "https://myapp.com"
- TRILIUM_SYNC_SYNCSERVERHOST: "https://sync.example.com"
- TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL: "https://auth.example.com"
-
- # Or using shorter alternatives (equally valid)
- # TRILIUM_NETWORK_CORS_ALLOW_ORIGIN: "https://myapp.com"
- # TRILIUM_SYNC_SERVER_HOST: "https://sync.example.com"
- # TRILIUM_OAUTH_BASE_URL: "https://auth.example.com"
-```
-
-### Shell Export Example
-
-```
-# Using either format
-export TRILIUM_GENERAL_NOAUTHENTICATION=false
-export TRILIUM_NETWORK_HTTPS=true
-export TRILIUM_NETWORK_CERTPATH=/path/to/cert.pem
-export TRILIUM_NETWORK_KEYPATH=/path/to/key.pem
-export TRILIUM_LOGGING_RETENTIONDAYS=30
-
-# Start Trilium
-npm start
-```
+=== "<span class="tn-icon bx bxl-docker"></span> Docker Compose"
+
+ ```yaml
+ services:
+ trilium:
+ image: triliumnext/trilium
+ environment:
+ # Using full format
+ TRILIUM_GENERAL_INSTANCENAME: "My Trilium Instance"
+ TRILIUM_NETWORK_PORT: "8080"
+ TRILIUM_NETWORK_CORSALLOWORIGIN: "https://myapp.com"
+ TRILIUM_SYNC_SYNCSERVERHOST: "https://sync.example.com"
+ TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL: "https://auth.example.com"
+
+ # Or using shorter alternatives (equally valid)
+ # TRILIUM_NETWORK_CORS_ALLOW_ORIGIN: "https://myapp.com"
+ # TRILIUM_SYNC_SERVER_HOST: "https://sync.example.com"
+ # TRILIUM_OAUTH_BASE_URL: "https://auth.example.com"
+ ```
+
+=== "<span class="tn-icon bx bxl-tux"></span> Linux Shell"
+
+ ```
+ # Using either format
+ export TRILIUM_GENERAL_NOAUTHENTICATION=false
+ export TRILIUM_NETWORK_HTTPS=true
+ export TRILIUM_NETWORK_CERTPATH=/path/to/cert.pem
+ export TRILIUM_NETWORK_KEYPATH=/path/to/key.pem
+ export TRILIUM_LOGGING_RETENTIONDAYS=30
+
+ # Start Trilium
+ npm start
+ ```
## config.ini Reference
diff --git a/docs/User Guide/User Guide/Advanced Usage/Nightly release.md b/docs/User Guide/User Guide/Advanced Usage/Nightly release.md
index 3ef005cd57..c04d9bafc3 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Nightly release.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Nightly release.md
@@ -21,44 +21,44 @@ Depending on your use case, you can either test the portable version or even use
This is pretty useful if you are a beta tester that wants to periodically update their version:
-## On Ubuntu (Bash)
-
-```sh
-#!/usr/bin/env bash
-
-name=TriliumNotes-linux-x64-nightly.deb
-rm -f $name*
-wget https://github.com/TriliumNext/Trilium/releases/download/nightly/$name
-sudo apt-get install ./$name
-rm $name
-```
-
-## On Windows (PowerShell)
-
-```powershell
-if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
- $arch = "arm64";
-} else {
- $arch = "x64";
-}
-
-$exeUrl = "https://github.com/TriliumNext/Trilium/releases/download/nightly/TriliumNotes-main-windows-$($arch).exe";
-Write-Host "Downloading $($exeUrl)"
-
-# Generate a unique path in the temp dir
-$guid = [guid]::NewGuid().ToString()
-$destination = Join-Path -Path $env:TEMP -ChildPath "$guid.exe"
-
-try {
- $ProgressPreference = 'SilentlyContinue'
- Invoke-WebRequest -Uri $exeUrl -OutFile $destination
- $process = Start-Process -FilePath $destination
-} catch {
- Write-Error "An error occurred: $_"
-} finally {
- # Clean up
- if (Test-Path $destination) {
- Remove-Item -Path $destination -Force
+=== "<span class="tn-icon bx bxl-tux"></span> Ubuntu (Bash)"
+
+ ```sh
+ #!/usr/bin/env bash
+
+ name=TriliumNotes-linux-x64-nightly.deb
+ rm -f $name*
+ wget https://github.com/TriliumNext/Trilium/releases/download/nightly/$name
+ sudo apt-get install ./$name
+ rm $name
+ ```
+
+=== "<span class="tn-icon bx bxl-windows"></span> Windows (PowerShell)"
+
+ ```powershell
+ if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") {
+ $arch = "arm64";
+ } else {
+ $arch = "x64";
+ }
+
+ $exeUrl = "https://github.com/TriliumNext/Trilium/releases/download/nightly/TriliumNotes-main-windows-$($arch).exe";
+ Write-Host "Downloading $($exeUrl)"
+
+ # Generate a unique path in the temp dir
+ $guid = [guid]::NewGuid().ToString()
+ $destination = Join-Path -Path $env:TEMP -ChildPath "$guid.exe"
+
+ try {
+ $ProgressPreference = 'SilentlyContinue'
+ Invoke-WebRequest -Uri $exeUrl -OutFile $destination
+ $process = Start-Process -FilePath $destination
+ } catch {
+ Write-Error "An error occurred: $_"
+ } finally {
+ # Clean up
+ if (Test-Path $destination) {
+ Remove-Item -Path $destination -Force
+ }
}
-}
-```
\ No newline at end of file
+ ```
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Installation & Setup/Data directory.md b/docs/User Guide/User Guide/Installation & Setup/Data directory.md
index 61e69a1e5e..936ba62f45 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Data directory.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Data directory.md
@@ -29,42 +29,101 @@ If you want to back up your Trilium data, just backup this single directory - it
If you want to use some other location for the data directory than the default one, you may change it via `TRILIUM_DATA_DIR` environment variable to some other location:
-### Windows
+=== "<span class="tn-icon bx bxl-windows"></span> Windows"
-1. Press the Windows key on your keyboard.
-2. Search and select “Edit the system variables”.
-3. Press the “Environment Variables…” button in the bottom-right of the newly opened screen.
-4. On the top section ("User variables for \[user\]"), press the “New…” button.
-5. In the _Variable name_ field insert `TRILIUM_DATA_DIR`.
-6. Press the _Browse Directory…_ button and select the new directory where to store the database.
-7. Close all the windows by pressing the _OK_ button for each of them.
+ 1. Press the <span class="tn-icon bx bxl-windows"></span> key on your keyboard.
+ 2. Search and select _Edit the system variables_.
+ 3. Press the _Environment Variables…_ button in the bottom-right of the newly opened screen.
+ 4. On the top section (_User variables for \[user\]_), press the _New…_ button.
+ 5. In the _Variable name_ field insert `TRILIUM_DATA_DIR`.
+ 6. Press the _Browse Directory…_ button and select the new directory where to store the database.
+ 7. Close all the windows by pressing the _OK_ button for each of them.
-#### Linux
+=== "<span class="tn-icon bx bxl-tux"></span> Linux"
-```
-export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
-```
+ Trilium reads `TRILIUM_DATA_DIR` when it starts, so the variable must be set in the environment that launches it.
-#### Mac OS X
+ > [!NOTE]
+ > Setting the variable does not move existing notes. To keep them, close Trilium and copy the old data directory to the new location first. Trilium creates the last folder of the path if it is missing, but not its parent folders.
-You need to create a `.plist` file under `~/Library/LaunchAgents` to load it properly each login.
+ **Desktop application (.deb, .rpm, AppImage or .zip)**
-To load it manually, you need to use `launchctl setenv TRILIUM_DATA_DIR <yourpath>`
+ To use the new location however Trilium is started (from the application menu, a desktop shortcut, at login or from a terminal), set the variable for the whole session:
-Here is a pre-defined template, where you just need to add your path to:
-
-```
- Label
- set.trilium.env
- RunAtLoad
+ 1. Create the file `~/.config/environment.d/trilium.conf` with the following content, using the full path (`~` is not expanded in this file):
- ProgramArguments
-
- launchctl
- setenv
- TRILIUM_DATA_DIR
- /Users/YourUserName/Library/Application Support/trilium-data
-```
+ ```
+ TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
+ ```
+ 2. Log out and log back in.
+
+ This works on desktops started by `systemd`, which covers most distributions running GNOME or KDE Plasma. On other systems, add the following line to `~/.profile` instead, then log out and log back in:
+
+ ```sh
+ export TRILIUM_DATA_DIR="$HOME/data/my-trilium-data"
+ ```
+
+ The same line in `~/.bashrc` (or your shell's equivalent) only applies when Trilium is started from a terminal, not from the application menu.
+
+ **Flatpak (Flathub)**
+
+ The Flathub version runs in a sandbox that cannot see the rest of the file system, so it needs access to the folder as well as the variable:
+
+ ```sh
+ flatpak override --user \
+ --env=TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data \
+ --filesystem=/home/myuser/data/my-trilium-data:create \
+ org.triliumnotes.Trilium
+ ```
+
+ To return to the default location, run `flatpak override --user --reset org.triliumnotes.Trilium`. This also removes any other overrides set for Trilium.
+
+ **Server running as a systemd service**
+
+ Add an `Environment=` line to the `[Service]` section of the unit file described in <a class="reference-link" href="Server%20Installation/1.%20Installing%20the%20server/Packaged%20version%20for%20Linux.md">Packaged version for Linux</a>:
+
+ ```
+ [Service]
+ Environment=TRILIUM_DATA_DIR=/var/lib/trilium-data
+ ```
+
+ Then reload and restart the service:
+
+ ```sh
+ sudo systemctl daemon-reload
+ sudo systemctl restart trilium
+ ```
+
+ The user set in `User=` must be able to write to the folder. For Docker, see <a class="reference-link" href="Server%20Installation/1.%20Installing%20the%20server/Using%20Docker.md">Using Docker</a> instead.
+
+=== "<span class="tn-icon bx bxl-apple"></span> macOS"
+
+ You need to create a `.plist` file under `~/Library/LaunchAgents` to load it properly each login.
+
+ To load it manually, you need to use `launchctl setenv TRILIUM_DATA_DIR <yourpath>`
+
+ Here is a pre-defined template, where you just need to add your path to:
+
+ ```xml
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ <key>Label</key>
+ <string>set.trilium.env</string>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/bin/launchctl</string>
+ <string>setenv</string>
+ <string>TRILIUM_DATA_DIR</string>
+ <string>/Users/YourUserName/Library/Application Support/trilium-data</string>
+ </array>
+ </dict>
+ </plist>
+
+ ```
### Create a script to run with specific data directory
diff --git a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md
index c0d0712fdc..dfe0a23a5b 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md
@@ -1,5 +1,5 @@
# Mobile Frontend
-<figure class="image image_resized image-style-align-right" style="width:33.52%;"><img style="aspect-ratio:1242/2688;" src="Mobile Frontend_IMG_1765.PNG" width="1242" height="2688"></figure>
+<figure class="image image-style-align-right image_resized" style="width:33.52%;"><img style="aspect-ratio:1242/2688;" src="Mobile Frontend_IMG_1765.PNG" width="1242" height="2688"></figure>
Trilium has a mobile web frontend which is optimized for touch based devices - smartphones and tablets. It is activated automatically during login process based on browser detection.
@@ -12,13 +12,11 @@ Unlike the desktop version, the mobile version has a slightly different UI meant
Here is a non-exhaustive list of differences between the desktop version and the mobile one:
* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> is displayed as a sidebar. To display the sidebar, press the button in the top-left of the screen.
-
* There is also a swipe gesture that can be done from the left of the screen, but the browser's navigation gesture interferes with it most of the time (depending on the platform).
* Press and hold a note to display the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Note%20tree%20contextual%20menu.md">Note tree contextual menu</a>.
* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Quick%20search.md">Quick search</a> bar is also displayed at the top of the note tree.
* The full <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> function can be triggered either from either the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a> or from the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>, if configured.
* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a> is displayed at the bottom of the screen.
-
* The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.
* Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.
* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Tabs.md">Tabs</a> are grouped under a tab switcher in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>, where the tabs are displayed in a full-screen grid with preview for easy switching, as well as additional options such as reopening closed tabs.
@@ -29,44 +27,44 @@ Here is a non-exhaustive list of differences between the desktop version and the
The mobile view can be set up as a PWA. While this does not offer any offline capabilities, it will display the application in full-screen and makes it easy to access via your mobile phone's home screen.
-### On iOS with Safari
+=== "<span class="tn-icon bx bxl-apple"></span> iOS with Safari"
-1. Open your default web browser and access your Trilium instance.
-2. Login.
-3. Press the \[…\] button in the bottom-right of the screen and select Share.
-4. Scroll down to reveal the full list of items and choose “Add to Home Screen”.
-5. Press “Add” and the web app will be available.
+ 1. Open your default web browser and access your Trilium instance.
+ 2. Login.
+ 3. Press the \[…\] button in the bottom-right of the screen and select Share.
+ 4. Scroll down to reveal the full list of items and choose _Add to Home Screen_.
+ 5. Press _Add_ and the web app will be available.
-### On Android with Google Chrome
+=== "<span class="tn-icon bx bxl-chrome"></span> Android with Google Chrome"
-> [!IMPORTANT]
-> Google Chrome requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).
+ > [!IMPORTANT]
+ > Google Chrome requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).
-1. Open your default web browser and access your Trilium instance.
-2. Login.
-3. Press the three vertical dots icon in the top-right of the screen and select _Add to Home screen._
-4. Select the _Install_ option.
-5. Select an appropriate name.
-6. The web app will appear as an application, not on the home screen.
+ 1. Open your default web browser and access your Trilium instance.
+ 2. Login.
+ 3. Press the three vertical dots icon in the top-right of the screen and select _Add to Home screen._
+ 4. Select the _Install_ option.
+ 5. Select an appropriate name.
+ 6. The web app will appear as an application, not on the home screen.
-### On Android with Brave
+=== "Android with Brave"
-> [!IMPORTANT]
-> Brave requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).
+ > [!IMPORTANT]
+ > Brave requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).
-1. Open your default web browser and access your Trilium instance.
-2. Login.
-3. Press the three vertical dots icon in the bottom-right of the screen and select _Add to Home screen_.
-4. Press the _Install_ option.
-5. The web app will appear as an application, not on the home screen.
+ 1. Open your default web browser and access your Trilium instance.
+ 2. Login.
+ 3. Press the three vertical dots icon in the bottom-right of the screen and select _Add to Home screen_.
+ 4. Press the _Install_ option.
+ 5. The web app will appear as an application, not on the home screen.
-### On Samsung Browser
+=== "Samsung Browser"
-1. Open your default web browser and access your Trilium instance.
-2. Login.
-3. Press the hamburger menu in the bottom-right of the screen.
-4. Select _Add to_, followed by _Home screen_.
-5. Press _Add_ and the web app will appear on the home page.
+ 1. Open your default web browser and access your Trilium instance.
+ 2. Login.
+ 3. Press the hamburger menu in the bottom-right of the screen.
+ 4. Select _Add to_, followed by _Home screen_.
+ 5. Press _Add_ and the web app will appear on the home page.
## Testing via the desktop application
diff --git a/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md b/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md
index 61e0a78cff..8a771e6b54 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.md
@@ -50,53 +50,55 @@ Trilium requires a directory on the host system to store its data. This director
### Running the Docker Container
-#### Local Access Only
+=== "Local Access Only"
-Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a proxy server like Nginx or Apache.
+ Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a proxy server like Nginx or Apache.
-```
-sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]
-```
+ ```sh
+ sudo docker run -t -i -p 127.0.0.1:8080:8080 \
+ -v ~/trilium-data:/home/node/trilium-data
+ triliumnext/trilium:[VERSION]
+ ```
-1. Verify the container is running using `docker ps`.
-2. Access Trilium via a web browser at `127.0.0.1:8080`.
+ 1. Verify the container is running using `docker ps`.
+ 2. Access Trilium via a web browser at `127.0.0.1:8080`.
-#### Local Network Access
+=== "Local Network Access"
-To make the container accessible only on your local network, first create a new Docker network:
+ To make the container accessible only on your local network, first create a new Docker network:
-```
-docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet
-```
+ ```sh
+ docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet
+ ```
-Then, run the container with the network settings:
+ Then, run the container with the network settings:
-```
-docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest
-```
+ ```sh
+ docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest
+ ```
-To set a different user ID (UID) and group ID (GID) for the saved data, use the `USER_UID` and `USER_GID` environment variables:
+ To set a different user ID (UID) and group ID (GID) for the saved data, use the `USER_UID` and `USER_GID` environment variables:
-```
-docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest
-```
+ ```sh
+ docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:-latest
+ ```
-Find the local IP address using `docker inspect [container_name]` and access the service from devices on the local network.
+ Find the local IP address using `docker inspect [container_name]` and access the service from devices on the local network.
-```
-docker ps
-docker inspect [container_name]
-```
+ ```sh
+ docker ps
+ docker inspect [container_name]
+ ```
-#### Global Access
+=== "Global Access"
-To allow access from any IP address, run the container as follows:
+ To allow access from any IP address, run the container as follows:
-```
-docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]
-```
+ ```sh
+ docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]
+ ```
-Stop the container with `docker stop <CONTAINER ID>`, where the container ID is obtained from `docker ps`.
+ Stop the container with `docker stop <CONTAINER ID>`, where the container ID is obtained from `docker ps`.
### Custom Data Directory
diff --git a/docs/User Guide/User Guide/Installation & Setup/Web Clipper.md b/docs/User Guide/User Guide/Installation & Setup/Web Clipper.md
index b2c25ee65b..11c42b9b0b 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Web Clipper.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Web Clipper.md
@@ -62,28 +62,28 @@ Development versions are version pre-release versions, generally meant for testi
* [GitHub Releases](https://github.com/TriliumNext/Trilium/releases) by looking for releases starting with _Web Clipper._
* Artifacts in GitHub Actions, by looking for the [_Deploy web clipper extension_ workflow](https://github.com/TriliumNext/Trilium/actions/workflows/web-clipper.yml). Once a workflow run is selected, the ZIP files are available in the _Artifacts_ section, under the name `web-clipper-extension`.
-### For Chrome
-
-1. Download `trilium-web-clipper-[x.y.z]-chrome.zip`.
-2. Extract the archive.
-3. In Chrome, navigate to `chrome://extensions/`
-4. Toggle _Developer Mode_ in top-right of the page.
-5. Press the _Load unpacked_ button near the header.
-6. Point to the extracted directory from step (2).
-
-### For Firefox
-
-> [!WARNING]
-> Firefox prevents installation of unsigned packages in the “retail” version. To be able to install extensions from disk, consider using _Firefox Developer Edition_ or a non-branded version of Firefox (e.g. _GNU IceCat_).
->
-> One time, go to `about:config` and change `xpinstall.signatures.required` to `false`.
-
-1. Navigate to `about:addons`.
-2. Select _Extensions_ in the left-side navigation.
-3. Press the _Gear_ icon on the right of the _Manage Your Extensions_ title.
-4. Select _Install Add-on From File…_
-5. Point it to `trilium-web-clipper-[x.y.z]-firefox.zip`.
-6. Press the _Add_ button to confirm.
+=== "<span class="tn-icon bx bxl-chrome"></span> Chrome"
+
+ 1. Download `trilium-web-clipper-[x.y.z]-chrome.zip`.
+ 2. Extract the archive.
+ 3. In Chrome, navigate to `chrome://extensions/`
+ 4. Toggle _Developer Mode_ in top-right of the page.
+ 5. Press the _Load unpacked_ button near the header.
+ 6. Point to the extracted directory from step (2).
+
+=== "<span class="tn-icon bx bxl-firefox"></span> Firefox"
+
+ > [!WARNING]
+ > Firefox prevents installation of unsigned packages in the “retail” version. To be able to install extensions from disk, consider using _Firefox Developer Edition_ or a non-branded version of Firefox (e.g. _GNU IceCat_).
+ >
+ > One time, go to `about:config` and change `xpinstall.signatures.required` to `false`.
+
+ 1. Navigate to `about:addons`.
+ 2. Select _Extensions_ in the left-side navigation.
+ 3. Press the _Gear_ icon on the right of the _Manage Your Extensions_ title.
+ 4. Select _Install Add-on From File…_
+ 5. Point it to `trilium-web-clipper-[x.y.z]-firefox.zip`.
+ 6. Press the _Add_ button to confirm.
## Credits
diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md
index c892e33650..ab944a20da 100644
--- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md
+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md
@@ -3,52 +3,52 @@
This is an example of a note context-aware widget, which reacts to the currently opened note and refreshes automatically as the user navigates through the notes.
-## Legacy widget
-
In this example, the title of the note is displayed. It works best on the [horizontal layout](../../../Basic%20Concepts%20and%20Features/UI%20Elements/Vertical%20and%20horizontal%20layout.md).
-```javascript
-const TPL = `\
-<div style="
- display: flex;
- height: 53px;
- width: fit-content;
- font-size: 0.75em;
- contain: none;
- align-items: center;
- flex-shrink: 0;
- padding: 0 1em;
-"></div>`;
-
-class NoteTitleWidget extends api.NoteContextAwareWidget {
- doRender() {
- this.$widget = $(TPL);
+=== "<span class="tn-icon bx bxl-react"></span> Preact"
+
+ ```
+ import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact";
+
+ export default defineLauncherWidget({
+ render: () => {
+ const { note } = useActiveNoteContext();
+ return <div style={{
+ display: "flex",
+ height: "53px",
+ width: "fit-content",
+ fontSize: "0.75em",
+ alignItems: "center",
+ flexShrink: 0
+ }}>{note?.title}</div>;
+ }
+ });
+ ```
+
+=== "<span class="tn-icon bx bxl-javascript"></span> Legacy"
+
+ ```javascript
+ const TPL = `\
+ <div style="
+ display: flex;
+ height: 53px;
+ width: fit-content;
+ font-size: 0.75em;
+ contain: none;
+ align-items: center;
+ flex-shrink: 0;
+ padding: 0 1em;
+ "></div>`;
+
+ class NoteTitleWidget extends api.NoteContextAwareWidget {
+ doRender() {
+ this.$widget = $(TPL);
+ }
+
+ async refreshWithNote(note) {
+ this.$widget.text(note.title);
+ }
}
- async refreshWithNote(note) {
- this.$widget.text(note.title);
- }
-}
-
-module.exports = new NoteTitleWidget();
-```
-
-## Preact widget (v0.101.0+)
-
-```jsx
-import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact";
-
-export default defineLauncherWidget({
- render: () => {
- const { note } = useActiveNoteContext();
- return <div style={{
- display: "flex",
- height: "53px",
- width: "fit-content",
- fontSize: "0.75em",
- alignItems: "center",
- flexShrink: 0
- }}>{note?.title}</div>;
- }
-});
-```
\ No newline at end of file
+ module.exports = new NoteTitleWidget();
+ ```
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Theme development/Reference.md b/docs/User Guide/User Guide/Theme development/Reference.md
index 6b31a6133c..04c300107d 100644
--- a/docs/User Guide/User Guide/Theme development/Reference.md
+++ b/docs/User Guide/User Guide/Theme development/Reference.md
@@ -17,25 +17,17 @@ Do note that there is also a “tablet mode” in the mobile layout. For that pa
```css
@media (max-width: 991px) {
-
#launcher-pane {
-
/* Do something on mobile layout */
-
}
-
}
@media (min-width: 992px) {
-
#launcher-pane {
-
/* Do something on mobile tablet + desktop layout */
-
}
-
}
```
@@ -45,7 +37,7 @@ The user can select between vertical layout (the classical one, where the launch
Different styles can be applied by using classes at `body` level:
-```
+```css
body.layout-vertical #left-pane {
/* Do something */
}
@@ -59,19 +51,33 @@ The two different layouts use different containers (but they are present in the
## Detecting platform (Windows, macOS) or Electron
-It is possible to add particular styles that only apply to a given platform by using the classes in `body`:
+=== "<span class="tn-icon bx bxl-windows"></span> Windows"
-| Windows | macOS |
-| --- | --- |
-| `<br>body.platform-win32 {<br> background: red;<br>}<br>` | `<br>body.platform-darwin {<br> background: red;<br>}<br>` |
+ ```css
+ body.platform-win32 {
+ background: red;
+ }
+ ```
-It is also possible to only apply a style if running under Electron (desktop application):
+=== "<span class="tn-icon bx bxl-apple"></span> macOS"
-```
-body.electron {
- background: blue;
-}
-```
+ ```css
+ body.platform-darwin {
+ background: red;
+ }
+ ```
+
+=== "<span class="tn-icon bx bx-windows"></span> Electron (desktop app)"
+
+ To distinguish between a <a class="reference-link" href="../Installation%20%26%20Setup/Desktop%20Installation.md">Desktop Installation</a> and a <a class="reference-link" href="../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a>:
+
+ ```
+ body.electron {
+ background: blue;
+ }
+ ```
+
+ Can be chained with detections for <a class="reference-link" href="Reference.md">Reference</a> or <a class="reference-link" href="Reference.md">Reference</a> (e.g. `body.electron.platform-win32`).
### Native title bar
@@ -93,37 +99,37 @@ When running under Electron with native title bar off, a feature was introduced
See [Native title bar buttons by eliandoran · Pull Request #702 · TriliumNext/Notes](https://github.com/TriliumNext/Notes/pull/702) for the original implementation of this feature, including screenshots.
-#### On Windows
+=== "<span class="tn-icon bx bxl-windows"></span> Windows"
-The colors of the native window button area can be adjusted using a RGB hex color:
+ The colors of the native window button area can be adjusted using a RGB hex color:
-```
-body {
- --native-titlebar-foreground: #ffffff;
- --native-titlebar-background: #ff0000;
-}
-```
+ ```
+ body {
+ --native-titlebar-foreground: #ffffff;
+ --native-titlebar-background: #ff0000;
+ }
+ ```
-It is also possible to use transparency at the cost of reduced hover colors using a RGBA hex color:
+ It is also possible to use transparency at the cost of reduced hover colors using a RGBA hex color:
-```
-body {
- --native-titlebar-background: #ff0000aa;
-}
-```
+ ```
+ body {
+ --native-titlebar-background: #ff0000aa;
+ }
+ ```
-Note that the value is read when the window is initialized and then it is refreshed only when the user changes their light/dark mode preference.
+ Note that the value is read when the window is initialized and then it is refreshed only when the user changes their light/dark mode preference.
-#### On macOS
+=== "<span class="tn-icon bx bxl-apple"></span> macOS"
-On macOS the semaphore window buttons are enabled by default when the native title bar is disabled. The offset of the buttons can be adjusted using:
+ On macOS the semaphore window buttons are enabled by default when the native title bar is disabled. The offset of the buttons can be adjusted using:
-```css
-body {
- --native-titlebar-darwin-x-offset: 12;
- --native-titlebar-darwin-y-offset: 14 !important;
-}
-```
+ ```css
+ body {
+ --native-titlebar-darwin-x-offset: 12;
+ --native-titlebar-darwin-y-offset: 14 !important;
+ }
+ ```
### Background/transparency effects on Windows (Mica)