Skip to content

Build your personal knowledge base with Trilium Notes

feat(layout): respect content width for title

Elian Doran394f6c311067
diff --git a/apps/client/src/widgets/note_title.css b/apps/client/src/widgets/note_title.css
index 477d93209b..716ac27b09 100644
--- a/apps/client/src/widgets/note_title.css
+++ b/apps/client/src/widgets/note_title.css
@@ -28,3 +28,12 @@ body.mobile .note-title-widget input.note-title {
body.desktop .note-title-widget input.note-title {
font-size: 180%;
}
+
+body.experimental-feature-new-layout .title-row {
+ margin-top: 1em;
+ max-width: var(--max-content-width);
+}
+
+body.experimental-feature-new-layout.prefers-centered-content .title-row {
+ margin-inline: auto;
+}
diff --git a/apps/client/src/widgets/ribbon/RibbonDefinition.ts b/apps/client/src/widgets/ribbon/RibbonDefinition.ts
index 0eb63002a0..9976bde38b 100644
--- a/apps/client/src/widgets/ribbon/RibbonDefinition.ts
+++ b/apps/client/src/widgets/ribbon/RibbonDefinition.ts
@@ -16,6 +16,7 @@ import FormattingToolbar from "./FormattingToolbar";
import options from "../../services/options";
import { t } from "../../services/i18n";
import { TabConfiguration } from "./ribbon-interface";
+import { isExperimentalFeatureEnabled } from "../../services/experimental_features";
export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [
{
@@ -23,6 +24,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [
icon: "bx bx-text",
show: async ({ note, noteContext }) => note?.type === "text"
&& options.get("textNoteEditorType") === "ckeditor-classic"
+ && !isExperimentalFeatureEnabled("new-layout")
&& !(await noteContext?.isReadOnly()),
toggleCommand: "toggleRibbonTabClassicEditor",
content: FormattingToolbar,