From d1d654ebac2d51e3841675faeb56480e440f622f Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Tue, 5 Mar 2024 18:08:09 +0100
Subject: Initial commit
---
frontend/src/routes/+layout.svelte | 95 +++++++++++++
frontend/src/routes/+layout.ts | 1 +
frontend/src/routes/+page.svelte | 66 ++++++++++
frontend/src/routes/archives/+page.svelte | 119 +++++++++++++++++
frontend/src/routes/archives/+page.ts | 12 ++
frontend/src/routes/archives/[id]/+page.svelte | 99 ++++++++++++++
frontend/src/routes/archives/[id]/+page.ts | 5 +
frontend/src/routes/artists/+page.svelte | 101 ++++++++++++++
frontend/src/routes/artists/+page.ts | 12 ++
frontend/src/routes/characters/+page.svelte | 101 ++++++++++++++
frontend/src/routes/characters/+page.ts | 12 ++
frontend/src/routes/circles/+page.svelte | 101 ++++++++++++++
frontend/src/routes/circles/+page.ts | 12 ++
frontend/src/routes/comics/+page.svelte | 116 ++++++++++++++++
frontend/src/routes/comics/+page.ts | 12 ++
frontend/src/routes/comics/[id]/+page.svelte | 176 +++++++++++++++++++++++++
frontend/src/routes/comics/[id]/+page.ts | 5 +
frontend/src/routes/namespaces/+page.svelte | 101 ++++++++++++++
frontend/src/routes/namespaces/+page.ts | 12 ++
frontend/src/routes/tags/+page.svelte | 109 +++++++++++++++
frontend/src/routes/tags/+page.ts | 12 ++
frontend/src/routes/worlds/+page.svelte | 102 ++++++++++++++
frontend/src/routes/worlds/+page.ts | 12 ++
23 files changed, 1393 insertions(+)
create mode 100644 frontend/src/routes/+layout.svelte
create mode 100644 frontend/src/routes/+layout.ts
create mode 100644 frontend/src/routes/+page.svelte
create mode 100644 frontend/src/routes/archives/+page.svelte
create mode 100644 frontend/src/routes/archives/+page.ts
create mode 100644 frontend/src/routes/archives/[id]/+page.svelte
create mode 100644 frontend/src/routes/archives/[id]/+page.ts
create mode 100644 frontend/src/routes/artists/+page.svelte
create mode 100644 frontend/src/routes/artists/+page.ts
create mode 100644 frontend/src/routes/characters/+page.svelte
create mode 100644 frontend/src/routes/characters/+page.ts
create mode 100644 frontend/src/routes/circles/+page.svelte
create mode 100644 frontend/src/routes/circles/+page.ts
create mode 100644 frontend/src/routes/comics/+page.svelte
create mode 100644 frontend/src/routes/comics/+page.ts
create mode 100644 frontend/src/routes/comics/[id]/+page.svelte
create mode 100644 frontend/src/routes/comics/[id]/+page.ts
create mode 100644 frontend/src/routes/namespaces/+page.svelte
create mode 100644 frontend/src/routes/namespaces/+page.ts
create mode 100644 frontend/src/routes/tags/+page.svelte
create mode 100644 frontend/src/routes/tags/+page.ts
create mode 100644 frontend/src/routes/worlds/+page.svelte
create mode 100644 frontend/src/routes/worlds/+page.ts
(limited to 'frontend/src/routes')
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte
new file mode 100644
index 0000000..0eefed1
--- /dev/null
+++ b/frontend/src/routes/+layout.svelte
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/routes/+layout.ts b/frontend/src/routes/+layout.ts
new file mode 100644
index 0000000..a3d1578
--- /dev/null
+++ b/frontend/src/routes/+layout.ts
@@ -0,0 +1 @@
+export const ssr = false;
diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte
new file mode 100644
index 0000000..97a7a60
--- /dev/null
+++ b/frontend/src/routes/+page.svelte
@@ -0,0 +1,66 @@
+
+
+
+
+
+ {#if $query.data}
+
+
+
+ hircine
+ {version}
+
+
{codename}
+
+
+ {#if recent && recent.count > 0}
+
+ {#each recent.edges as comic}
+
+ {/each}
+
+ {/if}
+ {#if favourites && favourites.count > 0}
+
+ {#each favourites.edges as comic}
+
+ {/each}
+
+ {/if}
+ {#if bookmarked && bookmarked.count > 0}
+
+ {#each bookmarked.edges as comic}
+
+ {/each}
+
+ {/if}
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/archives/+page.svelte b/frontend/src/routes/archives/+page.svelte
new file mode 100644
index 0000000..545058a
--- /dev/null
+++ b/frontend/src/routes/archives/+page.svelte
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#if archives}
+
+
+
+ {#each archives.edges as { id, name, cover, size, pageCount }, index (id)}
+
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/archives/+page.ts b/frontend/src/routes/archives/+page.ts
new file mode 100644
index 0000000..88acade
--- /dev/null
+++ b/frontend/src/routes/archives/+page.ts
@@ -0,0 +1,12 @@
+import { ArchiveSort, type ArchiveFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, ArchiveSort.Path),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams, 24)
+ };
+}
diff --git a/frontend/src/routes/archives/[id]/+page.svelte b/frontend/src/routes/archives/[id]/+page.svelte
new file mode 100644
index 0000000..50a2940
--- /dev/null
+++ b/frontend/src/routes/archives/[id]/+page.svelte
@@ -0,0 +1,99 @@
+
+
+
+
+{#if archive}
+
+
+
+
+
+
+ ($reader = $reader.open(e.detail))}
+ on:cover={updateCover}
+ />
+
+
+{:else}
+
+{/if}
+
+
+
+
diff --git a/frontend/src/routes/archives/[id]/+page.ts b/frontend/src/routes/archives/[id]/+page.ts
new file mode 100644
index 0000000..d872ba2
--- /dev/null
+++ b/frontend/src/routes/archives/[id]/+page.ts
@@ -0,0 +1,5 @@
+export function load({ params }: { params: Record }) {
+ return {
+ id: +params.id
+ };
+}
diff --git a/frontend/src/routes/artists/+page.svelte b/frontend/src/routes/artists/+page.svelte
new file mode 100644
index 0000000..e07338c
--- /dev/null
+++ b/frontend/src/routes/artists/+page.svelte
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal(AddArtist)} />
+
+
+ {#if artists}
+
+
+
+ {#each artists.edges as { id, name }, index (id)}
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/artists/+page.ts b/frontend/src/routes/artists/+page.ts
new file mode 100644
index 0000000..5a76550
--- /dev/null
+++ b/frontend/src/routes/artists/+page.ts
@@ -0,0 +1,12 @@
+import { ArtistSort, type ArtistFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, ArtistSort.Name),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams)
+ };
+}
diff --git a/frontend/src/routes/characters/+page.svelte b/frontend/src/routes/characters/+page.svelte
new file mode 100644
index 0000000..0934bab
--- /dev/null
+++ b/frontend/src/routes/characters/+page.svelte
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal(AddCharacter)} />
+
+
+ {#if characters}
+
+
+
+ {#each characters.edges as { id, name }, index (id)}
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/characters/+page.ts b/frontend/src/routes/characters/+page.ts
new file mode 100644
index 0000000..4f7a3cf
--- /dev/null
+++ b/frontend/src/routes/characters/+page.ts
@@ -0,0 +1,12 @@
+import { CharacterSort, type CharacterFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, CharacterSort.Name),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams)
+ };
+}
diff --git a/frontend/src/routes/circles/+page.svelte b/frontend/src/routes/circles/+page.svelte
new file mode 100644
index 0000000..14b0866
--- /dev/null
+++ b/frontend/src/routes/circles/+page.svelte
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal(AddCircle)} />
+
+
+ {#if circles}
+
+
+
+ {#each circles.edges as { id, name }, index (id)}
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/circles/+page.ts b/frontend/src/routes/circles/+page.ts
new file mode 100644
index 0000000..ea5c3df
--- /dev/null
+++ b/frontend/src/routes/circles/+page.ts
@@ -0,0 +1,12 @@
+import { CircleSort, type CircleFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, CircleSort.Name),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams)
+ };
+}
diff --git a/frontend/src/routes/comics/+page.svelte b/frontend/src/routes/comics/+page.svelte
new file mode 100644
index 0000000..353d69c
--- /dev/null
+++ b/frontend/src/routes/comics/+page.svelte
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#if comics}
+
+
+
+ {#each comics.edges as comic, index (comic.id)}
+
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/comics/+page.ts b/frontend/src/routes/comics/+page.ts
new file mode 100644
index 0000000..4558804
--- /dev/null
+++ b/frontend/src/routes/comics/+page.ts
@@ -0,0 +1,12 @@
+import { ComicSort, type ComicFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, ComicSort.Title),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams, 24)
+ };
+}
diff --git a/frontend/src/routes/comics/[id]/+page.svelte b/frontend/src/routes/comics/[id]/+page.svelte
new file mode 100644
index 0000000..cfc5840
--- /dev/null
+++ b/frontend/src/routes/comics/[id]/+page.svelte
@@ -0,0 +1,176 @@
+
+
+
+
+{#if comic}
+
+
+ toggle('favourite')}
+ />
+
+
+
+
+
+ ($reader = $reader.open(e.detail))}
+ on:cover={updateCover}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+{:else}
+
+{/if}
diff --git a/frontend/src/routes/comics/[id]/+page.ts b/frontend/src/routes/comics/[id]/+page.ts
new file mode 100644
index 0000000..d872ba2
--- /dev/null
+++ b/frontend/src/routes/comics/[id]/+page.ts
@@ -0,0 +1,5 @@
+export function load({ params }: { params: Record }) {
+ return {
+ id: +params.id
+ };
+}
diff --git a/frontend/src/routes/namespaces/+page.svelte b/frontend/src/routes/namespaces/+page.svelte
new file mode 100644
index 0000000..f6568f9
--- /dev/null
+++ b/frontend/src/routes/namespaces/+page.svelte
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal(AddNamespace)} />
+
+
+ {#if namespaces}
+
+
+
+ {#each namespaces.edges as { id, name }, index (id)}
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/namespaces/+page.ts b/frontend/src/routes/namespaces/+page.ts
new file mode 100644
index 0000000..893b540
--- /dev/null
+++ b/frontend/src/routes/namespaces/+page.ts
@@ -0,0 +1,12 @@
+import { NamespaceSort, type NamespaceFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, NamespaceSort.Name),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams)
+ };
+}
diff --git a/frontend/src/routes/tags/+page.svelte b/frontend/src/routes/tags/+page.svelte
new file mode 100644
index 0000000..e0909ad
--- /dev/null
+++ b/frontend/src/routes/tags/+page.svelte
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal(AddTag)} />
+
+
+
+ {#if tags}
+
+
+
+ {#each tags.edges as { id, name, description }, index (id)}
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/tags/+page.ts b/frontend/src/routes/tags/+page.ts
new file mode 100644
index 0000000..f584b6f
--- /dev/null
+++ b/frontend/src/routes/tags/+page.ts
@@ -0,0 +1,12 @@
+import { TagSort, type TagFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, TagSort.Name),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams)
+ };
+}
diff --git a/frontend/src/routes/worlds/+page.svelte b/frontend/src/routes/worlds/+page.svelte
new file mode 100644
index 0000000..e0366e9
--- /dev/null
+++ b/frontend/src/routes/worlds/+page.svelte
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ openModal(AddWorld)} />
+
+
+ {#if worlds}
+
+
+
+ {#each worlds.edges as { id, name }, index (id)}
+
+
+
+
+
+ {:else}
+
+ {/each}
+
+
+
+ {:else}
+
+ {/if}
+
diff --git a/frontend/src/routes/worlds/+page.ts b/frontend/src/routes/worlds/+page.ts
new file mode 100644
index 0000000..3b85f4c
--- /dev/null
+++ b/frontend/src/routes/worlds/+page.ts
@@ -0,0 +1,12 @@
+import { WorldSort, type WorldFilterInput } from '$gql/graphql';
+import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';
+
+export const trailingSlash = 'always';
+
+export function load({ url }: { url: URL; params: Record }) {
+ return {
+ sort: parseSortData(url.searchParams, WorldSort.Name),
+ filter: parseFilter(url.searchParams),
+ pagination: parsePaginationData(url.searchParams)
+ };
+}
--
cgit v1.2.3-2-gb3c3