1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Add banner for unfolding tiddlers

This commit is contained in:
Jermolene 2015-09-18 17:29:52 +01:00
parent 6309d41b42
commit b641cb402d
4 changed files with 34 additions and 5 deletions

View 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>

View File

@ -3,10 +3,6 @@ tags: $:/tags/ViewToolbar
caption: {{$:/core/images/fold-button}} {{$:/language/Buttons/Fold/Caption}}
description: {{$:/language/Buttons/Fold/Hint}}
\define folded-state()
$:/state/folded/$(currentTiddler)$
\end
<$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>>>
<$action-sendmessage $message="tm-fold-tiddler" $param=<<currentTiddler>> foldedState=<<folded-state>>/>

View File

@ -1,2 +1,2 @@
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]]

View File

@ -434,6 +434,30 @@ button svg.tc-image-button, button .tc-image-button img {
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
*/