1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-27 18:40:28 +00:00

Make timeline macro more customisable (#5947)

* make the timeline-macro more customizable

* changed comment as requested
This commit is contained in:
Mario Pietsch 2022-11-14 18:11:26 +01:00 committed by GitHub
parent b097d2ec48
commit 7f48b6c6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,14 +3,11 @@ modified: 20141212110330815
tags: $:/tags/Macro
title: $:/core/macros/timeline
\define timeline-title()
\whitespace trim
<!-- 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
<!-- 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">
@ -19,7 +16,7 @@ title: $:/core/macros/timeline
<$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>
<<timeline-link>>
</div>
</$list>
</div>