mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-25 16:36:52 +00:00
98 lines
5.4 KiB
Plaintext
98 lines
5.4 KiB
Plaintext
title: $:/core/procedures/sliders
|
|
tags: $:/tags/Global
|
|
code-body: yes
|
|
|
|
\procedure editor-preview-slider(class:"",width:"100%",minHeight:"10px",template:"",mode:"block",sliderWidth:"12px",padding:"12px",sliderCondition:"yes",leftMinWidth:"0%",rightMinWidth:"0%")
|
|
\import $:/core/procedures/sidebar-resizer
|
|
\function get.resizer.style.position() absolute
|
|
\function get.template-right.width() [<sidebarWidthTiddler>get[text]] :else[[50%]]
|
|
\function get.resizer.style.left() [[calc(100% - ]addsuffix<get.template-right.width>addsuffix[ - ]addsuffix<get.resizer.style.width>addsuffix[)]]
|
|
\function get.resizer.style.width() [<sliderWidth>]
|
|
\function set.throttling() no
|
|
\function get.template.left()
|
|
\function get.preview.slider.class() [<class>]
|
|
\function get.left.minwidth() [<leftMinWidth>]
|
|
\function get.right.minwidth() [<rightMinWidth>]
|
|
\function get.story-padding.right() 0px
|
|
\function get.story-padding.left() 0px
|
|
\function get.story.left() 0
|
|
\whitespace trim
|
|
|
|
<$let
|
|
tv-set-storywidth-storyright="no"
|
|
tv-set-sidebarwidth="yes"
|
|
tv-set-centralised="no"
|
|
storyLeftTiddler={{{ [<storyLeftTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storyleft-]] }}}
|
|
storyRightTiddler={{{ [<storyRightTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storyright-]] }}}
|
|
sidebarWidthTiddler={{{ [<sidebarWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/rightwidth-]] }}}
|
|
tiddlerWidthTiddler={{{ [<tiddlerWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/tiddlerwidth-]] }}}
|
|
storyWidthTiddler={{{ [<storyWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storywidth-]] }}}
|
|
storyMinWidthTiddler={{{ [<storyMinWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storywidth-]] }}}
|
|
sidebarMinWidthTiddler={{{ [<sidebarMinWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storyminwidth-]] }}}
|
|
storyPaddingLeftTiddler={{{ [<storyPaddingLeftTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storypaddingleft-]] }}}
|
|
storyPaddingRightTiddler={{{ [<storyPaddingRightTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storypaddingright-]] }}}>
|
|
|
|
<$transclude
|
|
$variable="editor-resizer"
|
|
template=<<template>>
|
|
sliderCondition=<<sliderCondition>>
|
|
eventCatcherClass="tc-editor-preview-eventcatcher"
|
|
mode=<<mode>>
|
|
/>
|
|
|
|
</$let>
|
|
\end
|
|
|
|
\procedure two-cell-slider(width:"100%",minHeight:"10px",templateLeft:"",templateRight:"",mode:"block",sliderWidth:"12px",padding:"12px",sliderCondition:"yes",leftMinWidth:"100px",rightMinWidth:"100px")
|
|
\import $:/core/procedures/sidebar-resizer
|
|
\function get.resizer.style.position() absolute
|
|
\function get.template-right.width() [<sidebarWidthTiddler>get[text]] :else[[50%]]
|
|
\function get.resizer.style.left() [[calc(100% - ]addsuffix<get.template-right.width>addsuffix[)]]
|
|
\function get.resizer.style.width() [<sliderWidth>]
|
|
\function set.throttling() no
|
|
\function get.left.minwidth() [<leftMinWidth>]
|
|
\function get.right.minwidth() [<rightMinWidth>]
|
|
\whitespace trim
|
|
|
|
<div
|
|
style.width=<<width>>
|
|
style.min-height=<<minHeight>>
|
|
style.display="flex"
|
|
style.flex-direction="column"
|
|
style.padding-left=<<padding>>
|
|
style.padding-right=<<padding>>
|
|
style.padding-top=<<padding>>
|
|
style.padding-bottom=<<padding>>
|
|
>
|
|
|
|
<$let
|
|
tv-set-storywidth-storyright="no"
|
|
tv-set-sidebarwidth="yes"
|
|
tv-set-centralised="no"
|
|
storyLeftTiddler={{{ [<storyLeftTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storyleft-]] }}}
|
|
storyRightTiddler={{{ [<storyRightTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storyright-]] }}}
|
|
sidebarWidthTiddler={{{ [<sidebarWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/rightwidth-]] }}}
|
|
tiddlerWidthTiddler={{{ [<tiddlerWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/tiddlerwidth-]] }}}
|
|
storyWidthTiddler={{{ [<storyWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storywidth-]] }}}
|
|
storyMinWidthTiddler={{{ [<storyMinWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storywidth-]] }}}
|
|
sidebarMinWidthTiddler={{{ [<sidebarMinWidthTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storyminwidth-]] }}}
|
|
storyPaddingLeftTiddler={{{ [<storyPaddingLeftTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storypaddingleft-]] }}}
|
|
storyPaddingRightTiddler={{{ [<storyPaddingRightTiddler>!is[blank]] :else[<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[$:/state/resizer/storypaddingright-]] }}}>
|
|
|
|
<$transclude
|
|
$variable="sidebar-resizer"
|
|
templateLeft=<<templateLeft>>
|
|
templateRight=<<templateRight>>
|
|
sliderCondition=<<sliderCondition>>
|
|
mode=<<mode>>
|
|
/>
|
|
|
|
</$let>
|
|
|
|
</div>
|
|
\end
|
|
|
|
\procedure table-slider()
|
|
|
|
\end
|