1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +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 tags: $:/tags/Macro
title: $:/core/macros/timeline title: $:/core/macros/timeline
\define timeline-title() <!-- Override one or both of the following two macros with a global or local macro of the same name
\whitespace trim if you need to change how titles are displayed on a timeline -->
<!-- Override this macro with a global macro
of the same name if you need to change \define timeline-title() <$view field="title"/>
how titles are displayed on the timeline \define timeline-link() <$link to={{!!title}}><<timeline-title>></$link>
-->
<$view field="title"/>
\end
\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified") \define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
\whitespace trim \whitespace trim
<div class="tc-timeline"> <div class="tc-timeline">
@ -19,7 +16,7 @@ title: $:/core/macros/timeline
<$view field="$dateField$" format="date" template="$format$"/> <$view field="$dateField$" format="date" template="$format$"/>
<$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]"> <$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]">
<div class="tc-menu-list-subitem"> <div class="tc-menu-list-subitem">
<$link to={{!!title}}><<timeline-title>></$link> <<timeline-link>>
</div> </div>
</$list> </$list>
</div> </div>