1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-29 19:40:28 +00:00
TiddlyWiki5/core/wiki/macros/timeline.tid
2024-10-22 13:15:34 +01:00

26 lines
905 B
Plaintext

tags: $:/tags/Macro
title: $:/core/macros/timeline
<!-- Override one or both of the following two macros with a global or local macro of the same name
if you need to change how titles are displayed on a timeline -->
\procedure timeline-title() <$view field="title"/>
\procedure timeline-link() <$link to={{!!title}}><<timeline-title>></$link>
\procedure timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
\whitespace trim
<div class="tc-timeline">
<$set name="tv-tids" filter=`[!is[system]$(subfilter)$has<dateField>!sort<dateField>limit<limit>]`>
<$list filter="[enlist<tv-tids>eachday<dateField>]">
<div class="tc-menu-list-item">
<$view field=<<dateField>> format="date" template=<<format>>/>
<$list filter=`[enlist<tv-tids>sameday:$(dateField)${!!$(dateField)$}]`>
<div class="tc-menu-list-subitem">
<<timeline-link>>
</div>
</$list>
</div>
</$list>
</$set>
</div>
\end