mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
Hide yield and time when not used
This commit is contained in:
parent
0adafed47c
commit
96c8a2b1b3
1 changed files with 5 additions and 4 deletions
|
|
@ -190,7 +190,8 @@ function render() {
|
|||
image = image?.url || image;
|
||||
instructions = json.recipeInstructions;
|
||||
let title = clean(json.name);
|
||||
parent.postMessage({title:title, favicon:"🍴", image:image, wakeLock:true, updateURL:true}, "*");
|
||||
let description = clean(json.description);
|
||||
parent.postMessage({title:title, favicon:"🍴", image:image, description:description wakeLock:true, updateURL:true}, "*");
|
||||
|
||||
|
||||
// let text = instructions.join(" ");
|
||||
|
|
@ -302,8 +303,8 @@ function render() {
|
|||
),
|
||||
m("h1", title),
|
||||
m(".metadata",
|
||||
m("div", m("span.yield", m(".icon.material-icons-outlined", "restaurant"), yield)),
|
||||
m(".time",
|
||||
(yield) ? m("div", m("span.yield", m(".icon.material-icons-outlined", "restaurant"), yield)) : null,
|
||||
json.totalTime ? m(".time",
|
||||
m(".icon.material-icons-outlined", "timer"),
|
||||
|
||||
json.totalTime ? m("span", formatTime(json.totalTime)) : undefined,
|
||||
|
|
@ -311,7 +312,7 @@ function render() {
|
|||
// json.prepTime ? m("span", formatTime(json.prepTime), " prep") : undefined,
|
||||
// json.cookTime ? m("span", ", ", formatTime(json.cookTime), " cook") : undefined,
|
||||
// ")"
|
||||
),
|
||||
) : null,
|
||||
(rating) ? m("div.rating",
|
||||
m(".icon.material-icons-outlined", "grade"),
|
||||
parseFloat(rating.ratingValue).toFixed(1), " ",
|
||||
|
|
|
|||
Loading…
Reference in a new issue