added content with cool graph :D
This commit is contained in:
@@ -3,9 +3,9 @@ export const immutable = [];
|
|||||||
export const prerendered = [];
|
export const prerendered = [];
|
||||||
|
|
||||||
export const assets = [
|
export const assets = [
|
||||||
|
{"path":"robots.txt"},
|
||||||
{"path":"voidarc-hollow.svg"},
|
{"path":"voidarc-hollow.svg"},
|
||||||
{"path":"adumh00man.png"},
|
{"path":"adumh00man.png"}
|
||||||
{"path":"robots.txt"}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const routes = [
|
export const routes = [
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ globalThis.__sveltekit_dev = {
|
|||||||
env: {
|
env: {
|
||||||
// empty
|
// empty
|
||||||
},
|
},
|
||||||
version: "1793799746966"
|
version: "1793818191005"
|
||||||
};
|
};
|
||||||
@@ -2,7 +2,8 @@
|
|||||||
import type { PageServerLoad } from './$types';
|
import type { PageServerLoad } from './$types';
|
||||||
import { getLatestPlaylistSong, getLatestWatchedSeries } from '#lib/server/jellyfin';
|
import { getLatestPlaylistSong, getLatestWatchedSeries } from '#lib/server/jellyfin';
|
||||||
import { getLatestBook } from '#lib/server/komga';
|
import { getLatestBook } from '#lib/server/komga';
|
||||||
import { fetchBlogArticles, getChannelInfo } from '#lib/server/content';
|
import { getContentItems } from '#lib/server/content';
|
||||||
|
import type { ContentItem } from '#lib/server/content';
|
||||||
import {
|
import {
|
||||||
JELLYFIN_PLAYLIST_ID,
|
JELLYFIN_PLAYLIST_ID,
|
||||||
JELLYFIN_LIBRARY_ID,
|
JELLYFIN_LIBRARY_ID,
|
||||||
@@ -13,21 +14,23 @@ import {
|
|||||||
|
|
||||||
export const load = () => {
|
export const load = () => {
|
||||||
const latestSong = getLatestPlaylistSong(globalThis.fetch, JELLYFIN_PLAYLIST_ID);
|
const latestSong = getLatestPlaylistSong(globalThis.fetch, JELLYFIN_PLAYLIST_ID);
|
||||||
console.log(JELLYFIN_LIBRARY_ID);
|
|
||||||
const latestSeries = getLatestWatchedSeries(globalThis.fetch, JELLYFIN_LIBRARY_ID);
|
const latestSeries = getLatestWatchedSeries(globalThis.fetch, JELLYFIN_LIBRARY_ID);
|
||||||
const latestBook = getLatestBook(globalThis.fetch, KOMGA_LIBRARY_ID);
|
const latestBook = getLatestBook(globalThis.fetch, KOMGA_LIBRARY_ID);
|
||||||
const blogArticles = fetchBlogArticles(BLOG_URL);
|
|
||||||
const info = getChannelInfo(CHANNEL_ID);
|
const contentItems: ContentItem = getContentItems(globalThis.fetch, CHANNEL_ID, BLOG_URL);
|
||||||
|
|
||||||
latestSong.catch(() => {});
|
latestSong.catch(() => {});
|
||||||
latestSeries.catch(() => {});
|
latestSeries.catch(() => {});
|
||||||
latestBook.catch(() => {});
|
latestBook.catch(() => {});
|
||||||
|
|
||||||
|
contentItems.catch(() => {});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
streamed: {
|
streamed: {
|
||||||
latestSong,
|
latestSong,
|
||||||
latestSeries,
|
latestSeries,
|
||||||
latestBook
|
latestBook,
|
||||||
|
contentItems
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
2
node_modules/$app/types/index.d.ts
generated
vendored
2
node_modules/$app/types/index.d.ts
generated
vendored
@@ -18,7 +18,7 @@ declare module "$app/types" {
|
|||||||
};
|
};
|
||||||
Path(): "" | `artwork/${string}` & {} | `books/${string}` & {} | `posters/${string}` & {};
|
Path(): "" | `artwork/${string}` & {} | `books/${string}` & {} | `posters/${string}` & {};
|
||||||
ResolvedPathname(): `${"/" | `/${string}/`}${ReturnType<AppTypes['Path']>}`;
|
ResolvedPathname(): `${"/" | `/${string}/`}${ReturnType<AppTypes['Path']>}`;
|
||||||
AssetPath(): "voidarc-hollow.svg" | "adumh00man.png" | "robots.txt";
|
AssetPath(): "robots.txt" | "voidarc-hollow.svg" | "adumh00man.png";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
46
node_modules/.vite/deps/_metadata.json
generated
vendored
46
node_modules/.vite/deps/_metadata.json
generated
vendored
@@ -1,127 +1,127 @@
|
|||||||
{
|
{
|
||||||
"hash": "0ced44a7",
|
"hash": "4a575b03",
|
||||||
"configHash": "457bb450",
|
"configHash": "ad009091",
|
||||||
"lockfileHash": "639dee1d",
|
"lockfileHash": "639dee1d",
|
||||||
"browserHash": "2cd5c438",
|
"browserHash": "05feef3d",
|
||||||
"optimized": {
|
"optimized": {
|
||||||
"@sveltejs/kit > devalue": {
|
"@sveltejs/kit > devalue": {
|
||||||
"src": "../../devalue/index.js",
|
"src": "../../devalue/index.js",
|
||||||
"file": "@sveltejs_kit_n_devalue.js",
|
"file": "@sveltejs_kit_n_devalue.js",
|
||||||
"fileHash": "077eba68",
|
"fileHash": "18e5ce1c",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"@sveltejs/kit > esm-env": {
|
"@sveltejs/kit > esm-env": {
|
||||||
"src": "../../esm-env/index.js",
|
"src": "../../esm-env/index.js",
|
||||||
"file": "@sveltejs_kit_n_esm-env.js",
|
"file": "@sveltejs_kit_n_esm-env.js",
|
||||||
"fileHash": "a4cf7607",
|
"fileHash": "213b1794",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte": {
|
"svelte": {
|
||||||
"src": "../../svelte/src/index-client.js",
|
"src": "../../svelte/src/index-client.js",
|
||||||
"file": "svelte.js",
|
"file": "svelte.js",
|
||||||
"fileHash": "421b260f",
|
"fileHash": "360a8b4b",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/animate": {
|
"svelte/animate": {
|
||||||
"src": "../../svelte/src/animate/index.js",
|
"src": "../../svelte/src/animate/index.js",
|
||||||
"file": "svelte_animate.js",
|
"file": "svelte_animate.js",
|
||||||
"fileHash": "d761958c",
|
"fileHash": "f58f932f",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/attachments": {
|
"svelte/attachments": {
|
||||||
"src": "../../svelte/src/attachments/index.js",
|
"src": "../../svelte/src/attachments/index.js",
|
||||||
"file": "svelte_attachments.js",
|
"file": "svelte_attachments.js",
|
||||||
"fileHash": "40dec634",
|
"fileHash": "e974f528",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/easing": {
|
"svelte/easing": {
|
||||||
"src": "../../svelte/src/easing/index.js",
|
"src": "../../svelte/src/easing/index.js",
|
||||||
"file": "svelte_easing.js",
|
"file": "svelte_easing.js",
|
||||||
"fileHash": "753941bf",
|
"fileHash": "4e0f2ace",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/events": {
|
"svelte/events": {
|
||||||
"src": "../../svelte/src/events/index.js",
|
"src": "../../svelte/src/events/index.js",
|
||||||
"file": "svelte_events.js",
|
"file": "svelte_events.js",
|
||||||
"fileHash": "874101d9",
|
"fileHash": "cf87672c",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal": {
|
"svelte/internal": {
|
||||||
"src": "../../svelte/src/internal/index.js",
|
"src": "../../svelte/src/internal/index.js",
|
||||||
"file": "svelte_internal.js",
|
"file": "svelte_internal.js",
|
||||||
"fileHash": "66d8aa91",
|
"fileHash": "c7886738",
|
||||||
"needsInterop": true
|
"needsInterop": true
|
||||||
},
|
},
|
||||||
"svelte/internal/client": {
|
"svelte/internal/client": {
|
||||||
"src": "../../svelte/src/internal/client/index.js",
|
"src": "../../svelte/src/internal/client/index.js",
|
||||||
"file": "svelte_internal_client.js",
|
"file": "svelte_internal_client.js",
|
||||||
"fileHash": "9aa5233d",
|
"fileHash": "458e73ff",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/disclose-version": {
|
"svelte/internal/disclose-version": {
|
||||||
"src": "../../svelte/src/internal/disclose-version.js",
|
"src": "../../svelte/src/internal/disclose-version.js",
|
||||||
"file": "svelte_internal_disclose-version.js",
|
"file": "svelte_internal_disclose-version.js",
|
||||||
"fileHash": "9d777fc3",
|
"fileHash": "3524a2e0",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/flags/async": {
|
"svelte/internal/flags/async": {
|
||||||
"src": "../../svelte/src/internal/flags/async.js",
|
"src": "../../svelte/src/internal/flags/async.js",
|
||||||
"file": "svelte_internal_flags_async.js",
|
"file": "svelte_internal_flags_async.js",
|
||||||
"fileHash": "870fd5c6",
|
"fileHash": "34ea823c",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/flags/legacy": {
|
"svelte/internal/flags/legacy": {
|
||||||
"src": "../../svelte/src/internal/flags/legacy.js",
|
"src": "../../svelte/src/internal/flags/legacy.js",
|
||||||
"file": "svelte_internal_flags_legacy.js",
|
"file": "svelte_internal_flags_legacy.js",
|
||||||
"fileHash": "dad1c00c",
|
"fileHash": "6b70aded",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/flags/tracing": {
|
"svelte/internal/flags/tracing": {
|
||||||
"src": "../../svelte/src/internal/flags/tracing.js",
|
"src": "../../svelte/src/internal/flags/tracing.js",
|
||||||
"file": "svelte_internal_flags_tracing.js",
|
"file": "svelte_internal_flags_tracing.js",
|
||||||
"fileHash": "fbd2f1f5",
|
"fileHash": "44339d78",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/legacy": {
|
"svelte/legacy": {
|
||||||
"src": "../../svelte/src/legacy/legacy-client.js",
|
"src": "../../svelte/src/legacy/legacy-client.js",
|
||||||
"file": "svelte_legacy.js",
|
"file": "svelte_legacy.js",
|
||||||
"fileHash": "dd491873",
|
"fileHash": "f2f289c1",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/motion": {
|
"svelte/motion": {
|
||||||
"src": "../../svelte/src/motion/index.js",
|
"src": "../../svelte/src/motion/index.js",
|
||||||
"file": "svelte_motion.js",
|
"file": "svelte_motion.js",
|
||||||
"fileHash": "2be2366e",
|
"fileHash": "c4cb6258",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte > clsx": {
|
"svelte > clsx": {
|
||||||
"src": "../../clsx/dist/clsx.mjs",
|
"src": "../../clsx/dist/clsx.mjs",
|
||||||
"file": "svelte_n_clsx.js",
|
"file": "svelte_n_clsx.js",
|
||||||
"fileHash": "51f7865c",
|
"fileHash": "852accfb",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/reactivity": {
|
"svelte/reactivity": {
|
||||||
"src": "../../svelte/src/reactivity/index-client.js",
|
"src": "../../svelte/src/reactivity/index-client.js",
|
||||||
"file": "svelte_reactivity.js",
|
"file": "svelte_reactivity.js",
|
||||||
"fileHash": "6427ee44",
|
"fileHash": "a5cb57a3",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/reactivity/window": {
|
"svelte/reactivity/window": {
|
||||||
"src": "../../svelte/src/reactivity/window/index.js",
|
"src": "../../svelte/src/reactivity/window/index.js",
|
||||||
"file": "svelte_reactivity_window.js",
|
"file": "svelte_reactivity_window.js",
|
||||||
"fileHash": "3006f4a4",
|
"fileHash": "a233b414",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/store": {
|
"svelte/store": {
|
||||||
"src": "../../svelte/src/store/index-client.js",
|
"src": "../../svelte/src/store/index-client.js",
|
||||||
"file": "svelte_store.js",
|
"file": "svelte_store.js",
|
||||||
"fileHash": "92bd9482",
|
"fileHash": "37656487",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/transition": {
|
"svelte/transition": {
|
||||||
"src": "../../svelte/src/transition/index.js",
|
"src": "../../svelte/src/transition/index.js",
|
||||||
"file": "svelte_transition.js",
|
"file": "svelte_transition.js",
|
||||||
"fileHash": "8f073a86",
|
"fileHash": "6b011d62",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
46
node_modules/.vite/deps_ssr/_metadata.json
generated
vendored
46
node_modules/.vite/deps_ssr/_metadata.json
generated
vendored
@@ -1,127 +1,127 @@
|
|||||||
{
|
{
|
||||||
"hash": "3e7a0d0d",
|
"hash": "d1bc081a",
|
||||||
"configHash": "8e25bbcd",
|
"configHash": "33341ae9",
|
||||||
"lockfileHash": "639dee1d",
|
"lockfileHash": "639dee1d",
|
||||||
"browserHash": "27857297",
|
"browserHash": "62468ded",
|
||||||
"optimized": {
|
"optimized": {
|
||||||
"svelte": {
|
"svelte": {
|
||||||
"src": "../../svelte/src/index-server.js",
|
"src": "../../svelte/src/index-server.js",
|
||||||
"file": "svelte.js",
|
"file": "svelte.js",
|
||||||
"fileHash": "d22346d3",
|
"fileHash": "3bcb089c",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/animate": {
|
"svelte/animate": {
|
||||||
"src": "../../svelte/src/animate/index.js",
|
"src": "../../svelte/src/animate/index.js",
|
||||||
"file": "svelte_animate.js",
|
"file": "svelte_animate.js",
|
||||||
"fileHash": "e765e3ef",
|
"fileHash": "8cafd7ad",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/attachments": {
|
"svelte/attachments": {
|
||||||
"src": "../../svelte/src/attachments/index.js",
|
"src": "../../svelte/src/attachments/index.js",
|
||||||
"file": "svelte_attachments.js",
|
"file": "svelte_attachments.js",
|
||||||
"fileHash": "230d11ca",
|
"fileHash": "12d2e676",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/compiler": {
|
"svelte/compiler": {
|
||||||
"src": "../../svelte/src/compiler/index.js",
|
"src": "../../svelte/src/compiler/index.js",
|
||||||
"file": "svelte_compiler.js",
|
"file": "svelte_compiler.js",
|
||||||
"fileHash": "16b968d1",
|
"fileHash": "64ca12fc",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/easing": {
|
"svelte/easing": {
|
||||||
"src": "../../svelte/src/easing/index.js",
|
"src": "../../svelte/src/easing/index.js",
|
||||||
"file": "svelte_easing.js",
|
"file": "svelte_easing.js",
|
||||||
"fileHash": "318452c3",
|
"fileHash": "422f6a4d",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/events": {
|
"svelte/events": {
|
||||||
"src": "../../svelte/src/events/index.js",
|
"src": "../../svelte/src/events/index.js",
|
||||||
"file": "svelte_events.js",
|
"file": "svelte_events.js",
|
||||||
"fileHash": "b44561dd",
|
"fileHash": "c5b9aff7",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal": {
|
"svelte/internal": {
|
||||||
"src": "../../svelte/src/internal/index.js",
|
"src": "../../svelte/src/internal/index.js",
|
||||||
"file": "svelte_internal.js",
|
"file": "svelte_internal.js",
|
||||||
"fileHash": "1f57385d",
|
"fileHash": "ef810521",
|
||||||
"needsInterop": true
|
"needsInterop": true
|
||||||
},
|
},
|
||||||
"svelte/internal/client": {
|
"svelte/internal/client": {
|
||||||
"src": "../../svelte/src/internal/client/index.js",
|
"src": "../../svelte/src/internal/client/index.js",
|
||||||
"file": "svelte_internal_client.js",
|
"file": "svelte_internal_client.js",
|
||||||
"fileHash": "4bd4ef05",
|
"fileHash": "c553ffd0",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/disclose-version": {
|
"svelte/internal/disclose-version": {
|
||||||
"src": "../../svelte/src/internal/disclose-version.js",
|
"src": "../../svelte/src/internal/disclose-version.js",
|
||||||
"file": "svelte_internal_disclose-version.js",
|
"file": "svelte_internal_disclose-version.js",
|
||||||
"fileHash": "0a695c1d",
|
"fileHash": "2059fb32",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/flags/async": {
|
"svelte/internal/flags/async": {
|
||||||
"src": "../../svelte/src/internal/flags/async.js",
|
"src": "../../svelte/src/internal/flags/async.js",
|
||||||
"file": "svelte_internal_flags_async.js",
|
"file": "svelte_internal_flags_async.js",
|
||||||
"fileHash": "da9d06e5",
|
"fileHash": "af29dde1",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/flags/legacy": {
|
"svelte/internal/flags/legacy": {
|
||||||
"src": "../../svelte/src/internal/flags/legacy.js",
|
"src": "../../svelte/src/internal/flags/legacy.js",
|
||||||
"file": "svelte_internal_flags_legacy.js",
|
"file": "svelte_internal_flags_legacy.js",
|
||||||
"fileHash": "17637ba5",
|
"fileHash": "e37a2b6c",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/flags/tracing": {
|
"svelte/internal/flags/tracing": {
|
||||||
"src": "../../svelte/src/internal/flags/tracing.js",
|
"src": "../../svelte/src/internal/flags/tracing.js",
|
||||||
"file": "svelte_internal_flags_tracing.js",
|
"file": "svelte_internal_flags_tracing.js",
|
||||||
"fileHash": "1e1653ad",
|
"fileHash": "bbd79bf4",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/internal/server": {
|
"svelte/internal/server": {
|
||||||
"src": "../../svelte/src/internal/server/index.js",
|
"src": "../../svelte/src/internal/server/index.js",
|
||||||
"file": "svelte_internal_server.js",
|
"file": "svelte_internal_server.js",
|
||||||
"fileHash": "6227ee1c",
|
"fileHash": "235c7ccc",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/legacy": {
|
"svelte/legacy": {
|
||||||
"src": "../../svelte/src/legacy/legacy-server.js",
|
"src": "../../svelte/src/legacy/legacy-server.js",
|
||||||
"file": "svelte_legacy.js",
|
"file": "svelte_legacy.js",
|
||||||
"fileHash": "07215f21",
|
"fileHash": "03f9ab95",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/motion": {
|
"svelte/motion": {
|
||||||
"src": "../../svelte/src/motion/index.js",
|
"src": "../../svelte/src/motion/index.js",
|
||||||
"file": "svelte_motion.js",
|
"file": "svelte_motion.js",
|
||||||
"fileHash": "1b3e4942",
|
"fileHash": "2eed1898",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/reactivity": {
|
"svelte/reactivity": {
|
||||||
"src": "../../svelte/src/reactivity/index-server.js",
|
"src": "../../svelte/src/reactivity/index-server.js",
|
||||||
"file": "svelte_reactivity.js",
|
"file": "svelte_reactivity.js",
|
||||||
"fileHash": "8c82a551",
|
"fileHash": "81f9cc19",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/reactivity/window": {
|
"svelte/reactivity/window": {
|
||||||
"src": "../../svelte/src/reactivity/window/index.js",
|
"src": "../../svelte/src/reactivity/window/index.js",
|
||||||
"file": "svelte_reactivity_window.js",
|
"file": "svelte_reactivity_window.js",
|
||||||
"fileHash": "365c4854",
|
"fileHash": "22c98bed",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/server": {
|
"svelte/server": {
|
||||||
"src": "../../svelte/src/server/index.js",
|
"src": "../../svelte/src/server/index.js",
|
||||||
"file": "svelte_server.js",
|
"file": "svelte_server.js",
|
||||||
"fileHash": "7bcc9525",
|
"fileHash": "0700a002",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/store": {
|
"svelte/store": {
|
||||||
"src": "../../svelte/src/store/index-server.js",
|
"src": "../../svelte/src/store/index-server.js",
|
||||||
"file": "svelte_store.js",
|
"file": "svelte_store.js",
|
||||||
"fileHash": "1f5a01dd",
|
"fileHash": "1e270fb5",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
},
|
},
|
||||||
"svelte/transition": {
|
"svelte/transition": {
|
||||||
"src": "../../svelte/src/transition/index.js",
|
"src": "../../svelte/src/transition/index.js",
|
||||||
"file": "svelte_transition.js",
|
"file": "svelte_transition.js",
|
||||||
"fileHash": "8f973c44",
|
"fileHash": "df7a9a2c",
|
||||||
"needsInterop": false
|
"needsInterop": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
import { XMLParser } from 'fast-xml-parser';
|
import { XMLParser } from 'fast-xml-parser';
|
||||||
import { GOOGLE_API_KEY } from '$app/env/private';
|
import { GOOGLE_API_KEY } from '$app/env/private';
|
||||||
|
|
||||||
|
export interface ContentItem {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
published: Date;
|
||||||
|
image: string | undefined;
|
||||||
|
link: string;
|
||||||
|
}
|
||||||
|
|
||||||
const parser = new XMLParser({
|
const parser = new XMLParser({
|
||||||
ignoreAttributes: false,
|
ignoreAttributes: false,
|
||||||
attributeNamePrefix: '@_',
|
attributeNamePrefix: '@_',
|
||||||
@@ -8,7 +16,7 @@ const parser = new XMLParser({
|
|||||||
trimValues: true
|
trimValues: true
|
||||||
});
|
});
|
||||||
|
|
||||||
async function fetchXml(url: string) {
|
async function fetchXml(fetch: typeof globalThis.fetch, url: string) {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -20,16 +28,80 @@ async function fetchXml(url: string) {
|
|||||||
return parser.parse(xmlText);
|
return parser.parse(xmlText);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function fetchBlogArticles(url: string) {
|
async function fetchBlogArticles(fetch: typeof globalThis.fetch, url: string) {
|
||||||
const blogArticles = await fetchXml(url);
|
// Need to make into interface
|
||||||
|
const blogArticles = await fetchXml(fetch, url);
|
||||||
|
|
||||||
|
let items: ContentItem[] = [];
|
||||||
|
for (let article of blogArticles.rss.channel.item) {
|
||||||
|
items.push({
|
||||||
|
title: article.title,
|
||||||
|
description: article.description,
|
||||||
|
published: new Date(article.pubDate),
|
||||||
|
link: article.link,
|
||||||
|
image: undefined
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return items.slice(0, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getChannelInfo(channelId: string) {
|
async function getContentPlaylistId(fetch: typeof globalThis.fetch, channelId: string) {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=${channelId}&key=${GOOGLE_API_KEY}`
|
`https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=${channelId}&key=${GOOGLE_API_KEY}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`Failed to get Channel Information: ${response.status}`);
|
throw new Error(`Failed to get Channel Information: ${response.status}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Channel uploads collection
|
||||||
|
return data.items[0].contentDetails.relatedPlaylists.uploads;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getLatestContent(
|
||||||
|
fetch: typeof globalThis.fetch,
|
||||||
|
channelId: string
|
||||||
|
): Promise<ContentItem[]> {
|
||||||
|
const playlistId = await getContentPlaylistId(fetch, channelId);
|
||||||
|
|
||||||
|
const response = await fetch(
|
||||||
|
`https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&playlistId=${playlistId}&maxResults=5&key=${GOOGLE_API_KEY}`
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Failed to get Channel Content: ${response.status}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
let items: ContentItem[] = [];
|
||||||
|
for (let video of data.items) {
|
||||||
|
const info = video.snippet;
|
||||||
|
|
||||||
|
items.push({
|
||||||
|
title: info.title,
|
||||||
|
description: info.description.split('\n')[0],
|
||||||
|
published: new Date(info.publishedAt),
|
||||||
|
image: info.thumbnails.default.url,
|
||||||
|
link: `https://www.youtube.com/watch?v=${info.resourceId.videoId}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getContentItems(
|
||||||
|
fetch: typeof globalThis.fetch,
|
||||||
|
channelId: string,
|
||||||
|
blogUrl: string
|
||||||
|
): Promise<ContentItem[]> {
|
||||||
|
const latestVideos = await getLatestContent(fetch, channelId);
|
||||||
|
const blogArticles = await fetchBlogArticles(fetch, blogUrl);
|
||||||
|
|
||||||
|
let finalArray = [...latestVideos, ...blogArticles];
|
||||||
|
|
||||||
|
finalArray.sort((a, b) => b.published.getTime() - a.published.getTime());
|
||||||
|
|
||||||
|
return finalArray.slice(0, 5);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import type { PageServerLoad } from './$types';
|
import type { PageServerLoad } from './$types';
|
||||||
import { getLatestPlaylistSong, getLatestWatchedSeries } from '#lib/server/jellyfin';
|
import { getLatestPlaylistSong, getLatestWatchedSeries } from '#lib/server/jellyfin';
|
||||||
import { getLatestBook } from '#lib/server/komga';
|
import { getLatestBook } from '#lib/server/komga';
|
||||||
import { fetchBlogArticles, getChannelInfo } from '#lib/server/content';
|
import { getContentItems } from '#lib/server/content';
|
||||||
|
import type { ContentItem } from '#lib/server/content';
|
||||||
import {
|
import {
|
||||||
JELLYFIN_PLAYLIST_ID,
|
JELLYFIN_PLAYLIST_ID,
|
||||||
JELLYFIN_LIBRARY_ID,
|
JELLYFIN_LIBRARY_ID,
|
||||||
@@ -12,21 +13,23 @@ import {
|
|||||||
|
|
||||||
export const load: PageServerLoad = () => {
|
export const load: PageServerLoad = () => {
|
||||||
const latestSong = getLatestPlaylistSong(globalThis.fetch, JELLYFIN_PLAYLIST_ID);
|
const latestSong = getLatestPlaylistSong(globalThis.fetch, JELLYFIN_PLAYLIST_ID);
|
||||||
console.log(JELLYFIN_LIBRARY_ID);
|
|
||||||
const latestSeries = getLatestWatchedSeries(globalThis.fetch, JELLYFIN_LIBRARY_ID);
|
const latestSeries = getLatestWatchedSeries(globalThis.fetch, JELLYFIN_LIBRARY_ID);
|
||||||
const latestBook = getLatestBook(globalThis.fetch, KOMGA_LIBRARY_ID);
|
const latestBook = getLatestBook(globalThis.fetch, KOMGA_LIBRARY_ID);
|
||||||
const blogArticles = fetchBlogArticles(BLOG_URL);
|
|
||||||
const info = getChannelInfo(CHANNEL_ID);
|
const contentItems: ContentItem = getContentItems(globalThis.fetch, CHANNEL_ID, BLOG_URL);
|
||||||
|
|
||||||
latestSong.catch(() => {});
|
latestSong.catch(() => {});
|
||||||
latestSeries.catch(() => {});
|
latestSeries.catch(() => {});
|
||||||
latestBook.catch(() => {});
|
latestBook.catch(() => {});
|
||||||
|
|
||||||
|
contentItems.catch(() => {});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
streamed: {
|
streamed: {
|
||||||
latestSong,
|
latestSong,
|
||||||
latestSeries,
|
latestSeries,
|
||||||
latestBook
|
latestBook,
|
||||||
|
contentItems
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
<div class="absolute aspect-[2/1.732] h-40 text-ctp-surface0">
|
<div class="absolute aspect-[2/1.732] h-40 text-ctp-surface0">
|
||||||
{@html voidarcIcon}
|
{@html voidarcIcon}
|
||||||
</div>
|
</div>
|
||||||
<span class="absolute">[VOIDARC INCORPORATED]</span>
|
<span class="absolute text-ctp-mauve">[VOIDARC INCORPORATED]</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-6 mx-auto grid max-w-6xl grid-cols-1 grid-rows-3 gap-5">
|
<div class="m-6 mx-auto grid max-w-6xl grid-flow-row auto-rows-min gap-5">
|
||||||
<div
|
<div
|
||||||
class="main-container grid grid-cols-[2fr_1fr] py-7 pl-10"
|
class="main-container grid grid-cols-[2fr_1fr] py-7 pl-10"
|
||||||
style="--container-color:var(--ctp-mauve);"
|
style="--container-color:var(--ctp-mauve);"
|
||||||
@@ -162,7 +162,11 @@
|
|||||||
<div class="grid grid-cols-[4fr_3fr] grid-rows-1 gap-4">
|
<div class="grid grid-cols-[4fr_3fr] grid-rows-1 gap-4">
|
||||||
<div class="main-container" style="--container-color:var(--ctp-blue);">
|
<div class="main-container" style="--container-color:var(--ctp-blue);">
|
||||||
<div class="section-title fira-mono-bold mr-3 py-2 text-4xl">Content</div>
|
<div class="section-title fira-mono-bold mr-3 py-2 text-4xl">Content</div>
|
||||||
<Content items={['some']} />
|
{#await data.streamed.contentItems}
|
||||||
|
<p>Loading latest Content...</p>
|
||||||
|
{:then items}
|
||||||
|
<Content {items} />
|
||||||
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
<div class="main-container" style="--container-color:var(--ctp-green);">
|
<div class="main-container" style="--container-color:var(--ctp-green);">
|
||||||
<div class="section-title fira-mono-bold mr-3 py-2 text-4xl">Commits</div>
|
<div class="section-title fira-mono-bold mr-3 py-2 text-4xl">Commits</div>
|
||||||
|
|||||||
@@ -1,5 +1,118 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
let { items } = $props();
|
import type { ContentItem } from './types';
|
||||||
|
|
||||||
|
let { items }: { items: ContentItem[] } = $props();
|
||||||
|
|
||||||
|
let containerElement: HTMLDivElement;
|
||||||
|
let cardElements = $state<HTMLElement[]>([]);
|
||||||
|
|
||||||
|
let graphHeight = $state(0);
|
||||||
|
let nodePositions = $state<{ x: number; y: number }[]>([]);
|
||||||
|
|
||||||
|
// Measure the actual centre of every article card.
|
||||||
|
$effect(() => {
|
||||||
|
const currentItems = items;
|
||||||
|
const cards = cardElements.filter(Boolean);
|
||||||
|
const container = containerElement;
|
||||||
|
|
||||||
|
if (!container || cards.length !== currentItems.length) return;
|
||||||
|
|
||||||
|
function updatePositions() {
|
||||||
|
const containerRect = container.getBoundingClientRect();
|
||||||
|
|
||||||
|
nodePositions = cards.map((card) => {
|
||||||
|
const rect = card.getBoundingClientRect();
|
||||||
|
|
||||||
|
return {
|
||||||
|
x: 16,
|
||||||
|
y: rect.top - containerRect.top + rect.height / 2
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
graphHeight = container.scrollHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initial measurement.
|
||||||
|
updatePositions();
|
||||||
|
|
||||||
|
// Watch for changes in card or container dimensions.
|
||||||
|
const observer = new ResizeObserver(updatePositions);
|
||||||
|
|
||||||
|
observer.observe(container);
|
||||||
|
cards.forEach((card) => observer.observe(card));
|
||||||
|
|
||||||
|
// Also handle viewport changes.
|
||||||
|
window.addEventListener('resize', updatePositions);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
observer.disconnect();
|
||||||
|
window.removeEventListener('resize', updatePositions);
|
||||||
|
};
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>{items[0]}</div>
|
<div bind:this={containerElement} class="relative mt-1">
|
||||||
|
<!-- SVG timeline overlay -->
|
||||||
|
<svg
|
||||||
|
class="pointer-events-none absolute top-0 left-0 z-0 overflow-visible"
|
||||||
|
width="32"
|
||||||
|
height={graphHeight}
|
||||||
|
viewBox={`0 0 32 ${graphHeight}`}
|
||||||
|
>
|
||||||
|
<!-- Connecting lines -->
|
||||||
|
{#each nodePositions as node, index}
|
||||||
|
{#if nodePositions[index + 1]}
|
||||||
|
<line
|
||||||
|
x1={node.x}
|
||||||
|
y1={node.y}
|
||||||
|
x2={nodePositions[index + 1].x}
|
||||||
|
y2={nodePositions[index + 1].y}
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="3"
|
||||||
|
class="text-ctp-mauve"
|
||||||
|
stroke-linecap="round"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
{/each}
|
||||||
|
|
||||||
|
<!-- Commit nodes -->
|
||||||
|
{#each nodePositions as node}
|
||||||
|
<circle
|
||||||
|
cx={node.x}
|
||||||
|
cy={node.y}
|
||||||
|
r="10"
|
||||||
|
fill="#313244"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="3"
|
||||||
|
class="text-ctp-mauve"
|
||||||
|
/>
|
||||||
|
{/each}
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<!-- Article list -->
|
||||||
|
<div class="mt-3 mr-4 grid grid-flow-row auto-rows-min">
|
||||||
|
{#each items as item, index (item.link)}
|
||||||
|
<div class="relative z-10 grid grid-cols-[2rem_minmax(0,1fr)] gap-4 pb-5">
|
||||||
|
<!-- Timeline space -->
|
||||||
|
<div></div>
|
||||||
|
|
||||||
|
<!-- Article card -->
|
||||||
|
<div bind:this={cardElements[index]} class="min-w-0">
|
||||||
|
<a href={item.link} class="group dynamic-container block bg-ctp-surface1 p-3">
|
||||||
|
<p class="font-medium group-hover:underline">
|
||||||
|
{item.title}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="text-muted-foreground mt-1 text-sm">
|
||||||
|
{item.description}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="text-muted-foreground mt-2 text-xs">
|
||||||
|
{item.published.toLocaleDateString()}
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -141,6 +141,11 @@
|
|||||||
aspect-ratio: 20/5;
|
aspect-ratio: 20/5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dynamic-container {
|
||||||
|
--container-color: var(--ctp-lavender);
|
||||||
|
border-left: 5px solid var(--container-color);
|
||||||
|
}
|
||||||
|
|
||||||
.text-link {
|
.text-link {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: var(--ctp-blue);
|
color: var(--ctp-blue);
|
||||||
|
|||||||
Reference in New Issue
Block a user