Skip to content

Commit 59acffb

Browse files
committed
feat: fix timers
1 parent 84bb7b7 commit 59acffb

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ A next.js website, statically rendered, hosted on github pages with client side
88

99
#### TODO
1010

11-
- [X] statically rendered website, hosted on github
11+
- [X] statically rendered website, hosted on github
1212
- [X] basic search
1313
- [ ] full text search
1414
- [ ] generate JSON-LD so that google can understand the recipes
1515
- [ ] shopping list
1616
- [ ] portion scaling
1717
- [ ] RSS feed?? maybe
1818
- [ ] i18n ?? maybe
19+
- [ ] magic timers ?? maybe
20+
- [ ] condensed view for recipes (merge ingredients and instructions)

Diff for: app/recipes/[slug]/page.js

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function RecipePage(props) {
3535
alt="Se estás a ler isto é porque não estás a ver a imagem da comida"
3636
width={600}
3737
height={600}
38+
unoptimized={true}
3839
/>
3940
);
4041
}
@@ -44,11 +45,18 @@ export default function RecipePage(props) {
4445
switch (part.type) {
4546
case "text":
4647
return <span>{part.value}</span>;
48+
case "timer":
49+
return (
50+
<span className="font-medium text-red-600">
51+
{part.quantity} {part.units}
52+
</span>
53+
);
4754
case "ingredient":
4855
return <span className="font-medium text-green-600">{part.name}</span>;
4956
case "cookware":
5057
return <span className="font-medium text-blue-600">{part.name}</span>;
5158
default:
59+
console.log("Unknown part type", part);
5260
return null;
5361
}
5462
};

Diff for: recipes/caril_grao.cook

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Adicionar o @grão de bico{500 g}.
1515

1616
Adicionar o @leite de coco{200 ml}, temperar com @sal{q.b.}.
1717

18-
Deixar levantar fervura, baixar o lume e deixar cozinhar por #{ 2 a 5 minutos}.
18+
Deixar levantar fervura, baixar o lume e deixar cozinhar por ~{3%minutos}.
1919

2020
Picar @coentros{q.b.} para servir.

Diff for: recipes/dahl.cook

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Aqueça @óleo de coco{1%colheres de sopa} numa panela.
88

99
Picar @cebolas{1} e adicionar, refogar por ~{3%minutos} até ficarem transparentes.
1010

11-
Adicionar os @dentes de alho{2} picados e @gengibre{1%colheres de chá} picado, refogar por mais ~{1&minuto} até começar a cheirar bem.
11+
Adicionar os @dentes de alho{2} picados e @gengibre{1%colheres de chá} picado, refogar por mais ~{1%minuto} até começar a cheirar bem.
1212

1313
Adicionar a @cúrcuma{1%colher de chá}, @coentro em pó{1 colher de chá}, @cominho{1 colher de chá}, @paprica{1 colher de chá} e @garam masala{1 colher de chá} e refoguar.
1414

@@ -20,7 +20,7 @@ Cozinhar tapado por ~{10%minutos}, ou até as lentilhas terem absorvido a maior
2020

2121
Adicione @leite de coco{120%ml} e @tomates passados{120%ml}, opcional
2222

23-
Cozinhar em fogo brando por ~{10&minutos}, ou até as lentilhas estarem macias.
23+
Cozinhar em fogo brando por ~{10%minutos}, ou até as lentilhas estarem macias.
2424

2525
Temperar com @sal{} e @pimenta{} a gosto.
2626

0 commit comments

Comments
 (0)