-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from georgeguimaraes/gg-add-menu
Add Menu item that creates the PARA root page
- Loading branch information
Showing
8 changed files
with
228 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
const template = [ | ||
{ | ||
content: `This is a page to gather all your Projects, Areas, Resources and Archive together.`, | ||
children: [ | ||
{ | ||
content: `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.`, | ||
}, | ||
{ | ||
content: `Archive is any page that has \`archived\` set to \`true\`.`, | ||
children: [{ content: "This functionality is not implemented yet" }], | ||
}, | ||
], | ||
}, | ||
{ | ||
content: `## Projects`, | ||
children: [ | ||
{ | ||
content: ` | ||
#+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`, | ||
}, | ||
], | ||
}, | ||
{ | ||
content: `## Areas`, | ||
children: [ | ||
{ | ||
content: `#+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`, | ||
}, | ||
], | ||
}, | ||
{ | ||
content: `## Resources`, | ||
children: [ | ||
{ | ||
content: `#+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`, | ||
}, | ||
], | ||
}, | ||
]; | ||
export default template; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters