mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-16 14:54:51 +00:00
26 lines
920 B
Plaintext
26 lines
920 B
Plaintext
tags: $:/tags/Macro $:/tags/Global
|
|
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
|