mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-29 11:30:28 +00:00
7f48b6c6ce
* make the timeline-macro more customizable * changed comment as requested
26 lines
921 B
Plaintext
26 lines
921 B
Plaintext
created: 20141212105914482
|
|
modified: 20141212110330815
|
|
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 -->
|
|
|
|
\define timeline-title() <$view field="title"/>
|
|
\define timeline-link() <$link to={{!!title}}><<timeline-title>></$link>
|
|
\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
|
|
\whitespace trim
|
|
<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">
|
|
<<timeline-link>>
|
|
</div>
|
|
</$list>
|
|
</div>
|
|
</$list>
|
|
</div>
|
|
\end
|