+ {/* Header */}
+
+
+ {/* Tittel */}
{title}
+ {/* Stegindikator */}
+
+ {headerContent}
+
+
+ {/* Lukk */}
- {children}
-
+
+ Skjema for å opprette en ny oppskrift
+
+ {/* Innholdet i dialogen */}
+
+ {children}
+
diff --git a/client/src/index.css b/client/src/index.css
index 8bd04d2..a1eecab 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -1,4 +1,5 @@
-@import url('https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&family=Tangerine:wght@400;700&display=swap" rel="stylesheet');
+@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Tangerine:wght@400;700&display=swap');
+
@import "tailwindcss";
@@ -18,7 +19,7 @@
--color-peach: #efd7c4;
/* Typografi */
- --font-heading: "Mrs Saint Delafield", Georgia, serif;
+ --font-heading: "Tangerine", cursive;
--font-body: "DM Sans", Arial, sans-serif;
/* Border radius */
@@ -53,4 +54,65 @@ body {
#root {
min-height: 100vh;
-}
\ No newline at end of file
+}
+
+/* Skjema */
+
+.form-label {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-size: 0.875rem;
+ font-weight: 600;
+}
+
+.form-input {
+ width: 100%;
+ border: 1px solid var(--color-peach);
+ border-radius: var(--radius-medium);
+ background-color: var(--color-background);
+ padding: 0.5rem 1rem;
+ font-size: 0.875rem;
+}
+
+.form-input:focus-visible {
+ outline: 2px solid var(--color-primary);
+}
+
+.upload-button {
+ display: flex;
+ height: 140px;
+ width: 100%;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+
+ border: 1px dashed var(--color-peach);
+ border-radius: var(--radius-medium);
+ background-color: var(--color-background);
+}
+
+.upload-button:hover {
+ background-color: color-mix(
+ in srgb,
+ var(--color-peach) 20%,
+ transparent
+ );
+}
+
+.upload-button:focus-visible {
+ outline: 2px solid var(--color-primary);
+}
+
+.stepper-button {
+ height: 2rem;
+ width: 2rem;
+ border: none;
+ border-radius: var(--radius-small);
+ background-color: var(--color-peach);
+ cursor: pointer;
+}
+
+.stepper-button:hover {
+ background-color: var(--color-pink-light);
+}
+
diff --git a/client/src/routes/HomePage.tsx b/client/src/routes/HomePage.tsx
index 2ee9f82..2b58be0 100644
--- a/client/src/routes/HomePage.tsx
+++ b/client/src/routes/HomePage.tsx
@@ -1,6 +1,54 @@
-// TODO: vise oppskrifter pent men slideshow elns og vise populære oppskrifter
+import { useState } from 'react'
+import { Tag } from '../components/ui/Tag'
+
+
+
export default function HomePage() {
+ const [vegetarSelected, setVegetarSelected] = useState(false)
+ const [middagSelected, setMiddagSelected] = useState(false)
+
return (
-
Hva frister i dag?
- );
-}
+
+
+
+
+ {/* Slideshow-placeholder */}
+
+
+
+
+ {/* Filter-tags */}
+
+ setVegetarSelected(!vegetarSelected)}
+ >
+ Vegetar
+
+
+ setMiddagSelected(!middagSelected)}
+ >
+ Middag
+
+
+ Italiensk
+ Glutenfri
+
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/client/src/routes/NewRecipePage.tsx b/client/src/routes/NewRecipePage.tsx
index 626ba20..f366e07 100644
--- a/client/src/routes/NewRecipePage.tsx
+++ b/client/src/routes/NewRecipePage.tsx
@@ -1,4 +1,273 @@
-// TODO: popup eller skjema for ny oppskrift
-export default function NewRecipePage() {
- return
Ny oppskrift ;
+import { useState } from 'react'
+import { Button } from '../components/ui/Button'
+import { Tag } from '../components/ui/Tag'
+import Rating from '@mui/material/Rating';
+
+const STEPS = ['Oppskrift', 'Ingredienser', 'Fremgangsmåte', 'Publiser']
+const CATEGORIES = ['Frokost','Lunsj','Middag','Dessert','Annet',]
+const TAGS = ['Vegetar','Vegan','Glutenfri','Laktosefri','Under 30 min',]
+export function RecipeStepIndicator() {
+ return (
+
+ {STEPS.map((step, index) => {
+ const active = index === 0
+
+ return (
+
+ {/* Linje mellom stegene */}
+ {index > 0 && (
+
+ )}
+
+
+ {/* Nummer */}
+
+ {index + 1}
+
+
+ {/* Navn */}
+
+ {step}
+
+
+
+ )
+ })}
+
+ )
}
+export default function NewRecipePage() {
+ const [category, setCategory] = useState('Middag')
+ const [selectedTags, setSelectedTags] = useState
([
+ 'Vegetar',
+ 'Glutenfri',
+ ])
+ const [servings, setServings] = useState(4)
+ // Velger eller fjerner en tag
+ const toggleTag = (tag: string) => {
+ if (selectedTags.includes(tag)) {
+ setSelectedTags(
+ selectedTags.filter((item) => item !== tag),
+ )
+ } else {
+ setSelectedTags([...selectedTags, tag])
+ }
+ }
+
+ return (
+
+
+
+ {/* TO KOLONNER */}
+
+ {/* VENSTRE SIDE */}
+
+
+ {/* Bilde */}
+
+
+ Bilde av retten *
+
+
+
+
+ ♧
+
+
+ Last opp bilde
+
+
+
+ {/* Kort beskrivelse */}
+
+
+
+ Kort beskrivelse *
+
+
+
+
+
+ {/* Instagram / TikTok */}
+
+
+ Instagram Reel / TikTok (valgfritt)
+
+
+
+
+
+ Legg til en video hvis du vil vise hvordan retten lages.
+
+
+
+
+
+ {/* HØYRE SIDE */}
+
+ {/* Navn på oppskriften */}
+
+
+ Navn på oppskriften *
+
+
+
+
+
+ {/* Tid og porsjoner */}
+
+ {/* Tid */}
+
+
+ Tid *
+
+
+
+
+
+
+ min
+
+
+
+
+ {/* Porsjoner */}
+
+
+ Porsjoner *
+
+
+
+
+ setServings(Math.max(1, servings - 1))
+ }
+ >
+ −
+
+
+
+ {servings}
+
+
+
+ setServings(servings + 1)
+ }
+ >
+ +
+
+
+
+
+
+
+
+
+ {/* Kategori */}
+
+
+ Kategori *
+
+
+
+ {CATEGORIES.map((item) => (
+ setCategory(item)}
+ >
+ {item}
+
+ ))}
+
+
+
+ {/* Kosthold / tags */}
+
+
Kosthold / tags
+
+
+ {TAGS.map((item) => (
+ toggleTag(item)}
+ >
+ {item}
+
+ ))}
+
+ Ny tag +
+
+
+
+
+
+
+ {/* KNAPPER NEDERST */}
+
+ Lagre utkast
+ Neste: Ingredienser
+
+
+ )
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 3dae684..364ffc7 100644
--- a/package.json
+++ b/package.json
@@ -16,5 +16,10 @@
],
"devDependencies": {
"prettier": "^3.9.9"
+ },
+ "dependencies": {
+ "@emotion/react": "^11.14.0",
+ "@emotion/styled": "^11.14.1",
+ "@mui/material": "^9.4.0"
}
}