diff --git a/client/package.json b/client/package.json index a7344b5..6e56449 100644 --- a/client/package.json +++ b/client/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@apollo/client": "^4.3.1", + "@mui/icons-material": "^9.4.0", "@radix-ui/react-dialog": "^1.1.23", "@tailwindcss/vite": "^4.3.3", "embla-carousel-autoplay": "^8.6.0", diff --git a/client/src/components/recipe/RecipeDetail.tsx b/client/src/components/recipe/RecipeDetail.tsx index 0ccda48..5a96972 100644 --- a/client/src/components/recipe/RecipeDetail.tsx +++ b/client/src/components/recipe/RecipeDetail.tsx @@ -1,4 +1,6 @@ import type { Recipe } from '../../types/recipe'; +import RestaurantIcon from '@mui/icons-material/Restaurant'; +import AccessTimeIcon from '@mui/icons-material/AccessTime'; // Sier hva komponenten får inn. type RecipeDetailProps = { @@ -21,8 +23,8 @@ export function RecipeDetail({ recipe }: RecipeDetailProps) {

{recipe.description}

-

{recipe.prepTime} minutter

-

{recipe.portions} porsjoner

+

{recipe.prepTime} minutter

+

{recipe.portions} porsjoner

diff --git a/client/src/components/slideshow/RecipeSlideshow.tsx b/client/src/components/slideshow/RecipeSlideshow.tsx index 1402791..27a04e8 100644 --- a/client/src/components/slideshow/RecipeSlideshow.tsx +++ b/client/src/components/slideshow/RecipeSlideshow.tsx @@ -2,6 +2,10 @@ import type { Recipe } from '../../types/recipe'; import useEmblaCarousel from 'embla-carousel-react'; import { Link } from 'react-router'; import { useEffect, useState } from 'react'; +import AccessTimeIcon from '@mui/icons-material/AccessTime'; +import RestaurantIcon from '@mui/icons-material/Restaurant'; +import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; +import ArrowBackIcon from '@mui/icons-material/ArrowBack'; // Fargetemaer for slidesene. panel er tekstboksen, button er knappen for å se en oppskrift type SlideshowTheme = 'light' | 'dark' | 'rose'; @@ -49,17 +53,24 @@ export function RecipeSlideshow({ recipes, reversed = false, theme = 'light' }: {recipes.map((recipe) => ( // Én slide som bruker hele bredden i vinduet
-
+
{/* Tomt alternativ for bildet, ettersom tittelen allerede står rett ved siden av bildet. */} - +

{recipe.title}

{recipe.description}

-

{recipe.prepTime} min

-

{recipe.portions} porsjoner

+

{recipe.prepTime} min

+

{recipe.portions} porsjoner

- Se oppskrift +
    + {recipe.tags.map((tag) => ( +
  • + {tag.tagName} +
  • + ))} +
+ Se oppskrift
@@ -74,7 +85,7 @@ export function RecipeSlideshow({ recipes, reversed = false, theme = 'light' }: onClick={() => emblaApi?.scrollPrev()} className="absolute left-4 top-1/2 -translate-y-1/2 flex h-12 w-12 items-center justify-center rounded-full bg-background/80 hover:bg-background focus-visible:outline-2 focus-visible:outline-primary" > - ← + {/* Prikker: én prikk per oppskrift. Den siden som vises er fylt inn. Dersom du trykker på en annen prikk hopper du til den siden. */} diff --git a/client/src/routes/HomePage.tsx b/client/src/routes/HomePage.tsx index f1f7d3c..bbbdac4 100644 --- a/client/src/routes/HomePage.tsx +++ b/client/src/routes/HomePage.tsx @@ -14,11 +14,9 @@ export default function HomePage() {
-
- - - -
+ + +