From 2e68b6f1a165805342cdee5f0e1299838e96d99e Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Thu, 14 Nov 2024 04:48:52 +0100 Subject: [PATCH] rename tc-sidebar-resizer to tc-slider --- core/ui/PageTemplate/sidebar-resizer.tid | 2 +- core/wiki/macros/sidebar-resizer.tid | 44 ++++++++-------- themes/tiddlywiki/vanilla/sidebar-resizer.tid | 52 +++++++++---------- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/core/ui/PageTemplate/sidebar-resizer.tid b/core/ui/PageTemplate/sidebar-resizer.tid index 41a5f265e..458af4170 100644 --- a/core/ui/PageTemplate/sidebar-resizer.tid +++ b/core/ui/PageTemplate/sidebar-resizer.tid @@ -7,7 +7,7 @@ code-body: yes \function resizer.state.tiddler() $:/state/sidebar/resizing \function resizer.state() [{$:/state/sidebar}] -\function resizer.class() tc-main-sidebar-resizer +\function resizer.class() tc-main-slider \function set.throttling() yes \function drag.direction.reverse() [match[left]then[yes]] :else[[no]] \whitespace trim diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 73f2f0109..e40e1931e 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -356,9 +356,9 @@ title: $:/core/procedures/sidebar-resizer <% endif %> \end -\function get.resizer.class() tc-sidebar-resizer [is[tiddler]then[tc-resizer-active]] [] [is[blank]thenaddsuffixsha256[]addprefix[tc-sidebar-resizer-identified-]] +[join[ ]] +\function get.resizer.class() tc-slider [is[tiddler]then[tc-resizer-active]] [] [is[blank]thenaddsuffixsha256[]addprefix[tc-slider-identified-]] +[join[ ]] -\function get.active.class(class) [] [match[tc-main-sidebar-resizer]] [] [is[tiddler]then[tc-resizer-active]] +[join[ ]] +\function get.active.class(class) [] [match[tc-main-slider]] [] [is[tiddler]then[tc-resizer-active]] +[join[ ]] \function get.sidebar-resizer.pointerdown.actions() [match[$:/state/sidebar/resizing]then] @@ -377,9 +377,9 @@ title: $:/core/procedures/sidebar-resizer <$eventcatcher tag="div" - class=<> - selector=".tc-sidebar-resizer" - matchSelector=".tc-sidebar-resizer" + class=<> + selector=".tc-slider" + matchSelector=".tc-slider" $pointerdown=<> $pointerup=<>> @@ -387,16 +387,16 @@ title: $:/core/procedures/sidebar-resizer <$eventcatcher tag="div" - class=<> - selector=".tc-sidebar-resizer" - matchSelector=".tc-sidebar-resizer" + class=<> + selector=".tc-slider" + matchSelector=".tc-slider" $pointerup={{{ [is[tiddler]then] }}}> <$eventcatcher tag="div" - selector=".tc-sidebar-resizer-pointermove" - matchSelector=".tc-sidebar-resizer-pointermove" - class=<> + selector=".tc-slider-pointermove" + matchSelector=".tc-slider-pointermove" + class=<> $pointerup=<> $pointerleave=<> $pointerout=<> @@ -406,7 +406,7 @@ title: $:/core/procedures/sidebar-resizer $pointermove=<> $contextmenu=<>> -
>/> +
>/> @@ -486,9 +486,9 @@ title: $:/core/procedures/sidebar-resizer <$eventcatcher tag="div" - class=<> - selector=".tc-sidebar-resizer" - matchSelector=".tc-sidebar-resizer" + class=<> + selector=".tc-slider" + matchSelector=".tc-slider" $pointerdown=<> $pointerup=<>> @@ -496,16 +496,16 @@ title: $:/core/procedures/sidebar-resizer <$eventcatcher tag="div" - class=<> - selector=".tc-sidebar-resizer" - matchSelector=".tc-sidebar-resizer" + class=<> + selector=".tc-slider" + matchSelector=".tc-slider" $pointerup={{{ [is[tiddler]then] }}}> <$eventcatcher tag="div" - selector=".tc-sidebar-resizer-pointermove" - matchSelector=".tc-sidebar-resizer-pointermove" - class=<> + selector=".tc-slider-pointermove" + matchSelector=".tc-slider-pointermove" + class=<> $pointerup=<> $pointerleave=<> $pointerout=<> @@ -515,7 +515,7 @@ title: $:/core/procedures/sidebar-resizer $pointermove=<> $contextmenu=<>> -
>/> +
>/> diff --git a/themes/tiddlywiki/vanilla/sidebar-resizer.tid b/themes/tiddlywiki/vanilla/sidebar-resizer.tid index 19edfa0a8..e1480ef38 100644 --- a/themes/tiddlywiki/vanilla/sidebar-resizer.tid +++ b/themes/tiddlywiki/vanilla/sidebar-resizer.tid @@ -6,7 +6,7 @@ code-body: yes \rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock conditional html -.tc-sidebar-resizer { +.tc-slider { position: fixed; top: 0; height: 100%; @@ -16,22 +16,22 @@ code-body: yes background: linear-gradient(<>, <>) no-repeat center/2px 100%; } -.tc-sidebar-resizer:hover { +.tc-slider:hover { opacity: <>; } -.tc-sidebar-resizer-pointerdown-eventcatcher, .tc-sidebar-resizer-pointermove-eventcatcher-wrapper { +.tc-slider-pointerdown-eventcatcher, .tc-slider-pointermove-eventcatcher-wrapper { height: 100%; } -.tc-edit-texteditor-slider > .tc-sidebar-resizer-pointerdown-eventcatcher.tc-editor-preview-eventcatcher { +.tc-edit-texteditor-slider > .tc-slider-pointerdown-eventcatcher.tc-editor-preview-eventcatcher { position: absolute; width: 100%; top: 0; left: 0; } -.tc-sidebar-resizer-pointermove-eventcatcher, .tc-sidebar-resizer-pointermove { +.tc-slider-pointermove-eventcatcher, .tc-slider-pointermove { position: absolute; top: 0; left: 0; @@ -42,39 +42,39 @@ code-body: yes z-index: -1; } -.tc-sidebar-resizer-pointerdown-eventcatcher:not(.tc-main-sidebar-resizer), .tc-sidebar-resizer-pointermove-eventcatcher:not(.tc-main-sidebar-resizer), .tc-sidebar-resizer-pointermove-eventcatcher-wrapper:not(.tc-main-sidebar-resizer) { +.tc-slider-pointerdown-eventcatcher:not(.tc-main-slider), .tc-slider-pointermove-eventcatcher:not(.tc-main-slider), .tc-slider-pointermove-eventcatcher-wrapper:not(.tc-main-slider) { display: flex; flex-direction: column; flex-grow: 1; } -.tc-sidebar-resizer-pointermove-eventcatcher-wrapper:not(.tc-main-sidebar-resizer) { +.tc-slider-pointermove-eventcatcher-wrapper:not(.tc-main-slider) { flex-direction: row; } -.tc-sidebar-resizer-pointerdown-eventcatcher:not(.tc-main-sidebar-resizer), .tc-sidebar-resizer-pointermove-eventcatcher-wrapper:not(.tc-main-sidebar-resizer) { +.tc-slider-pointerdown-eventcatcher:not(.tc-main-slider), .tc-slider-pointermove-eventcatcher-wrapper:not(.tc-main-slider) { position: relative; } -.tc-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher, .tc-sidebar-resizer-pointermove { +.tc-slider, .tc-slider-pointermove-eventcatcher, .tc-slider-pointermove { touch-action: none; user-select: none; } -.tc-sidebar-resizer-pointermove-eventcatcher-wrapper.tc-resizer-active { +.tc-slider-pointermove-eventcatcher-wrapper.tc-resizer-active { z-index: 801; } -.tc-sidebar-resizer-pointermove-eventcatcher.tc-resizer-active { +.tc-slider-pointermove-eventcatcher.tc-resizer-active { z-index: 802; } -.tc-sidebar-resizer-pointermove.tc-resizer-active { +.tc-slider-pointermove.tc-resizer-active { z-index: 803; cursor: ew-resize; } -.tc-sidebar-resizer.tc-resizer-active { +.tc-slider.tc-resizer-active { opacity: <>; } @@ -84,11 +84,11 @@ code-body: yes @media (pointer: coarse) { - .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider.tc-main-slider { background: <>; } - .tc-sidebar-resizer.tc-main-sidebar-resizer:hover { + .tc-slider.tc-main-slider:hover { opacity: <>; } } @@ -97,7 +97,7 @@ code-body: yes @media (pointer: coarse) { - .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider.tc-main-slider { opacity: min(calc(3 * <>),1); } } @@ -106,11 +106,11 @@ code-body: yes <%if [match[yes]] %> - .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider.tc-main-slider { left: clamp(calc(<> + <> + <> + <> - (2 * <> / 3)),calc(<> + <> - (2 * <> / 3)),calc(100% - <> + <> + <> - (2 * <> / 3))); } - .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-sidebar-left .tc-slider.tc-main-slider { left: auto; right: clamp(calc(<> + <> + <> + <> - (2 * <> / 3)),calc(<> + <> - (2 * <> / 3)),calc(100% - <> + <> + <> - (2 * <> / 3))); } @@ -119,11 +119,11 @@ code-body: yes <%if [match[yes]] %> - .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider.tc-main-slider { left: min(clamp(calc(<> + <> + <> + <> - <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))),calc(100% - <> + (<> / 3))); } - .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-sidebar-left .tc-slider.tc-main-slider { left: auto; right: min(clamp(calc(<> + <> + <> + <> - <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))),calc(100% - <> + (<> / 3))); } @@ -132,11 +132,11 @@ code-body: yes <%if [match[yes]] %> - .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider.tc-main-slider { left: min(calc(50% + (<> / 2) - (2 * <> / 3)),calc(100% - <> - (2 * <> / 3))); } - .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-sidebar-left .tc-slider.tc-main-slider { left: auto; z-index: 1; right: min(calc(50% + (<> / 2) - (2 * <> / 3)),calc(100% - <> - (2 * <> / 3))); @@ -146,7 +146,7 @@ code-body: yes <%if [{$:/state/sidebar}match[no]] %> - .tc-sidebar-resizer-pointerdown-eventcatcher.tc-main-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher-wrapper.tc-main-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher.tc-main-sidebar-resizer, .tc-sidebar-resizer-pointermove.tc-main-sidebar-resizer, .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider-pointerdown-eventcatcher.tc-main-slider, .tc-slider-pointermove-eventcatcher-wrapper.tc-main-slider, .tc-slider-pointermove-eventcatcher.tc-main-slider, .tc-slider-pointermove.tc-main-slider, .tc-slider.tc-main-slider { display: none; } @@ -156,7 +156,7 @@ code-body: yes @media (max-width: <>) { - .tc-sidebar-resizer-pointerdown-eventcatcher.tc-main-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher-wrapper.tc-main-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher.tc-main-sidebar-resizer, .tc-sidebar-resizer-pointermove.tc-main-sidebar-resizer, .tc-sidebar-resizer.tc-main-sidebar-resizer { + .tc-slider-pointerdown-eventcatcher.tc-main-slider, .tc-slider-pointermove-eventcatcher-wrapper.tc-main-slider, .tc-slider-pointermove-eventcatcher.tc-main-slider, .tc-slider-pointermove.tc-main-slider, .tc-slider.tc-main-slider { display: none; } } @@ -204,13 +204,13 @@ div[class*="tc-editor-preview-slider-"] { grid-template-columns: calc(100% - <>) <>; } - div.tc-sidebar-resizer.tc-editor-preview-slider-<> { + div.tc-slider.tc-editor-preview-slider-<> { left: calc(100% - <> - <>); } <%if [[$:/state/resizing/editor-preview-]addsuffixis[tiddler]] %> - div.tc-sidebar-resizer.tc-editor-preview-slider-<> { + div.tc-slider.tc-editor-preview-slider-<> { opacity: min(calc(3 * <>),1); }