+
diff --git a/src/pages/home/index.astro b/src/pages/home/index.astro
index 3163211..719ce9d 100644
--- a/src/pages/home/index.astro
+++ b/src/pages/home/index.astro
@@ -1,9 +1,43 @@
---
+import MoviesSearchInput from "../../components/MoviesSearchInput";
+import CardMoviesList from "../../components/lists/movies/CardMoviesList";
import HomeLayout from "../../layouts/HomeLayout.astro";
+import type { Movie } from "../../types";
+const jwt = Astro.cookies.get("jwt")?.value as string;
+const url = new URL(Astro.request.url);
+
+const queryParams = new URLSearchParams();
+const query = url.searchParams.get("q");
+
+if (query) {
+ queryParams.append("q", query);
+}
+
+const res = await fetch(
+ `${import.meta.env.API_URL}/movies?${queryParams.toString()}`,
+ {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${jwt}`,
+ },
+ },
+);
+
+const resBody = (await res.json()) as { movies: Movie[] };
const account = Astro.locals.account;
---
- Hello {account?.username}
+
+
diff --git a/src/pages/home/movies/[id].astro b/src/pages/home/movies/[id].astro
new file mode 100644
index 0000000..5a54344
--- /dev/null
+++ b/src/pages/home/movies/[id].astro
@@ -0,0 +1,61 @@
+---
+import { FaEye } from "react-icons/fa";
+import HomeLayout from "../../../layouts/HomeLayout.astro";
+import type { Movie } from "../../../types";
+
+const jwt = Astro.cookies.get("jwt")?.value as string;
+const { id } = Astro.params;
+
+const res = await fetch(`${import.meta.env.API_URL}/movies/${id}`, {
+ method: "GET",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${jwt}`,
+ },
+});
+
+const movie = (await res.json()).movie as Movie;
+---
+
+
+ <>
+ {movie.title}
+
+ >
+
diff --git a/src/pages/home/settings/movies.astro b/src/pages/home/settings/movies.astro
index 52a09de..e1fc2e0 100644
--- a/src/pages/home/settings/movies.astro
+++ b/src/pages/home/settings/movies.astro
@@ -1,6 +1,5 @@
---
import AddMovieForm from "../../../components/forms/AddMovieForm";
-import TmdbSearch from "../../../components/TmdbSearch";
import HomeLayout from "../../../layouts/HomeLayout.astro";
---
diff --git a/src/pages/index.astro b/src/pages/index.astro
index e80e5d5..446aa3c 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -4,5 +4,5 @@ import EmptyLayout from "../layouts/EmptyLayout.astro";
---
-
+
diff --git a/src/styles/index.css b/src/styles/index.css
new file mode 100644
index 0000000..217912a
--- /dev/null
+++ b/src/styles/index.css
@@ -0,0 +1,27 @@
+.cardshadow {
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
+ transition: box-shadow 0.2s ease-in-out;
+}
+
+.cardshadow:hover {
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
+}
+
+.movieitem {
+ opacity: 0;
+ background-color: rgba(0, 0, 0, 0.75);
+ color: rgba(255, 255, 255, 1);
+}
+
+.movieitem:hover {
+ animation: 0.2s ease-in-out forwards moviehover;
+}
+
+@keyframes moviehover {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+}