~hokiegeek/tw5-image-carousel

ref: 7a4f4f684cc315f9e66935fa17d4fe90c020bd6b tw5-image-carousel/macro.tid -rw-r--r-- 837 bytes
7a4f4f68HokieGeek Better implementation 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
modified: 20220120213942000
created: 20220120213942000
creator: hokiegeek
modifier: hokiegeek
tags: $:/tags/Macro
title: $:/plugins/hokiegeek/image-carousel/macros
type: text/vnd.tiddlywiki

\whitespace trim
\define image-carousel(field:"images", width:1000)
<$set name="tiddler" value=<<currentTiddler>>>
<$set name="images-list" tiddler=<<tiddler>> field=$field$>
<$list filter="[all[current]get[image-carousel-selected]] =[enlist<images-list>] +[first[1]]">
<$image width=$width$ source=<<currentTiddler>> />
</$list>
<$list filter="[enlist<images-list>count[]compare:number:gt[1]]">
<div class="tc-image-chooser">
<$macrocall $name="image-picker-list" filter="[enlist<images-list>]" actions="

<$action-setfield $tiddler=<<tiddler>> $field='image-carousel-selected' $value=<<imageTitle>> />

"/>
</div>
</$list>
</$set>
</$set>
\end