1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Fix timeline macro showing long list of tiddlers created the same day. (#8690)

This commit is contained in:
Leilei332 2024-10-20 17:47:50 +08:00 committed by GitHub
parent e1287a9470
commit a0caa0f12d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,25 +1,25 @@
created: 20141212105914482 tags: $:/tags/Macro $:/tags/Global
modified: 20141212110330815
tags: $:/tags/Macro
title: $:/core/macros/timeline title: $:/core/macros/timeline
<!-- Override one or both of the following two macros with a global or local macro of the same name <!-- 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 --> if you need to change how titles are displayed on a timeline -->
\define timeline-title() <$view field="title"/> \procedure timeline-title() <$view field="title"/>
\define timeline-link() <$link to={{!!title}}><<timeline-title>></$link> \procedure timeline-link() <$link to={{!!title}}><<timeline-title>></$link>
\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified") \procedure timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
\whitespace trim \whitespace trim
<div class="tc-timeline"> <div class="tc-timeline">
<$list filter="[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]"> <$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"> <div class="tc-menu-list-item">
<$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=`[enlist<tv-tids>sameday:$(dateField)${!!$(dateField)$}]`>
<div class="tc-menu-list-subitem"> <div class="tc-menu-list-subitem">
<<timeline-link>> <<timeline-link>>
</div> </div>
</$list> </$list>
</div> </div>
</$list> </$list>
</$set>
</div> </div>
\end \end