From a94d49617219e88ea98630d9bda398cfce7fdfd4 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sat, 19 Oct 2024 09:36:52 +0200 Subject: [PATCH] make showing the sidebar resizer configurable and hide by default --- core/language/en-GB/ThemeTweaks.multids | 1 + core/ui/PageTemplate/sidebar-resizer.tid | 4 ++++ themes/tiddlywiki/vanilla/ThemeTweaks.tid | 1 + themes/tiddlywiki/vanilla/options.multids | 1 + 4 files changed, 7 insertions(+) diff --git a/core/language/en-GB/ThemeTweaks.multids b/core/language/en-GB/ThemeTweaks.multids index 9d023932e..7c7cd4bd4 100644 --- a/core/language/en-GB/ThemeTweaks.multids +++ b/core/language/en-GB/ThemeTweaks.multids @@ -21,6 +21,7 @@ Settings/BackgroundImageSize: Page background image size Settings/BackgroundImageSize/Auto: Auto Settings/BackgroundImageSize/Cover: Cover Settings/BackgroundImageSize/Contain: Contain +Settings/SidebarResizer: Sidebar resizer Metrics: Sizes Metrics/FontSize: Font size Metrics/LineHeight: Line height diff --git a/core/ui/PageTemplate/sidebar-resizer.tid b/core/ui/PageTemplate/sidebar-resizer.tid index efe0ac56d..6034826b4 100644 --- a/core/ui/PageTemplate/sidebar-resizer.tid +++ b/core/ui/PageTemplate/sidebar-resizer.tid @@ -5,6 +5,8 @@ list-after: $:/core/ui/PageTemplate/story \import $:/core/macros/sidebar-resizer \whitespace trim +<%if [{$:/themes/tiddlywiki/vanilla/options/sidebarresizer}match[show]] %> + <$eventcatcher tag="div" class="tc-sidebar-resizer-pointerdown-eventcatcher" selector=".tc-sidebar-resizer" matchSelector=".tc-sidebar-resizer" $pointerdown=<> $pointerup=<>> <%if [{$:/state/sidebar}!match[no]] %> @@ -24,3 +26,5 @@ list-after: $:/core/ui/PageTemplate/story <% endif %> + +<% endif %> diff --git a/themes/tiddlywiki/vanilla/ThemeTweaks.tid b/themes/tiddlywiki/vanilla/ThemeTweaks.tid index 22a99f0f0..27d3d6537 100644 --- a/themes/tiddlywiki/vanilla/ThemeTweaks.tid +++ b/themes/tiddlywiki/vanilla/ThemeTweaks.tid @@ -54,6 +54,7 @@ caption: {{$:/language/ThemeTweaks/ThemeTweaks}} |<$link to="$:/themes/tiddlywiki/vanilla/options/sidebarlayout"><> |<$select tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout"> | |<$link to="$:/themes/tiddlywiki/vanilla/options/stickytitles"><>
//<>// |<$select tiddler="$:/themes/tiddlywiki/vanilla/options/stickytitles"> | |<$link to="$:/themes/tiddlywiki/vanilla/options/codewrapping"><> |<$select tiddler="$:/themes/tiddlywiki/vanilla/options/codewrapping"> | +|<$link to="$:/themes/tiddlywiki/vanilla/options/sidebarresizer"><> |<$select tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarresizer"> | ! <> diff --git a/themes/tiddlywiki/vanilla/options.multids b/themes/tiddlywiki/vanilla/options.multids index c0b49d961..361546a81 100644 --- a/themes/tiddlywiki/vanilla/options.multids +++ b/themes/tiddlywiki/vanilla/options.multids @@ -2,4 +2,5 @@ title: $:/themes/tiddlywiki/vanilla/options/ stickytitles: no sidebarlayout: fixed-fluid +sidebarresizer: hide codewrapping: pre-wrap