diff --git a/public/editor/editor.ts b/public/editor/editor.ts index 7d2093d..336e047 100644 --- a/public/editor/editor.ts +++ b/public/editor/editor.ts @@ -218,9 +218,10 @@ function initEditor(root: Document | Element = document): void { scroller.style.overflowY = "auto"; } - const toolbar = createToolbar(view, fileInput); - - editorPane.insertBefore(toolbar, editorPane.firstChild); + if (textarea.dataset["noToolbar"] !== "1") { + const toolbar = createToolbar(view, fileInput); + editorPane.insertBefore(toolbar, editorPane.firstChild); + } editorPane.appendChild(fileInput); fileInput.addEventListener("change", () => { diff --git a/src/lib/i18n/en.ts b/src/lib/i18n/en.ts index afac3c4..ebe4928 100644 --- a/src/lib/i18n/en.ts +++ b/src/lib/i18n/en.ts @@ -75,14 +75,14 @@ export const en: Messages = { sidebarResetToDefault: "Reset to default", sidebarResetConfirm: "Reset the sidebar to the default auto-generated note list?", - sidebarHelpTitle: "Sidebar tips", - sidebarHelpMarkdown: - "Markdown is supported. Use [[wikilinks]] to link to notes in this wiki.", + sidebarHelpTitle: "Tips", + sidebarHelpMarkdown: "Markdown and [[wikilinks]] are supported.", sidebarHelpHeadings: - "All headings (#, ##, ###…) render the same small uppercase label — use them as section dividers, not hierarchy.", - sidebarHelpImages: - "Images render but are constrained to the column width — keep them small or skip them.", - sidebarHelpEmpty: "Leave empty (or use Reset) to show the auto note list.", + "All headings render as small uppercase section labels.", + sidebarHelpImages: "Images fit the column width; keep them small.", + sidebarHelpEmpty: "Empty shows the auto note list.", + sidebarDefaultPreviewTitle: "Default sidebar", + sidebarDefaultPreviewBody: "Auto list of every page in this wiki.", }, editor: { title: "Title", diff --git a/src/lib/i18n/fr.ts b/src/lib/i18n/fr.ts index 2cb5097..5b54da9 100644 --- a/src/lib/i18n/fr.ts +++ b/src/lib/i18n/fr.ts @@ -77,15 +77,14 @@ export const fr: PartialMessages = { sidebarResetToDefault: "Réinitialiser", sidebarResetConfirm: "Réinitialiser la barre latérale à la liste de notes par défaut ?", - sidebarHelpTitle: "Conseils pour la barre latérale", - sidebarHelpMarkdown: - "Markdown supporté. Utilisez [[liens wiki]] pour lier aux notes de ce wiki.", - sidebarHelpHeadings: - "Tous les titres (#, ##, ###…) ont le même rendu (petit, majuscules) — utilisez-les comme séparateurs de section, pas comme hiérarchie.", + sidebarHelpTitle: "Conseils", + sidebarHelpMarkdown: "Markdown et [[liens wiki]] sont supportés.", + sidebarHelpHeadings: "Tous les titres apparaissent en petites majuscules.", sidebarHelpImages: - "Les images s'affichent mais sont limitées à la largeur de la colonne — gardez-les petites ou évitez-les.", - sidebarHelpEmpty: - "Laissez vide (ou utilisez Réinitialiser) pour afficher la liste automatique.", + "Les images s'ajustent à la colonne ; gardez-les petites.", + sidebarHelpEmpty: "Vide affiche la liste automatique.", + sidebarDefaultPreviewTitle: "Barre par défaut", + sidebarDefaultPreviewBody: "Liste auto de toutes les pages du wiki.", }, editor: { title: "Titre", diff --git a/src/lib/i18n/index.ts b/src/lib/i18n/index.ts index eceb0de..10d4181 100644 --- a/src/lib/i18n/index.ts +++ b/src/lib/i18n/index.ts @@ -81,6 +81,8 @@ export interface Messages { sidebarHelpHeadings: string; sidebarHelpImages: string; sidebarHelpEmpty: string; + sidebarDefaultPreviewTitle: string; + sidebarDefaultPreviewBody: string; }; editor: { title: string; diff --git a/src/views/edit-sidebar.ts b/src/views/edit-sidebar.ts index e1016b7..eafaabf 100644 --- a/src/views/edit-sidebar.ts +++ b/src/views/edit-sidebar.ts @@ -3,8 +3,8 @@ import { t } from "../lib/i18n/index.ts"; import { noteUrl, sidebarEditUrl, wikiUrl } from "../lib/urls.ts"; import { type LayoutOptions, layout } from "./layout.ts"; import { - dangerSmallButtonClass, inputClass, + outlineSmallButtonClass, primaryButtonClass, THEME, } from "./theme/index.ts"; @@ -32,17 +32,17 @@ export function editSidebarPage( // scroller. The editor module looks for `textarea#content` and replaces it // with a CodeMirror + preview split-pane inside its parent. // Height budget: 100vh minus sticky nav (~3.5rem), main py-8 (4rem), - // back link + heading row + margins (~6rem), footer (~3rem). + // back link + heading + tips + action row + margins (~13rem), footer (~3rem). const scrollFixStyle = `