[logseq-plugin-git:commit] 2025-06-05T08:36:10.944Z

This commit is contained in:
2025-06-05 10:36:12 +02:00
parent b2116c22df
commit e3725ac9e7
6304 changed files with 708459 additions and 464 deletions
+111
View File
@@ -0,0 +1,111 @@
-
- This is a page to gather all your Projects, Areas, Resources and Archive together.
- To list all your Projects, we use any page that has its `page-type` set to `project`, or any page that is being linked to using `project::`. The same goes for Areas and Resources.
- Archive is any page that has `archived` set to `true`.
- This functionality is not implemented yet
-
- ## Projects
- #+BEGIN_QUERY
{
:query [:find (pull ?page [*])
:where
(or-join [?page]
(and [_ :block/properties ?prop]
[(get ?prop :project) ?page1]
[(str ?page1) ?page11]
[_ :block/refs ?page]
[?page :block/original-name ?page2]
[(str "#{\"" ?page2 "\"}") ?page22]
[(= ?page22 ?page11)]
)
(and
[?page :block/name]
[?page :block/properties ?prop3]
[?page :block/original-name ?page3-name]
[(get ?prop3 :page-type) ?v]
(or [(= ?v "project")] [(contains? ?v "project")])
)
)
]
:view (fn [result]
[:div.flex.flex-col
(for [page result]
[:a {:href (str "#/page/" (get page :block/original-name))} (get page :block/original-name) ]
)
[:hr]
]
)
}
#+END_QUERY
- ## Areas
- #+BEGIN_QUERY
{
:query [:find (pull ?page [*])
:where
(or-join [?page]
(and [_ :block/properties ?prop]
[(get ?prop :area) ?page1]
[(str ?page1) ?page11]
[_ :block/refs ?page]
[?page :block/original-name ?page2]
[(str "#{\"" ?page2 "\"}") ?page22]
[(= ?page22 ?page11)]
)
(and
[?page :block/name]
[?page :block/properties ?prop3]
[?page :block/original-name ?page3-name]
[(get ?prop3 :page-type) ?v]
(or [(= ?v "area")] [(contains? ?v "area")])
)
)
]
:view (fn [result]
[:div.flex.flex-col
(for [page result]
[:a {:href (str "#/page/" (get page :block/original-name))} (get page :block/original-name) ]
)
[:hr]
]
)
}
#+END_QUERY
- ## Resources
- #+BEGIN_QUERY
{
:query [:find (pull ?page [*])
:where
(or-join [?page]
(and [_ :block/properties ?prop]
[(get ?prop :resource) ?page1]
[(str ?page1) ?page11]
[_ :block/refs ?page]
[?page :block/original-name ?page2]
[(str "#{\"" ?page2 "\"}") ?page22]
[(= ?page22 ?page11)]
)
(and
[?page :block/name]
[?page :block/properties ?prop3]
[?page :block/original-name ?page3-name]
[(get ?prop3 :page-type) ?v]
(or [(= ?v "resource")] [(contains? ?v "resource")])
)
)
]
:view (fn [result]
[:div.flex.flex-col
(for [page result]
[:a {:href (str "#/page/" (get page :block/original-name))} (get page :block/original-name) ]
)
[:hr]
]
)
}
#+END_QUERY