mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-18 06:00:29 +00:00
279ae2af79
Otherwise, the `sameday` macro will default to `modified`. In case the user set `dateField:"created"` when calling `timeline`, the result will be inconsitent.
30 lines
875 B
Plaintext
30 lines
875 B
Plaintext
created: 20141212105914482
|
|
modified: 20141212110330815
|
|
tags: $:/tags/Macro
|
|
title: $:/core/macros/timeline
|
|
type: text/vnd.tiddlywiki
|
|
|
|
\define timeline-title()
|
|
<!-- Override this macro with a global macro
|
|
of the same name if you need to change
|
|
how titles are displayed on the timeline
|
|
-->
|
|
<$view field="title"/>
|
|
\end
|
|
\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
|
|
<div class="tc-timeline">
|
|
<$list filter="[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]">
|
|
<div class="tc-menu-list-item">
|
|
<$view field="$dateField$" format="date" template="$format$"/>
|
|
<$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]">
|
|
<div class="tc-menu-list-subitem">
|
|
<$link to={{!!title}}>
|
|
<<timeline-title>>
|
|
</$link>
|
|
</div>
|
|
</$list>
|
|
</div>
|
|
</$list>
|
|
</div>
|
|
\end
|