Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningTreeC committed Nov 1, 2024
1 parent bbcfba7 commit d652f17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions core/wiki/macros/sidebar-resizer.tid
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ title: $:/core/procedures/sidebar-resizer
\end

\function get.story-sidebar.padding()
[<get.theme.option sidebarposition>match[left]then<storyPaddingLeft>]
:else[<storyPaddingRight>]
[<get.theme.option sidebarposition>match[left]then<currentTiddler>subtract<storyPaddingLeft>]
:else[<currentTiddler>subtract<storyPaddingRight>]
\end

\procedure set-storywidth-storyright-actions()
Expand All @@ -140,7 +140,7 @@ title: $:/core/procedures/sidebar-resizer
storyPaddingLeft={{{ [convert.to.pixels.locally<storyPaddingLeftValue>] }}}
storyPaddingRightValue={{{ [<storyPaddingRightTiddler>!is[blank]is[tiddler]get[text]] :else[<storyPaddingRightTiddler>!is[blank]is[missing]then[0px]] :else[<get.theme.metric storypaddingright>] }}}
storyPaddingRight={{{ [convert.to.pixels.locally<storyPaddingRightValue>] }}}
sidebarMinWidth={{{ [convert.to.pixels.locally<sidebarMinWidthValue>subtract<get.story-sidebar.padding>] }}}
sidebarMinWidth={{{ [convert.to.pixels.locally<sidebarMinWidthValue>] :map[<get.story-sidebar.padding>] }}}
storyLeftValue={{{ [<storyLeftTiddler>!is[blank]get[text]] :else[<get.theme.metric storyleft>] }}}
storyLeft={{{ [convert.to.pixels.locally<storyLeftValue>] }}}
clampedDiff={{{ [<storyWidthStart>add<storyLeft>add<sidebarMinWidth>subtract<widgetNodeWidth>compare:number:gt[0]] ~0 }}}
Expand Down
16 changes: 9 additions & 7 deletions themes/tiddlywiki/vanilla/base.tid
Original file line number Diff line number Diff line change
Expand Up @@ -1025,14 +1025,14 @@ button.tc-btn-invisible.tc-remove-tag-button {
overflow-y: auto;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin: 0 0 0 -42px;
margin: 0 0 0 -<<get.theme.metric storypaddingright>>;
padding: 71px 0 28px 42px;
}

.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}} + <<get.theme.metric storypaddingleft>>));
margin: 0 0 0 0;
margin: 0 -<<get.theme.metric storypaddingleft>> 0 0;
}

html[dir="rtl"] .tc-sidebar-scrollable {
Expand All @@ -1054,13 +1054,16 @@ button.tc-btn-invisible.tc-remove-tag-button {
}

.tc-sidebar-left .tc-story-river {
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}),calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} + <<get.theme.metric storypaddingleft>>));
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},<<get.theme.metric storywidth>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <<get.theme.metric storypaddingleft>>));
display: flex;
align-items: flex-end;
flex-direction: column;
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} - <<get.theme.metric storypaddingleft>>),calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}));
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},<<get.theme.metric storywidth>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storypaddingleft>>));
right: max(0px,calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}));
}

html[dir="rtl"] .tc-sidebar-left .tc-story-river {
left: clamp(calc({{$:/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(calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}),calc(100% - <<get.theme.metric storywidth>> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}));
right: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
}

Expand Down Expand Up @@ -1190,9 +1193,7 @@ button.tc-btn-invisible.tc-remove-tag-button {
}

.tc-sidebar-left .tc-tiddler-frame {
left: auto;
width: clamp(0px,calc(<<get.theme.metric tiddlerwidth>>),100%);
right: 0;
}

<<if-no-sidebar "
Expand Down Expand Up @@ -1527,6 +1528,7 @@ html body.tc-body.tc-single-tiddler-window {
margin-right: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
margin-left: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},<<get.theme.metric sidebarwidth>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}));
left: auto;
width: auto;
right: 0;
padding-right: <<get.theme.metric storypaddingright>>;
padding-left: 0;
Expand Down

0 comments on commit d652f17

Please sign in to comment.