docs(readme,preview): screenshots of both tabs, a calendar scene on the busiest month
This commit is contained in:
1 parent
fa36710f0c
commit
b415b17007
4 files changed
+16
-3
No files matched your search
@@ -1,9 +1,11 @@
|
|||||||
# beaver-calendar
|
# beaver-calendar
|
||||||
[](https://sladge.net)
|
[](https://sladge.net)
|
||||||
|
|
||||||
Calendar and task list for Obsidian Kanban+Tasks
|
A calendar and a task list for Obsidian on top of Kanban boards and the Tasks plugin. A sphere is a board file, a project is an h2 inside it; every task keeps living in its board, the plugin only shows them together - by deadline, by sphere, or on a month grid - and lets you drag, edit and close them without opening the board.
|
||||||
|
|
||||||
Sphere - md-file in Kanban boards directory. Project - h2 inside the file.
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Archiving
|
## Archiving
|
||||||
|
|
||||||
@@ -49,5 +51,5 @@ VAULT=/path/to/vault npm run preview # the vault's theme
|
|||||||
BOARDS=/path/to/vault/Boards npm run preview # real boards, not fixtures
|
BOARDS=/path/to/vault/Boards npm run preview # real boards, not fixtures
|
||||||
EXTRA_CSS=/path/to/other-plugin/styles.css … # another plugin's css, loaded after ours
|
EXTRA_CSS=/path/to/other-plugin/styles.css … # another plugin's css, loaded after ours
|
||||||
open 'http://localhost:4173/?groupBy=due&railCollapsed=1#edit-date' # prefs + scene
|
open 'http://localhost:4173/?groupBy=due&railCollapsed=1#edit-date' # prefs + scene
|
||||||
node preview/shot.mjs out.png 'http://localhost:4173/#date' # screenshot + console
|
node preview/shot.mjs out.png 'http://localhost:4173/#cal' # screenshot + console
|
||||||
```
|
```
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
@@ -105,6 +105,17 @@ async function main(): Promise<void> {
|
|||||||
}
|
}
|
||||||
if (scene === "rail-none") store.filterNone();
|
if (scene === "rail-none") store.filterNone();
|
||||||
}
|
}
|
||||||
|
// The month grid on its own, opened on the month the fixtures are busiest in.
|
||||||
|
if (scene === "cal") {
|
||||||
|
const months = new Map<string, number>();
|
||||||
|
for (const item of store.visible) {
|
||||||
|
const key = (item.due ?? item.scheduled)?.slice(0, 7);
|
||||||
|
if (key) months.set(key, (months.get(key) ?? 0) + 1);
|
||||||
|
}
|
||||||
|
const busiest = [...months.entries()].sort((a, b) => b[1] - a[1])[0]?.[0];
|
||||||
|
store.view = "calendar";
|
||||||
|
if (busiest) store.focusDay(`${busiest}-15`);
|
||||||
|
}
|
||||||
if (scene.startsWith("peek")) {
|
if (scene.startsWith("peek")) {
|
||||||
if (scene === "peek-cal") store.view = "calendar";
|
if (scene === "peek-cal") store.view = "calendar";
|
||||||
if (scene === "peek-notes") store.showDone = true;
|
if (scene === "peek-notes") store.showDone = true;
|
||||||
|
|||||||
Reference in new issue
Block a user