mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-10 17:30:26 +00:00
wip make it universally usable
This commit is contained in:
parent
338a3d1646
commit
f63b1ed6a1
@ -60,11 +60,11 @@ title: $:/core/procedures/sidebar-resizer
|
|||||||
\procedure sidebar-resizer-pointerdown-actions-inner()
|
\procedure sidebar-resizer-pointerdown-actions-inner()
|
||||||
<%if [<get.resizer.state>is[missing]then<event-mousebutton>match[left]] %>
|
<%if [<get.resizer.state>is[missing]then<event-mousebutton>match[left]] %>
|
||||||
<$let
|
<$let
|
||||||
startStoryLeft={{{ [<storyLeftTiddler>!is[blank]get[text]] :else[get.theme.metric[storyleft]] }}}
|
startStoryLeft={{{ [<storyLeftTiddler>!is[blank]!is[missing]get[text]] :else[<storyLeftTiddler>!is[blank]is[missing]then[0px]] :else[get.theme.metric[storyleft]] }}}
|
||||||
startStoryRight={{{ [<storyRightTiddler>!is[blank]get[text]] :else[get.theme.metric[storyright]] }}}
|
startStoryRight={{{ [<storyRightTiddler>!is[blank]!is[missing]get[text]] :else[<storyRightTiddler>!is[blank]is[missing]then[0px]] :else[get.theme.metric[storyright]] }}}
|
||||||
startSidebarWidth={{{ [<sidebarWidthTiddler>!is[blank]get[text]] :else[get.theme.metric[sidebarwidth]] }}}
|
startSidebarWidth={{{ [<sidebarWidthTiddler>!is[blank]!is[missing]get[text]] :else[<sidebarWidthTiddler>!is[blank]is[missing]then[0px]] :else[get.theme.metric[sidebarwidth]] }}}
|
||||||
startTiddlerWidth={{{ [<tiddlerWidthTiddler>!is[blank]get[text]] :else[get.theme.metric[tiddlerwidth]] }}}
|
startTiddlerWidth={{{ [<tiddlerWidthTiddler>!is[blank]!is[missing]get[text]] :else[<tiddlerWidthTiddler>!is[blank]is[missing]then[0px]] :else[get.theme.metric[tiddlerwidth]] }}}
|
||||||
startStoryWidth={{{ [<storyWidthTiddler>!is[blank]get[text]] :else[get.theme.metric[storywidth]] }}}>
|
startStoryWidth={{{ [<storyWidthTiddler>!is[blank]!is[missing]get[text]] :else[<storyWidthTiddler>!is[blank]is[missing]then[0px]] :else[get.theme.metric[storywidth]] }}}>
|
||||||
<$action-setfield $tiddler=<<get.resizer.state>>
|
<$action-setfield $tiddler=<<get.resizer.state>>
|
||||||
text="yes"
|
text="yes"
|
||||||
widget-node-width=<<tv-widgetnode-width>>
|
widget-node-width=<<tv-widgetnode-width>>
|
||||||
@ -287,9 +287,9 @@ title: $:/core/procedures/sidebar-resizer
|
|||||||
<% endif %>
|
<% endif %>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\function get.sidebar-resizer.class() tc-sidebar-resizer [<get.resizer.state>!is[missing]then[tc-resizer-active]] [resizer.class[]] [<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[tc-sidebar-resizer-]] +[join[ ]]
|
\function get.sidebar-resizer.class() tc-sidebar-resizer [<get.resizer.state>!is[missing]then[tc-resizer-active]] [<resizer.class>] [<qualify>addsuffix[-]addsuffix<currentTiddler>sha256[]addprefix[tc-sidebar-resizer-]] +[join[ ]]
|
||||||
|
|
||||||
\function get.active.class(class) [<class>] [<get.resizer.state>!is[missing]then[tc-resizer-active]] +[join[ ]]
|
\function get.active.class(class) [<class>] [<resizer.class>] [<get.resizer.state>!is[missing]then[tc-resizer-active]] +[join[ ]]
|
||||||
|
|
||||||
\function get.sidebar-resizer.pointerdown.actions()
|
\function get.sidebar-resizer.pointerdown.actions()
|
||||||
[<get.resizer.state>match[$:/state/sidebar/resizing]then<sidebar-resizer-pointerdown-actions>]
|
[<get.resizer.state>match[$:/state/sidebar/resizing]then<sidebar-resizer-pointerdown-actions>]
|
||||||
@ -334,8 +334,18 @@ title: $:/core/procedures/sidebar-resizer
|
|||||||
|
|
||||||
<%if [<templateLeft>!is[blank]] %>
|
<%if [<templateLeft>!is[blank]] %>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style.display="flex"
|
||||||
|
style.position="relative"
|
||||||
|
style.flex-direction="column"
|
||||||
|
style.top="0"
|
||||||
|
style.left="0"
|
||||||
|
style.width=<<get.style.left>>>
|
||||||
|
|
||||||
<$transclude $tiddler=<<templateLeft>> mode="block"/>
|
<$transclude $tiddler=<<templateLeft>> mode="block"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<% endif %>
|
<% endif %>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@ -345,8 +355,18 @@ title: $:/core/procedures/sidebar-resizer
|
|||||||
|
|
||||||
<%if [<templateRight>!is[blank]] %>
|
<%if [<templateRight>!is[blank]] %>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style.display="flex"
|
||||||
|
style.position="relative"
|
||||||
|
style.flex-direction="column"
|
||||||
|
style.top="0"
|
||||||
|
style.left=<<get.style.left>>
|
||||||
|
style.width=<<sidebar.width>>>
|
||||||
|
|
||||||
<$transclude $tiddler=<<templateRight>> mode="block"/>
|
<$transclude $tiddler=<<templateRight>> mode="block"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<% endif %>
|
<% endif %>
|
||||||
|
|
||||||
</$eventcatcher>
|
</$eventcatcher>
|
||||||
|
@ -51,6 +51,16 @@ code-body: yes
|
|||||||
z-index: -1;
|
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) {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tc-sidebar-resizer-pointerdown-eventcatcher:not(.tc-main-sidebar-resizer), .tc-sidebar-resizer-pointermove-eventcatcher-wrapper:not(.tc-main-sidebar-resizer) {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.tc-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher, .tc-sidebar-resizer-pointermove {
|
.tc-sidebar-resizer, .tc-sidebar-resizer-pointermove-eventcatcher, .tc-sidebar-resizer-pointermove {
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
Loading…
Reference in New Issue
Block a user