generate rss channel as xml str
This commit is contained in:
parent
f653ed944f
commit
afc446bc9e
4 changed files with 117 additions and 23 deletions
|
|
@ -146,6 +146,13 @@
|
|||
return summ
|
||||
}
|
||||
|
||||
#let summary-sort-key(summ) = -(
|
||||
summ.document-args.date.day()-1 + 31 * (
|
||||
(summ.document-args.date.month()-1) +
|
||||
12 * summ.document-args.date.year()
|
||||
)
|
||||
)
|
||||
|
||||
/// Display a list of summary cards.
|
||||
///
|
||||
/// min-width is the minimum width of the cards, in px.
|
||||
|
|
@ -166,12 +173,7 @@
|
|||
lang: "raw-css",
|
||||
)
|
||||
chtml.summary-card-list(attrs: (class: class-name), {
|
||||
for summ in summs.sorted(key: it =>
|
||||
-(it.document-args.date.day()-1 + 31 * (
|
||||
(it.document-args.date.month()-1) +
|
||||
12 * it.document-args.date.year()
|
||||
))
|
||||
) {
|
||||
for summ in summs.sorted(key: summary-sort-key) {
|
||||
summ.card
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue