From ece10f04a09f951ebf848c7a7744bcc97143b61c Mon Sep 17 00:00:00 2001 From: Casper Date: Mon, 30 Sep 2024 20:00:56 +0200 Subject: [PATCH] [WIP] --- frontend/src/components/DrawerMenu.jsx | 8 ++--- .../src/pages/{Login.jsx => Login/index.jsx} | 0 .../index.jsx} | 4 ++- .../{NotFound.jsx => NotFound/index.jsx} | 0 frontend/src/pages/Recipe/Recipe.css | 10 +++++- frontend/src/pages/Recipe/index.jsx | 31 ++++++++++++++++--- .../{Settings.jsx => Settings/index.jsx} | 0 .../pages/{Splash.jsx => Splash/index.jsx} | 0 8 files changed, 42 insertions(+), 11 deletions(-) rename frontend/src/pages/{Login.jsx => Login/index.jsx} (100%) rename frontend/src/pages/{MealPlanner.jsx => MealPlanner/index.jsx} (50%) rename frontend/src/pages/{NotFound.jsx => NotFound/index.jsx} (100%) rename frontend/src/pages/{Settings.jsx => Settings/index.jsx} (100%) rename frontend/src/pages/{Splash.jsx => Splash/index.jsx} (100%) diff --git a/frontend/src/components/DrawerMenu.jsx b/frontend/src/components/DrawerMenu.jsx index d47dda2..b3b0e4a 100644 --- a/frontend/src/components/DrawerMenu.jsx +++ b/frontend/src/components/DrawerMenu.jsx @@ -14,20 +14,20 @@ function DrawerMenu(props) { - + calendar_month Meal Planner - + menu_book Recipes
- + settings Settings - + logout Log out diff --git a/frontend/src/pages/Login.jsx b/frontend/src/pages/Login/index.jsx similarity index 100% rename from frontend/src/pages/Login.jsx rename to frontend/src/pages/Login/index.jsx diff --git a/frontend/src/pages/MealPlanner.jsx b/frontend/src/pages/MealPlanner/index.jsx similarity index 50% rename from frontend/src/pages/MealPlanner.jsx rename to frontend/src/pages/MealPlanner/index.jsx index 192f2ab..866632d 100644 --- a/frontend/src/pages/MealPlanner.jsx +++ b/frontend/src/pages/MealPlanner/index.jsx @@ -1,7 +1,9 @@ function MealPlanner() { return (
-

MEAL PLANNER

+
+

Meal Planner

+
); } diff --git a/frontend/src/pages/NotFound.jsx b/frontend/src/pages/NotFound/index.jsx similarity index 100% rename from frontend/src/pages/NotFound.jsx rename to frontend/src/pages/NotFound/index.jsx diff --git a/frontend/src/pages/Recipe/Recipe.css b/frontend/src/pages/Recipe/Recipe.css index 9933a17..4b99265 100644 --- a/frontend/src/pages/Recipe/Recipe.css +++ b/frontend/src/pages/Recipe/Recipe.css @@ -1,8 +1,16 @@ -#recipe-controls { +#recipe-close-button { position: absolute; top: 0; right: 0; z-index: 10; + margin: 0; +} + +#recipe-controls { + display: flex; + justify-content: center; + align-items: center; + margin: auto; } #recipe-image { diff --git a/frontend/src/pages/Recipe/index.jsx b/frontend/src/pages/Recipe/index.jsx index ef39784..0071776 100644 --- a/frontend/src/pages/Recipe/index.jsx +++ b/frontend/src/pages/Recipe/index.jsx @@ -1,20 +1,22 @@ -import './Recipe.css'; +import { useParams } from '@solidjs/router'; import { useRecipeContext } from '../../contexts/RecipeContext'; +import './Recipe.css'; + function Recipe() { const { recipeStore } = useRecipeContext(); - const recipe = recipeStore.recipes[0]; + const params = useParams(); + const recipe = recipeStore.recipes[params.id]; return (
-