I asked this question a few days ago about how to retrieve journal 7 days ago.
I have a follow up question, what if I would like to retrieve journals 7 days ago, as well as 30 days ago (a month) and 365 days ago?
I certainly can have three individual queries but I wonder if there is a cleaner method.
Also, my current query is
{
:title "⑦ 一星期前"
:query [:find ?name
:in $ ?span
:where
[?p :block/journal? true]
[?p :block/journal-day ?span]
[?p :block/name ?name]
]
:inputs [:7d-before ]
:view (fn [result]
[:div.flex.flex-col
(for [page result]
[:a {:href (str "#/page/" page)} (clojure.string/capitalize page)]
)]
)
:collapsed? false}
and it renders as this
I’d like to have three such hyperlinks and ideally a text next to the link showing it’s 7 days, 30 days or 365 days.
Is it possible? Thank you for the help!