1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-25 08:26:52 +00:00
This commit is contained in:
BurningTreeC 2024-11-01 08:06:39 +01:00
parent e167eef53e
commit 843f04370b
3 changed files with 16 additions and 12 deletions

View File

@ -206,13 +206,13 @@ title: $:/core/procedures/sidebar-resizer
clampedDiff={{{ [<storyLeft>add<storyMinWidth>add<startSidebarWidth>subtract<widgetNodeWidth>compare:number:gt[0]] ~0 }}}
sliderWidth={{{ [convert.to.pixels.locally<get.resizer.style.width>] }}}
sidebarWidth={{{ [<sidebarWidth>subtract<clampedDiff>subtract<sliderWidth>] }}}>
<$let
sidebarWidthConverted={{{ [function[convert.to.result],<sidebarWidth>,<sidebarWidthMetric>] }}}
sidebarMaxWidthConverted={{{ [function[convert.to.result],<sidebarMaxWidth>,<sidebarWidthMetric>] }}}
sidebarMinWidthConverted={{{ [function[convert.to.result],<sidebarMinWidth>,<sidebarWidthMetric>] }}}
sidebarWidthSetTiddler={{{ [<sidebarWidthTiddler>!is[blank]] :else[<set.theme.metric sidebarwidth>] }}}>
<$action-setfield $tiddler=<<sidebarWidthSetTiddler>> text=<<get.sidebar-width.result>>/>
</$let>

View File

@ -1019,7 +1019,7 @@ button.tc-btn-invisible.tc-remove-tag-button {
.tc-sidebar-scrollable {
position: fixed;
top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),<<get.theme.metric storyright>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),calc(<<get.theme.metric storyright>> + <<get.theme.metric storypaddingright>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <<get.theme.metric storypaddingright>>));
bottom: 0;
right: 0;
overflow-y: auto;
@ -1031,7 +1031,7 @@ button.tc-btn-invisible.tc-remove-tag-button {
.tc-sidebar-left .tc-sidebar-scrollable {
left: 0;
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),<<get.theme.metric storyright>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),calc(<<get.theme.metric storyright>> + <<get.theme.metric storypaddingleft>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <<get.theme.metric storypaddingleft>>));
margin: 0 0 0 0;
}
@ -1046,14 +1046,14 @@ button.tc-btn-invisible.tc-remove-tag-button {
.tc-story-river {
left: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storypaddingright>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <<get.theme.metric storypaddingright>>));
top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},<<get.theme.metric storywidth>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},calc(<<get.theme.metric storywidth>> + <<get.theme.metric storypaddingright>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <<get.theme.metric storypaddingright>>));
padding: 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingright}} 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingleft}};
}
.tc-sidebar-left .tc-story-river {
left: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}));
left: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storypaddingleft>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} + <<get.theme.metric storypaddingleft>>));
right: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
}
@ -1178,10 +1178,14 @@ button.tc-btn-invisible.tc-remove-tag-button {
@media (min-width: <<sidebarbreakpoint>>) {
.tc-tiddler-frame {
padding: 28px 42px 42px 42px;
width: clamp(0px,<<get.theme.metric tiddlerwidth>>,100%);
width: clamp(0px,calc(<<get.theme.metric tiddlerwidth>> + <<get.theme.metric storypaddingright>>),100%);
border-radius: 2px;
}
.tc-sidebar-left .tc-tiddler-frame {
width: clamp(0px,calc(<<get.theme.metric tiddlerwidth>> + <<get.theme.metric storypaddingleft>>),100%);
}
.tc-sidebar-left .tc-tiddler-frame {
left: auto;
right: 0;

View File

@ -108,12 +108,12 @@ code-body: yes
<%if [<set.storywidth.storyright>match[yes]] %>
.tc-sidebar-resizer.tc-main-sidebar-resizer {
left: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)),clamp(calc(<<get.theme.metric storywidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)),max(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)),calc(<<get.theme.metric storyright>> - (2 * <<get.theme.metric storypaddingright>> / 3))),max(calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3) + (<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> - <<get.theme.metric storyright>>)),calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)))),calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)));
left: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3)),clamp(calc(<<get.theme.metric storywidth>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3)),max(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3)),calc(<<get.theme.metric storyright>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3))),max(calc(100% - <<get.theme.metric sidebarminwidth>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3) + (<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> - <<get.theme.metric storyright>>)),calc(100% - <<get.theme.metric sidebarminwidth>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3)))),calc(100% - <<get.theme.metric sidebarminwidth>> + <<get.theme.metric storypaddingright>> - (2 * <<get.theme.metric storypaddingright>> / 3)));
}
.tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer {
left: auto;
right: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)),clamp(calc(<<get.theme.metric storywidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)),max(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)),calc(<<get.theme.metric storyright>> - (2 * <<get.theme.metric storypaddingright>> / 3))),max(calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3) + (<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> - <<get.theme.metric storyright>>)),calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)))),calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)));
right: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3)),clamp(calc(<<get.theme.metric storywidth>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3)),max(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3)),calc(<<get.theme.metric storyright>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3))),max(calc(100% - <<get.theme.metric sidebarminwidth>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3) + (<<get.theme.metric storyleft>> + <<get.theme.metric storywidth>> - <<get.theme.metric storyright>>)),calc(100% - <<get.theme.metric sidebarminwidth>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3)))),calc(100% - <<get.theme.metric sidebarminwidth>> + <<get.theme.metric storypaddingleft>> - (2 * <<get.theme.metric storypaddingleft>> / 3)));
}
<% endif %>
@ -126,7 +126,7 @@ code-body: yes
.tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer {
left: auto;
right: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> + (<<get.theme.metric storypaddingright>> / 3)),calc(100% - <<get.theme.metric sidebarwidth>> + (<<get.theme.metric storypaddingright>> / 3)),calc(100% - <<get.theme.metric sidebarminwidth>> + (<<get.theme.metric storypaddingright>> / 3)));
right: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> + (<<get.theme.metric storypaddingleft>> / 3)),calc(100% - <<get.theme.metric sidebarwidth>> + (<<get.theme.metric storypaddingleft>> / 3)),calc(100% - <<get.theme.metric sidebarminwidth>> + (<<get.theme.metric storypaddingleft>> / 3)));
}
<% endif %>
@ -139,7 +139,7 @@ code-body: yes
.tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer {
left: auto;
right: min(calc(50% + (<<get.theme.metric storywidth>> / 2) - (2 * <<get.theme.metric storypaddingright>> / 3)),calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingright>> / 3)));
right: min(calc(50% + (<<get.theme.metric storywidth>> / 2) - (2 * <<get.theme.metric storypaddingleft>> / 3)),calc(100% - <<get.theme.metric sidebarminwidth>> - (2 * <<get.theme.metric storypaddingleft>> / 3)));
}
<% endif %>