From 3ae5703d31142f9d875485704f9e2033589e955b Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Sat, 27 Apr 2024 20:24:23 +0800 Subject: [PATCH] refactor: layout for ITKG --- .../Sidebar/Buttons.tid | 15 ------- .../Sidebar/IntentionTower.tid | 18 -------- .../Sidebar/ProjectList.tid | 21 --------- .../Sidebar/sidebar.css.meta | 3 -- .../UnderIntention/UnderIntention.tid | 2 +- .../UnderProject/UnderProject.tid | 2 +- .../ViewTemplate/UnderTask/TaskContext.tid | 6 +-- .../ViewTemplate/UnderTask/UnderTask.tid | 2 +- .../icons/tower.tid | 5 +++ .../layout/IntentionTower.tid | 44 +++++++++++++++++++ .../layout/layout.tid | 19 ++++++++ .../{Sidebar/sidebar.css => layout/style.css} | 13 +++--- .../layout/style.css.meta | 3 ++ .../layout/style.css.variable.tid | 6 +++ 14 files changed, 90 insertions(+), 69 deletions(-) delete mode 100644 src/intention-tower-knowledge-graph/Sidebar/Buttons.tid delete mode 100644 src/intention-tower-knowledge-graph/Sidebar/IntentionTower.tid delete mode 100644 src/intention-tower-knowledge-graph/Sidebar/ProjectList.tid delete mode 100644 src/intention-tower-knowledge-graph/Sidebar/sidebar.css.meta create mode 100644 src/intention-tower-knowledge-graph/icons/tower.tid create mode 100644 src/intention-tower-knowledge-graph/layout/IntentionTower.tid create mode 100644 src/intention-tower-knowledge-graph/layout/layout.tid rename src/intention-tower-knowledge-graph/{Sidebar/sidebar.css => layout/style.css} (69%) create mode 100644 src/intention-tower-knowledge-graph/layout/style.css.meta create mode 100644 src/intention-tower-knowledge-graph/layout/style.css.variable.tid diff --git a/src/intention-tower-knowledge-graph/Sidebar/Buttons.tid b/src/intention-tower-knowledge-graph/Sidebar/Buttons.tid deleted file mode 100644 index ef5f13b..0000000 --- a/src/intention-tower-knowledge-graph/Sidebar/Buttons.tid +++ /dev/null @@ -1,15 +0,0 @@ -title: $:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/Buttons - -\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/EditTemplate/title]] [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons]] - -
- - <> - -
- -
- <> - <> - <> -
\ No newline at end of file diff --git a/src/intention-tower-knowledge-graph/Sidebar/IntentionTower.tid b/src/intention-tower-knowledge-graph/Sidebar/IntentionTower.tid deleted file mode 100644 index ff7abb4..0000000 --- a/src/intention-tower-knowledge-graph/Sidebar/IntentionTower.tid +++ /dev/null @@ -1,18 +0,0 @@ -title: $:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/IntentionTower -caption: 意义之塔 -creator: LinOnetwo -description: ITKG任务管理 -tags: $:/tags/SideBar -type: text/vnd.tiddlywiki - -\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/ProjectList]] [[$:/plugins/linonetwo/intention-tower-knowledge-graph/filters/leaf-task]] - -<$scrollable fallthrough="none" class="itkg-sidebar-container tc-popup-keep tc-menubar-dropdown-sidebar"> - -{{$:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/Buttons}} - -<> - - - -{{$:/plugins/linonetwo/intention-tower-knowledge-graph/ViewTemplate/ProjectsOverview}} diff --git a/src/intention-tower-knowledge-graph/Sidebar/ProjectList.tid b/src/intention-tower-knowledge-graph/Sidebar/ProjectList.tid deleted file mode 100644 index 9e642cd..0000000 --- a/src/intention-tower-knowledge-graph/Sidebar/ProjectList.tid +++ /dev/null @@ -1,21 +0,0 @@ -title: $:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/ProjectList - -\define project-list-item() -\whitespace trim -
- <$link to=<> tooltip=<>> - <> - -
-\end - -\define project-list() -\whitespace trim -
- <$list - filter="[{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/project-tag}] +[tagging[]filter] :and[filterunique[]!sortsub:integer]" - > - <> - -
-\end diff --git a/src/intention-tower-knowledge-graph/Sidebar/sidebar.css.meta b/src/intention-tower-knowledge-graph/Sidebar/sidebar.css.meta deleted file mode 100644 index 8737e38..0000000 --- a/src/intention-tower-knowledge-graph/Sidebar/sidebar.css.meta +++ /dev/null @@ -1,3 +0,0 @@ -title: $:/themes/linonetwo/intention-tower-knowledge-graph/sidebar.css -tags: $:/tags/Stylesheet -type: text/css \ No newline at end of file diff --git a/src/intention-tower-knowledge-graph/ViewTemplate/UnderIntention/UnderIntention.tid b/src/intention-tower-knowledge-graph/ViewTemplate/UnderIntention/UnderIntention.tid index 2fdbba8..db2b5c0 100644 --- a/src/intention-tower-knowledge-graph/ViewTemplate/UnderIntention/UnderIntention.tid +++ b/src/intention-tower-knowledge-graph/ViewTemplate/UnderIntention/UnderIntention.tid @@ -1,7 +1,7 @@ title: $:/plugins/linonetwo/intention-tower-knowledge-graph/ViewTemplate/UnderIntention tags: $:/tags/ViewTemplate -\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/Buttons]] [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons]] +\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons]] <$let graphRootTiddler=<> > <$list filter="[all[current]tag{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/intention-tag}then]"> diff --git a/src/intention-tower-knowledge-graph/ViewTemplate/UnderProject/UnderProject.tid b/src/intention-tower-knowledge-graph/ViewTemplate/UnderProject/UnderProject.tid index 762b883..c73027d 100644 --- a/src/intention-tower-knowledge-graph/ViewTemplate/UnderProject/UnderProject.tid +++ b/src/intention-tower-knowledge-graph/ViewTemplate/UnderProject/UnderProject.tid @@ -1,7 +1,7 @@ title: $:/plugins/linonetwo/intention-tower-knowledge-graph/ViewTemplate/UnderProject tags: $:/tags/ViewTemplate -\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Sidebar/Buttons]] [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons]] +\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons]] <$let graphRootTiddler=<> > <$list filter="[all[current]tag{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/project-tag}then]"> diff --git a/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/TaskContext.tid b/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/TaskContext.tid index fd5a9e8..095fa3c 100644 --- a/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/TaskContext.tid +++ b/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/TaskContext.tid @@ -23,7 +23,7 @@ tags: $:/tags/ITKG/UnderTask 子任务、前置任务及后续任务
当前子任务 -
+
<$list filter="[tag]"> <$link><>   @@ -32,7 +32,7 @@ tags: $:/tags/ITKG/UnderTask
前置任务 -
+
<$list filter="[enlist{!!tmo_dependency}]"> <$link><>   @@ -41,7 +41,7 @@ tags: $:/tags/ITKG/UnderTask
后续任务 -
+
<$list filter="[tmo_dependency]"> <$link><>   diff --git a/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/UnderTask.tid b/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/UnderTask.tid index b8c09bd..f62476d 100644 --- a/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/UnderTask.tid +++ b/src/intention-tower-knowledge-graph/ViewTemplate/UnderTask/UnderTask.tid @@ -7,7 +7,7 @@ tags: $:/tags/ViewTemplate <$list filter="[all[current]tag{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/task-tag}!tag{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/project-tag}then]"> -
+
<>  <>  <>  diff --git a/src/intention-tower-knowledge-graph/icons/tower.tid b/src/intention-tower-knowledge-graph/icons/tower.tid new file mode 100644 index 0000000..990e8b1 --- /dev/null +++ b/src/intention-tower-knowledge-graph/icons/tower.tid @@ -0,0 +1,5 @@ +title: $:/plugins/linonetwo/intention-tower-knowledge-graph/icons/tower +tags: $:/tags/Image + +\parameters (size:"22pt") +> height=<> class="tc-image-ipk-eiffel-tower-outline tc-image-button" viewBox="0 0 48 48" fill="none"> \ No newline at end of file diff --git a/src/intention-tower-knowledge-graph/layout/IntentionTower.tid b/src/intention-tower-knowledge-graph/layout/IntentionTower.tid new file mode 100644 index 0000000..65abfd5 --- /dev/null +++ b/src/intention-tower-knowledge-graph/layout/IntentionTower.tid @@ -0,0 +1,44 @@ +title: $:/plugins/linonetwo/intention-tower-knowledge-graph/layout/IntentionTower + +\import [[$:/plugins/linonetwo/intention-tower-knowledge-graph/filters/leaf-task]] [[$:/plugins/linonetwo/intention-tower-knowledge-graph/EditTemplate/title]] [[$:/plugins/linonetwo/intention-tower-knowledge-graph/Components/Buttons]] + +\define project-list-item() +\whitespace trim +
+ <$link to=<> tooltip=<>> + <> + +
+\end + +\define project-list() +\whitespace trim +
+ <$list + filter="[{$:/plugins/linonetwo/intention-tower-knowledge-graph/Config/project-tag}] +[tagging[]filter] :and[filterunique[]!sortsub:integer]" + > + <> + +
+\end + + +<$scrollable fallthrough="none" class="itkg-IntentionTower-top-container tc-popup-keep tc-menubar-dropdown-sidebar"> + +
+ + <> + +
+ +
+ <> + <> + <> +
+ + <> + + + +{{$:/plugins/linonetwo/intention-tower-knowledge-graph/ViewTemplate/ProjectsOverview}} diff --git a/src/intention-tower-knowledge-graph/layout/layout.tid b/src/intention-tower-knowledge-graph/layout/layout.tid new file mode 100644 index 0000000..0a9e17a --- /dev/null +++ b/src/intention-tower-knowledge-graph/layout/layout.tid @@ -0,0 +1,19 @@ +title: $:/plugins/linonetwo/intention-tower-knowledge-graph/layout/layout +name: <> +icon: $:/plugins/linonetwo/intention-tower-knowledge-graph/icons/tower +description: <> +tags: $:/tags/Layout + +\whitespace trim +\import [subfilter{$:/core/config/GlobalImportFilter}] +\define containerClasses() +tc-page-container tc-language-$(languageTitle)$ intention-tower-knowledge-graph-container +\end + +<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}> +
>> + + {{$:/plugins/linonetwo/intention-tower-knowledge-graph/layout/IntentionTower}} + +
+ \ No newline at end of file diff --git a/src/intention-tower-knowledge-graph/Sidebar/sidebar.css b/src/intention-tower-knowledge-graph/layout/style.css similarity index 69% rename from src/intention-tower-knowledge-graph/Sidebar/sidebar.css rename to src/intention-tower-knowledge-graph/layout/style.css index 6a5629a..ad2211b 100644 --- a/src/intention-tower-knowledge-graph/Sidebar/sidebar.css +++ b/src/intention-tower-knowledge-graph/layout/style.css @@ -1,30 +1,31 @@ /* can't use css variable in tid file, because it will become -— , maybe triggers --- syntax? Have to move them into a css file like this */ -div.itkg-sidebar-container { +div.intention-tower-knowledge-graph-container { height: 100%; + padding: 1em; } -.itkg-sidebar-project-list { +.itkg-project-list { display: flex; flex-direction: row; flex-wrap: wrap; } -.itkg-sidebar-project-list-item { +.itkg-project-list-item { padding: 5px 0; margin: 5px; word-wrap: break-word; word-break: break-all; } -.itkg-sidebar-buttons { +.itkg-buttons { padding: 10px 0; display: flex; flex-direction: row; justify-content: space-between; } -.itkg-sidebar-buttons button { +.itkg-buttons button { padding: 15px 20px; } -.itkg-sidebar-create-task .tc-edit-texteditor { +.itkg-create-task .tc-edit-texteditor { width: 100%; } \ No newline at end of file diff --git a/src/intention-tower-knowledge-graph/layout/style.css.meta b/src/intention-tower-knowledge-graph/layout/style.css.meta new file mode 100644 index 0000000..5fae168 --- /dev/null +++ b/src/intention-tower-knowledge-graph/layout/style.css.meta @@ -0,0 +1,3 @@ +title: $:/themes/linonetwo/intention-tower-knowledge-graph/layout/style.css +tags: $:/tags/Stylesheet +type: text/css \ No newline at end of file diff --git a/src/intention-tower-knowledge-graph/layout/style.css.variable.tid b/src/intention-tower-knowledge-graph/layout/style.css.variable.tid new file mode 100644 index 0000000..e122d21 --- /dev/null +++ b/src/intention-tower-knowledge-graph/layout/style.css.variable.tid @@ -0,0 +1,6 @@ +title: $:/themes/linonetwo/intention-tower-knowledge-graph/layout/style.css.variable +tags: $:/tags/Stylesheet + +div.itkg-IntentionTower-top-container { + border-bottom: 1px solid <>; +} \ No newline at end of file