From fa921d7bece203a7ce453c35206e30756505653d Mon Sep 17 00:00:00 2001 From: limina1 Date: Sun, 8 Dec 2024 14:45:29 -0500 Subject: [PATCH] Add d3, visualize, EventNetwork.svelte --- package.json | 1 + src/lib/components/EventNetwork.svelte | 395 +++++++++++++++++++++++++ src/routes/visualize/+page.svelte | 98 +++++- 3 files changed, 485 insertions(+), 9 deletions(-) create mode 100644 src/lib/components/EventNetwork.svelte diff --git a/package.json b/package.json index 99658c9..afef0bf 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", "asciidoctor": "^3.0.4", + "d3": "^7.9.0", "he": "^1.2.0", "markdown-it": "^14.0.0", "markdown-it-plain-text": "^0.3.0", diff --git a/src/lib/components/EventNetwork.svelte b/src/lib/components/EventNetwork.svelte new file mode 100644 index 0000000..8ad44b6 --- /dev/null +++ b/src/lib/components/EventNetwork.svelte @@ -0,0 +1,395 @@ + + +# /lib/components/EventNetwork.svelte +
+ +
+

+ Legend +

+
    +
  • +
    + + + I +
    + Index events (kind 30040) - Each with a unique pastel color +
  • +
  • +
    + + C +
    + Content events (kind 30041) - Publication sections +
  • +
  • + + + + Arrows indicate reading/sequence order +
  • +
+
+
+ + diff --git a/src/routes/visualize/+page.svelte b/src/routes/visualize/+page.svelte index 9afab24..3bf515e 100644 --- a/src/routes/visualize/+page.svelte +++ b/src/routes/visualize/+page.svelte @@ -1,12 +1,92 @@ - -
-
- Visualize -

Coming soon.

-
-
\ No newline at end of file +
+

Publication Network

+ + {#if loading} +
+

Loading network data...

+
+ {:else if error} +
+

Error loading network: {error}

+ +
+ {:else} + + +
+ +

About This Visualization

+ +
+ {/if} +