mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-23 15:36:52 +00:00
fix preview icon and preview slider
This commit is contained in:
parent
0c0897f67a
commit
545e2aa5cd
@ -1,18 +1,18 @@
|
||||
title: $:/core/ui/EditTemplate/body/default
|
||||
|
||||
\function get.edit-preview-state()
|
||||
\function edit-preview-state()
|
||||
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualified-preview-state>] +[get[text]] :else[[no]]
|
||||
\end
|
||||
|
||||
\function get.tc-edit-texteditor.class() tc-edit-texteditor tc-edit-texteditor-body [<get.edit-preview-state>match[yes]then<identifier>addprefix[tc-edit-texteditor-identified-]] +[join[ ]]
|
||||
\function get.tc-edit-texteditor.class() tc-edit-texteditor tc-edit-texteditor-body [<edit-preview-state>match[yes]then<identifier>addprefix[tc-edit-texteditor-identified-]] +[join[ ]]
|
||||
|
||||
\function get.tc-tiddler-preview-preview.class() tc-tiddler-preview-preview [<identifier>addprefix[tc-tiddler-preview-preview-identified-]] +[join[ ]]
|
||||
|
||||
\function get.slider.condition() [<get.edit-preview-state>match[yes]] :else[[no]]
|
||||
\function get.slider.condition() [<edit-preview-state>match[yes]] :else[[no]]
|
||||
|
||||
\function resizer.state.tiddler() [[$:/state/resizing/editor-preview-]addsuffix<identifier>]
|
||||
|
||||
\function resizer.class() [[tc-editor-preview-slider-identified-]addsuffix<identifier>]
|
||||
\function resizer.class() [[tc-editor-preview-slider-]addsuffix<identifier>]
|
||||
|
||||
\define config-visibility-title()
|
||||
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
@ -24,7 +24,7 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
||||
|
||||
\procedure tp-tiddler-editor-preview()
|
||||
<div
|
||||
class={{{ [<get.edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [<get.edit-preview-state>match[yes]then[tc-tiddler-preview-identified-]addsuffix<identifier>] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
||||
class={{{ [<edit-preview-state>match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [<edit-preview-state>match[yes]then[tc-tiddler-preview-identified-]addsuffix<identifier>] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||
|
||||
|
@ -358,7 +358,7 @@ title: $:/core/procedures/sidebar-resizer
|
||||
|
||||
\function get.resizer.class() tc-sidebar-resizer [<get.resizer.state>is[tiddler]then[tc-resizer-active]] [<resizer.class>] [<resizer.class>is[blank]then<qualify>addsuffix<currentTiddler>sha256[]addprefix[tc-sidebar-resizer-identified-]] +[join[ ]]
|
||||
|
||||
\function get.active.class(class) [<class>] [<resizer.class>] [<eventCatcherClass>] [<get.resizer.state>is[tiddler]then[tc-resizer-active]] +[join[ ]]
|
||||
\function get.active.class(class) [<class>] [<eventCatcherClass>] [<get.resizer.state>is[tiddler]then[tc-resizer-active]] +[join[ ]]
|
||||
|
||||
\function get.sidebar-resizer.pointerdown.actions()
|
||||
[<get.resizer.state>match[$:/state/sidebar/resizing]then<sidebar-resizer-pointerdown-actions>]
|
||||
|
@ -176,7 +176,7 @@ code-body: yes
|
||||
min-width: 0px;
|
||||
}
|
||||
|
||||
div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
|
||||
div[class*="tc-editor-preview-slider-"] {
|
||||
position: absolute;
|
||||
left: calc(50% - <<get.theme.metric previewsliderwidth>>);
|
||||
width: <<get.theme.metric previewsliderwidth>>;
|
||||
@ -184,11 +184,11 @@ div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
|
||||
|
||||
@media (pointer: coarse) {
|
||||
|
||||
div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
|
||||
div[class*="tc-editor-preview-slider-"] {
|
||||
background-color: <<colour muted-foreground>>;
|
||||
}
|
||||
|
||||
div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer):hover {
|
||||
div[class*="tc-editor-preview-slider-"]:hover {
|
||||
opacity: <<get.theme.metric slideropacityhover>>;
|
||||
}
|
||||
|
||||
@ -204,13 +204,13 @@ div[class*="tc-sidebar-resizer-identified-"]:not(.tc-main-sidebar-resizer) {
|
||||
grid-template-columns: calc(100% - <<width>>) <<width>>;
|
||||
}
|
||||
|
||||
div.tc-sidebar-resizer.tc-editor-preview-slider-identified-<<identifier>> {
|
||||
div.tc-sidebar-resizer.tc-editor-preview-slider-<<identifier>> {
|
||||
left: calc(100% - <<width>> - <<get.theme.metric previewsliderwidth>>);
|
||||
}
|
||||
|
||||
<%if [[$:/state/resizing/editor-preview-]addsuffix<identifier>is[tiddler]] %>
|
||||
|
||||
div.tc-sidebar-resizer.tc-sidebar-resizer-identified-<<identifier>> {
|
||||
div.tc-sidebar-resizer.tc-editor-preview-slider-<<identifier>> {
|
||||
opacity: min(calc(3 * <<get.theme.metric slideropacity>>),1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user