1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-29 11:30:28 +00:00
TiddlyWiki5/plugins/tiddlywiki/dynaview/examples/reveal-on-scroll.tid

28 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-01-05 09:18:19 +00:00
title: $:/plugins/tiddlywiki/dynaview/examples/reveal-on-scroll
tags: $:/tags/dynaviewExamples
caption: Reveal on Scroll
\define indicator(index)
2020-05-16 13:56:08 +00:00
<$reveal state="$:/state/unreveal-on-scroll/example$index$" type="nomatch" text="">
2018-01-05 09:18:19 +00:00
$index$
</$reveal>
\end
\define lorem-ipsum(index)
2020-05-16 13:56:08 +00:00
<div class="tc-dynaview-track-tiddler-when-visible" style="min-height: 75px;" data-dynaview-track-tiddler="$:/state/unreveal-on-scroll/example$index$">
2018-01-05 09:18:19 +00:00
<h1>Heading $index$</h1>
2020-05-16 13:56:08 +00:00
<$reveal state="$:/state/unreveal-on-scroll/example$index$" type="nomatch" text="">
2018-01-05 09:18:19 +00:00
(Rendered at <<now "[UTC]YYYY-0MM-0DD 0hh:0mm:0ss.XXX">>) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</$reveal>
</div>
\end
2020-05-16 13:56:08 +00:00
This example renders tiddlers as they are scrolled into view, and hides them when they scroll out of view again.
2018-01-05 09:18:19 +00:00
Visible: <$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16">
<$macrocall $name="indicator" index=<<currentTiddler>>/>
</$list>
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16">
<$macrocall $name="lorem-ipsum" index=<<currentTiddler>>/>
</$list>