diff --git a/marketing-site/components/reader/WorkflowBlock.jsx b/marketing-site/components/reader/WorkflowBlock.jsx index 08b5a3e..71ad666 100644 --- a/marketing-site/components/reader/WorkflowBlock.jsx +++ b/marketing-site/components/reader/WorkflowBlock.jsx @@ -2,6 +2,16 @@ import { useState } from "react"; import Link from "next/link"; import TermOutput from "./TermOutput"; +const JUMP = [ + { id: "problem", label: "Problem" }, + { id: "actors", label: "Actors" }, + { id: "setup", label: "Setup" }, + { id: "safeguards", label: "Safeguards" }, + { id: "method", label: "Method" }, + { id: "evidence", label: "Evidence" }, + { id: "tryit", label: "Try-it" }, +]; + function ShieldCheck() { return (
+

{label}

+
{children}
+
+ ); +} + export default function WorkflowBlock({ recipe, complete = false, onToggleComplete, focused = false, + index = 1, + total = 1, }) { const [copied, setCopied] = useState(false); + const a = recipe.anchor; const onShare = async () => { const ok = await copyText(recipe.shareBlurb); @@ -76,140 +98,120 @@ export default function WorkflowBlock({ return (
- recipe {recipe.id} · v{recipe.version} · {recipe.time} · {recipe.cost} + Workflow {index} of {total} · {recipe.id} · v{recipe.version} · {recipe.time} · {recipe.cost} {recipe.vertical}
-

+

{recipe.title}

-
-
Problem
-
- {recipe.problem}{" "} - {recipe.problemJob} -
-
+ -
-
Actors
-
-
    - {recipe.actors.map((line) => ( -
  • {line}
  • - ))} -
-
-
+ + {recipe.problem} {recipe.problemJob} + -
-
Setup
-
-
    - {recipe.setup.map((line) => ( -
  • {line}
  • - ))} -
-
-
- -
-
Safeguards
-
- {recipe.safeguards.map((line) => ( -
- - {line} -
+ +
    + {recipe.actors.map((line) => ( +
  • {line}
  • ))} -
-
+ + -
-
Method
-
-
    - {recipe.method.map((step, i) => ( -
  1. -
    - {step.text} - {step.term ? : null} -
    -
  2. - ))} -
-
-
- -
-
Evidence
-
- {recipe.evidence.map((line) => ( -

- {line} -

+ +
    + {recipe.setup.map((line) => ( +
  • {line}
  • ))} -
-
+ + -
-
Try it
-
-

- About {recipe.tryit.minutes} minutes. {recipe.tryit.sample}{" "} - {recipe.tryit.produce} -

-

- {recipe.tryit.done}{" "} - - {recipe.tryit.hrefLabel} - -

-

- ◷ {recipe.tryit.chip} -

- {onToggleComplete ? ( -
- -
- ) : null} -
-
+ + {recipe.safeguards.map((line) => ( +
+ + {line} +
+ ))} +
-
-
Share
-
-

- Copy a short result line. Share the outcome, not the recipe text. + +

    + {recipe.method.map((step, i) => ( +
  1. +
    + {step.text} + {step.term ? : null} +
    +
  2. + ))} +
+ + + + {recipe.evidence.map((line) => ( +

+ {line}

+ ))} +
+ + +

+ About {recipe.tryit.minutes} minutes. {recipe.tryit.sample}{" "} + {recipe.tryit.produce} +

+

+ {recipe.tryit.done}{" "} + + {recipe.tryit.hrefLabel} + +

+

+ ◷ {recipe.tryit.chip} +

+ {onToggleComplete ? (
-
-
-
+ ) : null} + -
-
Record
-
+ +

Copy a short result line. Share the outcome, not the recipe text.

+
+ +
+
+ + +
Author: {recipe.author} Sources: {recipe.sources} Last updated: {recipe.lastUpdated} @@ -225,7 +227,7 @@ export default function WorkflowBlock({ )}
-
+
);