mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-12 02:10:27 +00:00
Add banner for unfolding tiddlers
This commit is contained in:
parent
6309d41b42
commit
b641cb402d
9
core/ui/ViewTemplate/unfold.tid
Normal file
9
core/ui/ViewTemplate/unfold.tid
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
title: $:/core/ui/ViewTemplate/unfold
|
||||||
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
|
<$reveal tag="div" class="tc-tiddler-body" type="nomatch" state=<<folded-state>> text="show" default="show" retain="yes" animate="yes">
|
||||||
|
<$button tooltip={{$:/language/Buttons/Unfold/Hint}} aria-label={{$:/language/Buttons/Unfold/Caption}} class="tc-unfold-banner">
|
||||||
|
<$action-sendmessage $message="tm-fold-tiddler" $param=<<currentTiddler>> foldedState=<<folded-state>>/>
|
||||||
|
{{$:/core/images/chevron-down}}
|
||||||
|
</$button>
|
||||||
|
</$reveal>
|
@ -3,10 +3,6 @@ tags: $:/tags/ViewToolbar
|
|||||||
caption: {{$:/core/images/fold-button}} {{$:/language/Buttons/Fold/Caption}}
|
caption: {{$:/core/images/fold-button}} {{$:/language/Buttons/Fold/Caption}}
|
||||||
description: {{$:/language/Buttons/Fold/Hint}}
|
description: {{$:/language/Buttons/Fold/Hint}}
|
||||||
|
|
||||||
\define folded-state()
|
|
||||||
$:/state/folded/$(currentTiddler)$
|
|
||||||
\end
|
|
||||||
|
|
||||||
<$reveal type="nomatch" state=<<folded-state>> text="hide" default="show">
|
<$reveal type="nomatch" state=<<folded-state>> text="hide" default="show">
|
||||||
<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=<<tv-config-toolbar-class>>>
|
<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=<<tv-config-toolbar-class>>>
|
||||||
<$action-sendmessage $message="tm-fold-tiddler" $param=<<currentTiddler>> foldedState=<<folded-state>>/>
|
<$action-sendmessage $message="tm-fold-tiddler" $param=<<currentTiddler>> foldedState=<<folded-state>>/>
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
title: $:/tags/ViewTemplate
|
title: $:/tags/ViewTemplate
|
||||||
list: [[$:/core/ui/ViewTemplate/title]] [[$:/core/ui/ViewTemplate/subtitle]] [[$:/core/ui/ViewTemplate/tags]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/ViewTemplate/body]]
|
list: [[$:/core/ui/ViewTemplate/title]] [[$:/core/ui/ViewTemplate/subtitle]] [[$:/core/ui/ViewTemplate/tags]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/ViewTemplate/body]] [[$:/core/ui/ViewTemplate/unfold]]
|
||||||
|
@ -434,6 +434,30 @@ button svg.tc-image-button, button .tc-image-button img {
|
|||||||
width: 1em;
|
width: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tc-unfold-banner {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
border-top: 2px solid <<colour tiddler-controls-foreground>>;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tc-unfold-banner:hover {
|
||||||
|
background: <<colour tiddler-info-background>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tc-unfold-banner svg {
|
||||||
|
height: 0.75em;
|
||||||
|
fill: <<colour tiddler-controls-foreground>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tc-unfold-banner:hover svg {
|
||||||
|
fill: <<colour tiddler-controls-foreground-hover>>;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Tags and missing tiddlers
|
** Tags and missing tiddlers
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user