mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 22:33:50 +00:00
update vanilla base
This commit is contained in:
parent
054d63034a
commit
48ed5dcc95
@ -34,6 +34,8 @@ title: $:/core/macros/sidebar-resizer
|
|||||||
|
|
||||||
\function get.theme.metric(metric) [{$:/theme}addsuffix[/]addsuffix<metric>get[text]] ~[[$:/themes/tiddlywiki/vanilla/]addsuffix<metric>get[text]]
|
\function get.theme.metric(metric) [{$:/theme}addsuffix[/]addsuffix<metric>get[text]] ~[[$:/themes/tiddlywiki/vanilla/]addsuffix<metric>get[text]]
|
||||||
|
|
||||||
|
\function set.theme.metric(metric) [{$:/theme}addsuffix[/]addsuffix<metric>is[shadow]] ~[{$:/theme}addsuffix[/]addsuffix<metric>is[shadow]!is[missing]] ~[[$:/themes/tiddlywiki/vanilla/]addsuffix<metric>]
|
||||||
|
|
||||||
\function get.value.metric(value) [<value>suffix[px]then[px]] ~[<value>suffix[%]then[%]] ~[<value>suffix[cm]then[cm]] ~[<value>suffix[mm]then[mm]] ~[<value>suffix[Q]then[Q]] ~[<value>suffix[in]then[in]] ~[<value>suffix[pc]then[pc]] ~[<value>suffix[pt]then[pt]] ~[<value>suffix[em]then[em]]
|
\function get.value.metric(value) [<value>suffix[px]then[px]] ~[<value>suffix[%]then[%]] ~[<value>suffix[cm]then[cm]] ~[<value>suffix[mm]then[mm]] ~[<value>suffix[Q]then[Q]] ~[<value>suffix[in]then[in]] ~[<value>suffix[pc]then[pc]] ~[<value>suffix[pt]then[pt]] ~[<value>suffix[em]then[em]]
|
||||||
|
|
||||||
\procedure sidebar-resizer-pointerdown-actions()
|
\procedure sidebar-resizer-pointerdown-actions()
|
||||||
@ -110,8 +112,8 @@ title: $:/core/macros/sidebar-resizer
|
|||||||
|
|
||||||
tiddlerWidthResult={{{ [<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:lt<storyMinWidth>then<get.theme.metric metrics/tiddlerwidth>compare:number:gteq[0]then<get.theme.metric metrics/tiddlerwidth>] ~[<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:gt<storyMaxWidth>then<get.theme.metric metrics/tiddlerwidth>] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:lt<tiddlerMinWidth>then<tiddlerMinWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:gteq<tiddlerMaxWidth>then<tiddlerMaxWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidth>compare:number:lt[0]then[0]addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthConverted>addsuffix<tiddlerWidthMetric>] }}}>
|
tiddlerWidthResult={{{ [<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:lt<storyMinWidth>then<get.theme.metric metrics/tiddlerwidth>compare:number:gteq[0]then<get.theme.metric metrics/tiddlerwidth>] ~[<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:gt<storyMaxWidth>then<get.theme.metric metrics/tiddlerwidth>] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:lt<tiddlerMinWidth>then<tiddlerMinWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:gteq<tiddlerMaxWidth>then<tiddlerMaxWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidth>compare:number:lt[0]then[0]addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthConverted>addsuffix<tiddlerWidthMetric>] }}}>
|
||||||
|
|
||||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth" text=<<tiddlerWidthResult>>/>
|
<$action-setfield $tiddler=<<set.theme.metric metrics/tiddlerwidth>> text=<<tiddlerWidthResult>>/>
|
||||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storywidth" text=<<storyWidthResult>>/>
|
<$action-setfield $tiddler=<<set.theme.metric metrics/storywidth>> text=<<storyWidthResult>>/>
|
||||||
|
|
||||||
</$let>
|
</$let>
|
||||||
|
|
||||||
@ -123,7 +125,7 @@ title: $:/core/macros/sidebar-resizer
|
|||||||
|
|
||||||
result={{{ [<storyRiverWidth>compare:number:lt<storyMinWidthAddLeft>then<storyMinWidthAddLeftConverted>addsuffix<storyRightMetric>] ~[<storyRiverWidth>compare:number:gteq<storyRiverLimit>then<storyRiverLimitConverted>addsuffix<storyRightMetric>] ~[<storyRiverWidthConverted>addsuffix<storyRightMetric>] }}}>
|
result={{{ [<storyRiverWidth>compare:number:lt<storyMinWidthAddLeft>then<storyMinWidthAddLeftConverted>addsuffix<storyRightMetric>] ~[<storyRiverWidth>compare:number:gteq<storyRiverLimit>then<storyRiverLimitConverted>addsuffix<storyRightMetric>] ~[<storyRiverWidthConverted>addsuffix<storyRightMetric>] }}}>
|
||||||
|
|
||||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storyright" text=<<result>>/>
|
<$action-setfield $tiddler=<<set.theme.metric metrics/storyright>> text=<<result>>/>
|
||||||
|
|
||||||
</$let>
|
</$let>
|
||||||
|
|
||||||
@ -145,7 +147,7 @@ title: $:/core/macros/sidebar-resizer
|
|||||||
sidebarMaxWidthConverted={{{ [function[convert.to.result],<sidebarMaxWidth>,<sidebarWidthMetric>] }}}
|
sidebarMaxWidthConverted={{{ [function[convert.to.result],<sidebarMaxWidth>,<sidebarWidthMetric>] }}}
|
||||||
sidebarMinWidthConverted={{{ [function[convert.to.result],<sidebarMinWidth>,<sidebarWidthMetric>] }}}>
|
sidebarMinWidthConverted={{{ [function[convert.to.result],<sidebarMinWidth>,<sidebarWidthMetric>] }}}>
|
||||||
|
|
||||||
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth" text={{{ [<sidebarWidth>compare:number:gteq<sidebarMaxWidth>then<sidebarMaxWidthConverted>addsuffix<sidebarWidthMetric>] ~[<sidebarWidth>compare:number:lt<sidebarMinWidth>then<sidebarMinWidthConverted>addsuffix<sidebarWidthMetric>] ~[<sidebarWidthConverted>addsuffix<sidebarWidthMetric>] }}}/>
|
<$action-setfield $tiddler=<<set.theme.metric metrics/sidebarwidth>> text={{{ [<sidebarWidth>compare:number:gteq<sidebarMaxWidth>then<sidebarMaxWidthConverted>addsuffix<sidebarWidthMetric>] ~[<sidebarWidth>compare:number:lt<sidebarMinWidth>then<sidebarMinWidthConverted>addsuffix<sidebarWidthMetric>] ~[<sidebarWidthConverted>addsuffix<sidebarWidthMetric>] }}}/>
|
||||||
</$vars>
|
</$vars>
|
||||||
</$let>
|
</$let>
|
||||||
\end
|
\end
|
||||||
|
@ -4,4 +4,4 @@ sidebarminwidth: 350px
|
|||||||
storyminwidth: 350px
|
storyminwidth: 350px
|
||||||
storypaddingleft: 42px
|
storypaddingleft: 42px
|
||||||
storypaddingright: 42px
|
storypaddingright: 42px
|
||||||
storywidth: 770px
|
storywidth: 770px
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
title: $:/themes/tiddlywiki/tight-heavier/metrics/
|
title: $:/themes/tiddlywiki/tight-heavier/metrics/
|
||||||
|
|
||||||
|
sidebarwidth: 350px
|
||||||
storypaddingleft: 0px
|
storypaddingleft: 0px
|
||||||
storypaddingright: 0px
|
storypaddingright: 0px
|
||||||
|
storyright: 770px
|
||||||
|
storywidth: 770px
|
||||||
|
tiddlerwidth: 770px
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
title: $:/themes/tiddlywiki/tight/metrics/
|
title: $:/themes/tiddlywiki/tight/metrics/
|
||||||
|
|
||||||
|
sidebarwidth: 350px
|
||||||
storypaddingleft: 0px
|
storypaddingleft: 0px
|
||||||
storypaddingright: 0px
|
storypaddingright: 0px
|
||||||
tiddlerwidth: 770px
|
storyright: 770px
|
||||||
|
storywidth: 770px
|
||||||
|
tiddlerwidth: 770px
|
||||||
|
@ -1029,7 +1029,7 @@ button.tc-btn-invisible.tc-remove-tag-button {
|
|||||||
.tc-sidebar-scrollable {
|
.tc-sidebar-scrollable {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};
|
top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};
|
||||||
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),{{$:/themes/tiddlywiki/vanilla/metrics/storyright}},calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
|
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),<<get.theme.metric metrics/storyright>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -1041,14 +1041,14 @@ button.tc-btn-invisible.tc-remove-tag-button {
|
|||||||
|
|
||||||
html[dir="rtl"] .tc-sidebar-scrollable {
|
html[dir="rtl"] .tc-sidebar-scrollable {
|
||||||
left: auto;
|
left: auto;
|
||||||
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),{{$:/themes/tiddlywiki/vanilla/metrics/storyright}},calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
|
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),<<get.theme.metric metrics/storyright>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
|
||||||
}
|
}
|
||||||
|
|
||||||
.tc-story-river {
|
.tc-story-river {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
|
left: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
|
||||||
top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};
|
top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};
|
||||||
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},{{$:/themes/tiddlywiki/vanilla/metrics/storywidth}},calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
|
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},<<get.theme.metric metrics/storywidth>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
|
||||||
padding: 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingright}} 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingleft}};
|
padding: 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingright}} 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingleft}};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1483,7 +1483,7 @@ html body.tc-body.tc-single-tiddler-window {
|
|||||||
width: auto;
|
width: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin-left: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
|
margin-left: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});
|
||||||
margin-right: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},{{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}},calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}));
|
margin-right: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},<<get.theme.metric metrics/sidebarwidth>>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}));
|
||||||
}
|
}
|
||||||
|
|
||||||
.tc-tiddler-frame {
|
.tc-tiddler-frame {
|
||||||
@ -1494,7 +1494,7 @@ html body.tc-body.tc-single-tiddler-window {
|
|||||||
left: auto;
|
left: auto;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},{{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}},(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}));
|
width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},<<get.theme.metric metrics/sidebarwidth>>,(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}));
|
||||||
}
|
}
|
||||||
|
|
||||||
body.tc-body .tc-page-container.tc-page-view-zoomin .tc-tiddler-frame {
|
body.tc-body .tc-page-container.tc-page-view-zoomin .tc-tiddler-frame {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user