diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index da2830d..779cdb0 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -3,6 +3,7 @@
import type { PageData } from './$types';
import ResourceDetails from './components/ResourceDetails/ResourceDetails.svelte';
import ResourceDetailsControls from './ResourceDetailsControls.svelte';
+ import { TMDB_IMAGES } from '$lib/constants';
export let data: PageData;
let movies = data.showcases;
@@ -18,9 +19,7 @@
{:else}
Continue Watching
diff --git a/src/routes/components/IconButton.svelte b/src/routes/components/IconButton.svelte
new file mode 100644
index 0000000..0a7721e
--- /dev/null
+++ b/src/routes/components/IconButton.svelte
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/routes/components/Modal/Modal.svelte b/src/routes/components/Modal/Modal.svelte
new file mode 100644
index 0000000..fcffa47
--- /dev/null
+++ b/src/routes/components/Modal/Modal.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/src/routes/components/Modal/ModalContent.svelte b/src/routes/components/Modal/ModalContent.svelte
new file mode 100644
index 0000000..32ee854
--- /dev/null
+++ b/src/routes/components/Modal/ModalContent.svelte
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/src/routes/components/Navbar.svelte b/src/routes/components/Navbar/Navbar.svelte
similarity index 81%
rename from src/routes/components/Navbar.svelte
rename to src/routes/components/Navbar/Navbar.svelte
index 8181440..1d9a74d 100644
--- a/src/routes/components/Navbar.svelte
+++ b/src/routes/components/Navbar/Navbar.svelte
@@ -2,11 +2,15 @@
import { MagnifyingGlass, Person } from 'radix-icons-svelte';
import classNames from 'classnames';
import { page } from '$app/stores';
+ import TitleSearchModal from './TitleSearchModal.svelte';
+ import IconButton from '../IconButton.svelte';
let y = 0;
let transparent = true;
let baseStyle = '';
+ let isSearchVisible = false;
+
function getLinkStyle(path) {
return $page.url.pathname === path ? 'text-amber-200' : 'hover:text-zinc-50 cursor-pointer';
}
@@ -40,12 +44,14 @@
Sources
Settings
-
-
+
+ (isSearchVisible = true)}>
-
-
+
+
+
diff --git a/src/routes/components/Navbar/TitleSearchModal.svelte b/src/routes/components/Navbar/TitleSearchModal.svelte
new file mode 100644
index 0000000..c4a4192
--- /dev/null
+++ b/src/routes/components/Navbar/TitleSearchModal.svelte
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+ {#if !results || searchValue === ''}
+ No recent searches
+ {:else if results?.length === 0 && !fetching}
+ No search results
+ {:else}
+
+ {#each results.filter((m) => m).slice(0, 5) as result}
+
window.open('/movie/' + result.id)}
+ >
+
+
+
+
{result.original_title}
+
+ {new Date(result.release_date).getFullYear()}
+
+
+
{result.overview}
+
+
+ {/each}
+
+ {/if}
+
+
diff --git a/src/routes/components/ResourceDetails/ResourceDetails.svelte b/src/routes/components/ResourceDetails/ResourceDetails.svelte
index 4f73c96..34ada01 100644
--- a/src/routes/components/ResourceDetails/ResourceDetails.svelte
+++ b/src/routes/components/ResourceDetails/ResourceDetails.svelte
@@ -4,6 +4,7 @@
import { onMount } from 'svelte';
import classNames from 'classnames';
import { fade } from 'svelte/transition';
+ import { TMDB_IMAGES } from '$lib/constants';
export let resource: MovieResource;
export let trailer = true;
@@ -62,9 +63,7 @@
{#if video.key}
diff --git a/src/routes/components/SmallHorizontalPoster/SmallHorizontalPoster.svelte b/src/routes/components/SmallHorizontalPoster/SmallHorizontalPoster.svelte
index 9286438..f1af780 100644
--- a/src/routes/components/SmallHorizontalPoster/SmallHorizontalPoster.svelte
+++ b/src/routes/components/SmallHorizontalPoster/SmallHorizontalPoster.svelte
@@ -2,6 +2,7 @@
import type { TmdbMovieFull } from '$lib/tmdb-api';
import { formatGenres, getRuntime } from '$lib/utils';
import classNames from 'classnames';
+ import { TMDB_IMAGES } from '$lib/constants';
export let tmdbMovie: TmdbMovieFull;
@@ -14,8 +15,7 @@
}
const backdropUrl =
- 'https://www.themoviedb.org/t/p/original' +
- tmdbMovie.images.backdrops.filter((b) => b.iso_639_1 === 'en')[0].file_path;
+ TMDB_IMAGES + tmdbMovie.images.backdrops.filter((b) => b.iso_639_1 === 'en')[0].file_path;
import { TmdbApi } from '$lib/tmdb-api';
import { onMount } from 'svelte';
+ import { TMDB_IMAGES } from '$lib/constants';
export let tmdbId;
export let progress = 0;
@@ -16,7 +17,7 @@
TmdbApi.get('/' + type + '/' + tmdbId)
.then((res) => res.data)
.then((data: any) => {
- bg = 'https://www.themoviedb.org/t/p/original/' + data.poster_path;
+ bg = TMDB_IMAGES + data.poster_path;
title = data.title;
});
});
diff --git a/src/routes/library/+page.svelte b/src/routes/library/+page.svelte
index 81a2bf5..8618a91 100644
--- a/src/routes/library/+page.svelte
+++ b/src/routes/library/+page.svelte
@@ -2,6 +2,7 @@
import type { PageData } from './$types';
import SmallHorizontalPoster from '../components/SmallHorizontalPoster/SmallHorizontalPoster.svelte';
import type { TmdbMovieFull } from '$lib/tmdb-api';
+ import { TMDB_IMAGES } from '$lib/constants.js';
export let data: PageData;
console.log(data);
@@ -25,9 +26,7 @@
const headerStyle = 'uppercase tracking-widest font-bold text-center mt-2';
-
+
diff --git a/tailwind.config.js b/tailwind.config.js
index 61dec0a..c11614f 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -8,7 +8,8 @@ export default {
display: ['Inter', 'system', 'sans-serif']
},
colors: {
- darken: '#070501bf'
+ darken: '#070501bf',
+ 'highlight-dim': '#fde68a20'
}
}
},