@sprig-and-prose/sprig-ui-csr 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ <script>
2
+ import { universeRootNode, rootChildren, rootAnthologies, rootUngroupedSeries, universeGraph } from '../lib/data/universeStore.js';
3
+ import UniverseHeader from '../lib/components/UniverseHeader.svelte';
4
+ import Prose from '../lib/components/Prose.svelte';
5
+ import ContentsCard from '../lib/components/ContentsCard.svelte';
6
+ import FooterStatus from '../lib/components/FooterStatus.svelte';
7
+ </script>
8
+
9
+ {#if $universeRootNode}
10
+ <UniverseHeader node={$universeRootNode} />
11
+
12
+ <div class="grid">
13
+ <section class="narrative">
14
+ <Prose textBlock={$universeRootNode.describe} />
15
+ </section>
16
+
17
+ <aside class="index">
18
+ {#if $rootAnthologies.length > 0}
19
+ <ContentsCard children={$rootAnthologies} title="Anthologies" />
20
+ {#if $rootUngroupedSeries.length > 0}
21
+ <div class="other-series">
22
+ <ContentsCard children={$rootUngroupedSeries} title="Other series" />
23
+ </div>
24
+ {/if}
25
+ {:else}
26
+ <ContentsCard children={$rootChildren} title="Concepts in this universe" />
27
+ {/if}
28
+ </aside>
29
+ </div>
30
+
31
+ <FooterStatus graph={$universeGraph} root={$universeRootNode} />
32
+ {:else}
33
+ <div class="loading">Loading…</div>
34
+ {/if}
35
+
36
+ <style>
37
+ .grid {
38
+ display: grid;
39
+ grid-template-columns: 1fr 350px;
40
+ gap: 64px;
41
+ align-items: start;
42
+ max-width: 1200px;
43
+ margin: 0 auto;
44
+ width: 100%;
45
+ }
46
+
47
+ .narrative {
48
+ max-width: 680px;
49
+ min-width: 0;
50
+ width: 100%;
51
+ }
52
+
53
+ .index {
54
+ min-width: 0;
55
+ width: 100%;
56
+ }
57
+
58
+ .other-series {
59
+ margin-top: 1rem;
60
+ }
61
+
62
+ .loading {
63
+ color: var(--text-tertiary);
64
+ padding: 24px 0;
65
+ }
66
+
67
+ @media (max-width: 768px) {
68
+ .grid {
69
+ grid-template-columns: 1fr;
70
+ gap: 32px;
71
+ }
72
+ }
73
+
74
+ @media (max-width: 480px) {
75
+ .grid {
76
+ gap: 32px;
77
+ }
78
+ }
79
+ </style>
80
+