setSheet(false)} style={{ position:'absolute', inset:0, background:'rgba(20,14,16,0.3)', zIndex:30 }}/>
setSheet(false)} style={{ width:'100%', height:57, border:'none', background:'transparent',
fontSize:20, color:'#000', cursor:'pointer', fontFamily:'inherit' }}>Ta eit bilete
{ setPic('assets/avatar-kristoffer.png'); setSheet(false); }} style={{ width:'100%', height:57, border:'none', background:'transparent',
fontSize:20, color:'#000', cursor:'pointer', fontFamily:'inherit' }}>Choose from library
setSheet(false)} style={{ width:'100%', height:57, marginTop:8, borderRadius:14,
border:'none', background:'#fff', fontSize:20, fontWeight:600, color:'#000', cursor:'pointer',
fontFamily:'inherit' }}>Cancel
>
)}
);
}
// ── komida.no in Safari – choose a plan
function SWeb({ back, choose }) {
const plans = [
{ name:'Basic', price:'49', per:'kr/mo', sub:'For cooking for one or two',
perks:['Weekly menu for up to 2 people','Automatic shopping list','Step-by-step cooking mode'], hi:false },
{ name:'Family', price:'89', per:'kr/mo', sub:'Tailored to the whole household, kids included',
perks:['Weekly menu for up to 6 people','Automatic shopping list','Kid-friendly suggestions','Share the plan with your family'], hi:true },
{ name:'Yearly', price:'790', per:'kr/yr', sub:'The Family plan with two months free',
perks:['Everything in Family','Save 278 kr a year','Price guarantee for 12 months'], hi:false },
];
return (
{/* Safari-adresselinje */}
{/* innhald */}
Choose your plan
Try free for 7 days. Cancel anytime.
{plans.map(p=>(
{p.hi && (
Most popular
)}
{p.name}
{p.price}
{p.per}
{p.sub}
choose && choose(p.name, p.price)} style={{ width:'100%', height:37, marginTop:10, borderRadius:999, border:'none', cursor:'pointer',
background: p.hi?'#fff':PLc, color: p.hi?PLc:'#fff',
fontFamily:'Manrope', fontWeight:700, fontSize:13.5 }}>Choose {p.name}
))}
{/* Safari-verktøylinje */}
{[
'M15 4l-7 8 7 8', 'M9 4l7 8-7 8',
'M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14',
'M4 5h16v12H4zM8 20h8',
'M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z',
].map((d,i)=>(
))}
);
}
// ── komida.no – opprett konto (etter valt plan)
function SWebSignup({ back, plan='Family', price='89', appleLogin }) {
const [mail, setMail] = React.useState('');
const [pw, setPw] = React.useState('');
const [c1, setC1] = React.useState(true);
const [c2, setC2] = React.useState(false);
const OAuth = ({ icon, label }) => (
{icon} {label}
);
const Cb = ({ on, set, children }) => (
set(!on)} style={{ display:'flex', gap:11, padding:'12px 13px', borderRadius:12, cursor:'pointer',
border:`1.5px solid ${on?PLc:'rgba(90,45,57,0.18)'}`, background: on?'rgba(90,45,57,0.04)':'transparent', alignItems:'flex-start' }}>
{children}
);
return (
{/* burgundy website header */}
Create an account
{/* valt plan */}
{plan}
The whole household
New menu every week
0 kr for the first 7 days
{price} kr /month after that
The trial applies to new customers. After 7 days the subscription automatically continues at {price} kr per month. Cancel anytime.
Already have an account? Log in
Email
setMail(e.target.value)}
style={{ width:'100%', height:46, borderRadius:12, padding:'0 14px', outline:'none',
border:'1.5px solid rgba(90,45,57,0.25)', background:'#fff', fontFamily:'Manrope', fontSize:15, color:PDc }}/>
Password
setPw(e.target.value)}
style={{ width:'100%', height:46, borderRadius:12, padding:'0 44px 0 14px', outline:'none',
border:'1.5px solid rgba(90,45,57,0.25)', background:'#fff', fontFamily:'Manrope', fontSize:15, color:PDc }}/>
Must be at least 8 characters
I would like to receive emails from Komida with personal suggestions, news and offers.
Share my sign-up data with marketing partners for more relevant ads.
Create account
By clicking Create account you agree to Komida's terms and privacy policy .
{/* Safari-verktøylinje */}
{['M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>(
))}
);
}
// ── checkout.komida.no – betalingsval
function SWebPay({ back, pay, plan='Family', price='89' }) {
const [sel, setSel] = React.useState('apple');
const Method = ({ id, label, logo }) => {
const on = sel === id;
return (
setSel(id)} style={{ display:'flex', alignItems:'center', gap:12, cursor:'pointer',
padding: on?'10px 14px':'12px 2px', borderRadius:999,
border: on?`2px solid ${PDc}`:'none', marginTop:on?2:0 }}>
{label}
{logo}
{on && (
Get started today with a free 7-day trial. When the trial ends, the subscription renews automatically at {price} kr every 30 days. You can cancel at any time.
{id==='apple' ? <>Subscribe with Pay>
: id==='vipps' ? 'Pay with Vipps' : `Pay with ${label}`}
By clicking the purchase button you accept our terms of use .
)}
);
};
return (
Checkout
{plan}
0 kr for 7 days · then {price} kr /month
Pay with…
All transactions are secure and encrypted.
Pay
}/>
{['M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>(
))}
);
}
// ── Apple Pay-ark: dobbelttrykk sideknapp
function SApplePay({ back, done }) {
return (
{/* dimma checkout bak */}
Pay with…
Get started today with a free 7-day trial. When the trial ends, the subscription renews automatically.
{/* Double-Click to Pay hint */}
{/* Apple Pay-ark */}
);
}
// ── Kvittering etter betaling
function SWebDone({ toApp, plan='Family', price='89', menu }) {
return (
k
{plan}
The whole household
{[['Total','0 kr'],['Payment method','Apple Pay'],['Next payment',`${price} kr`],['Payment date','05.08.2026']].map(([k,v],i)=>(
))}
Next payment is 05.08.2026. You can cancel at any time.
Head back to the Komida app – everything is synced and ready.
Open Komida
{['M15 4l-7 8 7 8','M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>(
))}
);
}
// ── delt botn-nav
function AppNav({ active='plan', onNav, dim }) {
const Ico = ({ name, color }) => {
if (name==='plan') return
;
if (name==='list') return
;
if (name==='chef') return (
);
if (name==='book') return
;
return
;
};
return (
{[['plan','Planner'],['list','Shopping'],['chef','Assistant'],['book','Collection'],['user','You']].map(([k,lb])=>{
const on = active===k;
const col = on ? PLc : (dim ? 'rgba(54,48,46,0.42)' : 'rgba(54,48,46,0.55)');
return (
onNav && onNav(k)} style={{ display:'flex', flexDirection:'column', alignItems:'center',
gap:2, cursor:'pointer', padding: on?'6px 15px':'6px 11px', borderRadius:999,
background: on?'rgba(90,45,57,0.09)':'transparent', color:col, fontSize:10.5, fontWeight: on?700:500, whiteSpace:'nowrap' }}>
{lb}
);
})}
);
}
// ── Shopping list
function SShopping({ onNav }) {
const [checked, setChecked] = React.useState({});
const groups = [
{ cat:'Fruit and vegetables', items:[['Onion','2 pcs'],['Garlic','1 clove'],['Spinach','200 g'],['Tomato','4 pcs'],['Lemon','1 pc']] },
{ cat:'Meat and fish', items:[['Chicken breast','600 g'],['Cod fillet','500 g']] },
{ cat:'Dairy', items:[['Heavy cream','3 dl'],['Butter','100 g'],['Eggs','6 pcs']] },
{ cat:'Pantry', items:[['Red lentils','200 g'],['Macaroni','300 g'],['Coconut milk','1 can']] },
];
const total = groups.reduce((n,g)=>n+g.items.length,0);
const doneN = Object.values(checked).filter(Boolean).length;
return (
{/* framdrift */}
{groups.map(g=>(
{g.cat}
{g.items.map(([n,a],i)=>{
const key = g.cat+n, on = !!checked[key];
return (
setChecked(c=>({ ...c, [key]:!c[key] }))}
style={{ display:'flex', alignItems:'center', gap:13, padding:'13px 15px', cursor:'pointer',
borderBottom: i
{n}
{a}
);
})}
))}
);
}
// ── Assistant
function SAssistant({ onNav, cook }) {
const meals = [
{ day:'Today', title:'Coconut chicken stew', time:'40 min', diff:'Medium', img:'assets/food-kylling.png' },
{ day:'Thursday', title:'Lentil stew with spinach', time:'30 min', diff:'Easy', img:'assets/food-linsegryte.png' },
{ day:'Friday', title:'Green galette', time:'50 min', diff:'Medium', img:'assets/food-galette.png' },
];
return (
{/* dagens rett – hero */}
TODAY
Coconut chicken stew
Medium · 40 min · 8 steps
Later this week
{meals.slice(1).map((m,i)=>(
{m.day}
{m.title}
{m.diff} · {m.time}
))}
);
}
// ── Website menu (signed in)
function SWebMenu({ close, account }) {
const items = ['Recipes','Weekly menus','Categories','About Komida','Buy a gift card'];
return (
{items.map(t=>(
{t}
))}
My account
Log out
Search
Search for a dish or ingredient
);
}
// ── Website: My account (signed in)
function SWebAccount({ menu, manage, plan={} }) {
const Grp = ({ title, rows }) => (
{title}
{rows.map(([icon,label],i)=>(
))}
);
const ic = (d, fill) =>
;
return (
{/* mørk topp */}
Welcome, Kristoffer!
dr5dp9v5bm@privaterelay.appleid.com
k
{plan.name||'Family'} – {plan.price||'89'} kr
Next payment 05.08.2026
{['M15 4l-7 8 7 8','M9 4l7 8-7 8','M12 16V4M7.5 8.5L12 4l4.5 4.5M5 20h14','M4 5h16v12H4zM8 20h8','M4 6h7v6H4zM13 6h7v6h-7zM4 14h7v6H4zM13 14h7v6h-7z'].map((d,i)=>(
))}
);
}
// ── App: abonnementsinnstillingar
function SSubSettings({ back, onNav, open, plan={} }) {
return (
{[['Your subscription', plan.name||'Family'],['Next payment', `${plan.price||'89'} kr · 05.08.2026`]].map(([t,sub],i)=>(
))}
Renewal
The subscription renews automatically on 05.08.2026. You can cancel at any time.
Subscriptions cannot be managed in the app. Go to Komida's website to change or cancel.
);
}
// ── Recipe (frå Assistant)
function SRecipe({ back, start, onNav, meal }) {
const m = meal || { title:'Tomato soup with egg', time:'30 min', diff:'Easy',
img:'https://images.unsplash.com/photo-1547592180-85f173990554?w=800&q=75' };
const [tab, setTab] = React.useState('detaljer');
const stats = [
['M12 7.5V12l3 2M12 21a9 9 0 100-18 9 9 0 000 18z', '15 min', 'Prep'],
['M4 18h16M6 18V9a6 6 0 0112 0v9M12 3v-1', '30 min', 'Cook time'],
['M12 3c1.5 3 4 4 4 7a4 4 0 11-8 0c0-1.5.8-2.6 1.5-3.5', '320', 'Calories'],
['M7 12h10M9 8h6M9 16h6M12 3a9 9 0 100 18 9 9 0 000-18z', '40 g', 'Protein'],
];
const ingredients = [['Tomato','8 pcs'],['Eggs','4 pcs'],['Onion','1'],['Garlic','2 cloves'],
['Heavy cream','2 dl'],['Basil','1 pot'],['Vegetable stock','1 cube']];
const equipment = ['Large pot','Immersion blender','Cutting board','Knife'];
return (
{/* foto */}
{/* kort som overlappar fotoet */}
{m.title}
{/* faner */}
{[['detaljer','Details'],['ingr','Ingredients'],['utstyr','Equipment']].map(([k,l])=>(
setTab(k)} style={{ flex:1, textAlign:'center', padding:'8px 0', borderRadius:999,
cursor:'pointer', background: tab===k?'#fff':'transparent', fontSize:12.5,
fontWeight: tab===k?700:600, color: tab===k?PDc:MUc,
boxShadow: tab===k?'0 1px 4px rgba(60,30,38,0.12)':'none' }}>{l}
))}
{tab==='detaljer' && (
<>
{stats.map(([d,v,l])=>(
))}
Description
A rich and flavourful homemade tomato soup made from scratch with sun-ripened tomatoes, onion and aromatic spices.
Served with a boiled egg for extra staying power.
>
)}
{tab==='ingr' && (
{ingredients.map(([n,a])=>(
{n}
{a}
))}
)}
{tab==='utstyr' && (
{equipment.map(e=>(
{e}
))}
)}
);
}
// ── Kokemodus
function SCook({ back, done, meal }) {
const m = meal || { title:'Coconut chicken stew', img:'assets/food-kylling.png' };
const [i, setI] = React.useState(1);
const [open, setOpen] = React.useState(false);
const SP = [
{ name:'Red curry paste', amt:'2 ss', c1:'#8a3a1e', c2:'#4d1d0c' },
{ name:'Cumin', amt:'1 ts', c1:'#a45e2a', c2:'#6b3a18' },
{ name:'Turmeric', amt:'½ ts', c1:'#e4a017', c2:'#a56a08' },
{ name:'Chilli flakes', amt:'¼ ts', c1:'#c83024', c2:'#7c1912' },
];
const nn = (typeof window !== 'undefined' && window.KLANG === 'nn');
const steps = [
{ stage: nn?'Førebuing':'Prep', title: nn?'Skjer kyllingen i bitar':'Cut the chicken into pieces', img:'assets/food-kylling.png' },
{ stage: nn?'Førebuing':'Prep', title: nn?'Finkutt 1 stor løk':'Finely chop 1 large onion', img:'assets/step-onion.jpg' },
{ stage: nn?'Steiking':'Frying', title: nn?'Ha alle krydderne i panna':'Add all the spices to the pan', img:'assets/food-galette.png', subs:SP },
{ stage: nn?'Småkoking':'Simmering', title: nn?'Hell i kokosmjølk og la det småkoke':'Pour in coconut milk and let it simmer', img:'assets/food-linsesuppe.png' },
{ stage: nn?'Servering':'Serving', title: nn?'Vend inn spinat og server med ris':'Fold in spinach and serve with rice', img:'assets/food-kylling.png' },
];
const st = steps[i];
const HALO = '0 1px 2px rgba(0,0,0,0.55), 0 2px 12px rgba(0,0,0,0.5), 0 4px 26px rgba(0,0,0,0.45)';
const Dot = ({ s, size=24 }) => (
);
return (
{/* foto kant til kant */}
{/* sand-ark nedanfrå */}
{/* tekst under fotoet */}
{st.stage}
·
{nn?'Steg':'Step'} {i+1} {nn?'av':'of'} {steps.length}
{st.title}
{st.subs && (
setOpen(o=>!o)} style={{ display:'inline-flex', alignItems:'center', gap:10,
padding:'9px 15px 9px 11px', height:42, borderRadius:999, marginTop:16, cursor:'pointer',
background:'rgba(90,45,57,0.07)', border:'1.5px solid rgba(90,45,57,0.18)',
color:PDc, fontFamily:'Manrope', fontWeight:600, fontSize:13.5 }}>
{st.subs.map((s,k)=> )}
{open ? 'Hide spices' : `Vis ${st.subs.length} spices`}
{open && (
{st.subs.map(s=>(
{s.name}
{s.amt}
))}
)}
)}
{ if(i>0){ setI(i-1); setOpen(false);} else back(); }}
style={{ position:'absolute', left:26, bottom:44, width:52, height:52, borderRadius:999, zIndex:30,
cursor:'pointer', background:CDc, border:'1.5px solid rgba(90,45,57,0.18)',
display:'grid', placeItems:'center' }}>
{ if(i
{i===steps.length-1 ? (nn?'Ferdig':'Done') : (nn?'Neste':'Next')}
);
}
function Flow() {
const [s, setS] = React.useState(0);
const [name, setName] = React.useState('');
const [photo, setPhoto] = React.useState(null);
const [plan, setPlan] = React.useState({ name:'Family', price:'89' });
const [subbed, setSubbed] = React.useState(false);
const nav = k=>setS(k==='plan'?8 : k==='list'?17 : k==='chef'?18 : k==='book'?24 : k==='sub'?21 : 9);
const scr = [
setS(1)}/>,
setS(2)} login={()=>setS(5)}/>,
setS(3)} back={()=>setS(1)}/>,
setS(4)} back={()=>setS(2)}/>,
setS(3)} done={()=>setS(6)}/>,
setS(1)}/>,
setS(4)} done={()=>setS(7)}/>,
setS(8)}/>,
setS(9)} web={()=>setS(11)} subbed={subbed} onNav={nav}/>,
setS(10)} home={()=>setS(8)} subbed={subbed} plan={plan} onNav={nav}/>,
{ setName(n); setPhoto(p); setS(9); }}
close={()=>setS(9)}/>,
setS(8)} choose={(n,p)=>{ setPlan({ name:n, price:p }); setS(12); }}/>,
setS(11)} plan={plan.name} price={plan.price} appleLogin={()=>setS(13)}/>,
setS(12)} done={()=>setS(14)}/>,
setS(12)} pay={()=>setS(15)} plan={plan.name} price={plan.price}/>,
setS(14)} done={()=>{ setSubbed(true); setS(16); }}/>,
setS(8)} plan={plan.name} price={plan.price} menu={()=>setS(19)}/>,
,
setS(22)}/>,
setS(16)} account={()=>setS(20)}/>,
setS(19)} manage={()=>setS(21)} plan={plan}/>,
setS(9)} open={()=>{}} plan={plan} onNav={nav}/>,
setS(18)} start={()=>setS(23)} onNav={nav}/>,
setS(22)} done={()=>setS(18)}/>,
setS(22)} add={()=>setS(25)}/>,
setS(24)} url={()=>setS(26)} manual={()=>setS(28)}/>,
setS(25)} next={()=>setS(27)}/>,
setS(26)} save={()=>setS(24)} prefilled/>,
setS(25)} save={()=>setS(24)}/>,
];
return scr[s];
}
Object.assign(window, { Flow, S0, S1, S2, S5, S6, SLogin, SFaceID, SSubscribe, SLoading, SHome, SProfile, SEditProfile, SWeb, SWebSignup, SWebPay, SApplePay, SWebDone, AppNav, SShopping, SAssistant, SWebMenu, SWebAccount, SSubSettings, SRecipe, SCook });