From 81eeff428e4b621503cf7bfedd2c504ff29889a2 Mon Sep 17 00:00:00 2001 From: Mitko Nikov Date: Mon, 12 Feb 2024 23:05:59 +0100 Subject: [PATCH] Query data from our server. --- cinefolio2/src/app.css | 2 +- cinefolio2/src/components/Hoverable.svelte | 1 + cinefolio2/src/components/Playlist.svelte | 54 +++++----- cinefolio2/src/components/Slide.svelte | 112 ++++++++++++++++++--- cinefolio2/src/lib/constants.ts | 2 + cinefolio2/src/routes/+page.svelte | 42 ++++---- cinefolio2/src/types/film.ts | 16 +-- cinefolio2/src/types/playlist.ts | 5 + 8 files changed, 164 insertions(+), 70 deletions(-) create mode 100644 cinefolio2/src/lib/constants.ts create mode 100644 cinefolio2/src/types/playlist.ts diff --git a/cinefolio2/src/app.css b/cinefolio2/src/app.css index 3d6598e..cb57965 100644 --- a/cinefolio2/src/app.css +++ b/cinefolio2/src/app.css @@ -10,7 +10,7 @@ html, body { body { margin: 0; box-sizing: border-box; - overflow: hidden; + overflow-x: hidden; } main { diff --git a/cinefolio2/src/components/Hoverable.svelte b/cinefolio2/src/components/Hoverable.svelte index b19ec8a..a604cd7 100644 --- a/cinefolio2/src/components/Hoverable.svelte +++ b/cinefolio2/src/components/Hoverable.svelte @@ -18,5 +18,6 @@ \ No newline at end of file diff --git a/cinefolio2/src/components/Playlist.svelte b/cinefolio2/src/components/Playlist.svelte index dcb0a67..d65730c 100644 --- a/cinefolio2/src/components/Playlist.svelte +++ b/cinefolio2/src/components/Playlist.svelte @@ -1,13 +1,13 @@
-
{displayName}
-
- {#if splideInit} + {#if splideInit} +
{playlist.name}
+
{#each videos as video} @@ -68,8 +66,8 @@ {/each} - {/if} -
+
+ {/if}
diff --git a/cinefolio2/src/lib/constants.ts b/cinefolio2/src/lib/constants.ts new file mode 100644 index 0000000..866e714 --- /dev/null +++ b/cinefolio2/src/lib/constants.ts @@ -0,0 +1,2 @@ +export const API_URL = 'http://85.31.239.84/cinefolio/api'; +export const STATIC_URL = 'http://85.31.239.84/cinefolio/public'; diff --git a/cinefolio2/src/routes/+page.svelte b/cinefolio2/src/routes/+page.svelte index b4520e3..4747f7c 100644 --- a/cinefolio2/src/routes/+page.svelte +++ b/cinefolio2/src/routes/+page.svelte @@ -1,38 +1,38 @@
-
-
- - + {#each playlists as playlist} + + {/each}