diff --git a/public/brown.png b/public/brown.png new file mode 100644 index 0000000..de67043 Binary files /dev/null and b/public/brown.png differ diff --git a/public/paper.png b/public/paper.png new file mode 100644 index 0000000..a6a4bb7 Binary files /dev/null and b/public/paper.png differ diff --git a/src/app/generate/page.tsx b/src/app/generate/page.tsx index a944cc9..2ba4ac8 100644 --- a/src/app/generate/page.tsx +++ b/src/app/generate/page.tsx @@ -198,7 +198,7 @@ export default function GeneratePage() { {/* Results Section */} {recipes.length > 0 && ( -
+

- Your Recipes -

{recipes.map((recipe) => ( diff --git a/src/components/InstructionsSection.tsx b/src/components/InstructionsSection.tsx index 17f712d..826cfff 100644 --- a/src/components/InstructionsSection.tsx +++ b/src/components/InstructionsSection.tsx @@ -11,6 +11,18 @@ interface InstructionsSectionProps { additionalButtons?: ReactNode; } +// Step number badge component +function StepNumber({ number }: { number: number }) { + return ( + + {number} + + ); +} + export default function InstructionsSection({ recipeName, ingredients, @@ -56,15 +68,17 @@ export default function InstructionsSection({ return (
-

- Instructions -

-
    +

    - Instructions -

    +
      {(detailedInstructions || instructions).map((step, index) => ( -
    1. {step.replace(/^step\s*\d+[:\.\-]\s*/i, "")}
    2. +
    3. + + {step.replace(/^step\s*\d+[:\.\-]\s*/i, "")} +
    4. ))}
    - {/* Action Buttons Row */} -
    +
    {/* Detailed Instructions Button */} {!detailedInstructions && ( @@ -81,7 +96,9 @@ export default function InstructionsSection({ {/* Show label when detailed instructions are displayed */} {detailedInstructions && ( -

    ✓ Showing detailed instructions

    +

    + Showing detailed instructions +

    )} {/* Additional buttons passed from parent */} @@ -89,7 +106,14 @@ export default function InstructionsSection({
    {/* Error message */} - {detailsError &&

    {detailsError}

    } + {detailsError && ( +

    + {detailsError} +

    + )}
    ); } diff --git a/src/components/RecipeCard.tsx b/src/components/RecipeCard.tsx index 4cf860c..37a960a 100644 --- a/src/components/RecipeCard.tsx +++ b/src/components/RecipeCard.tsx @@ -28,6 +28,39 @@ interface RecipeCardProps { recipe: Recipe; } +// Reusable badge component with hover effect +function Badge({ + children, + variant = "time", +}: { + children: React.ReactNode; + variant?: "time" | "macro"; +}) { + const bgColor = variant === "time" ? "#d4c4a8" : "#c9b896"; + const borderColor = variant === "time" ? "border-amber-800/50" : "border-amber-900/40"; + + return ( + + {children} + + ); +} + +// Section divider component +function SectionDivider() { + return ( +
    + ); +} + export default function RecipeCard({ recipe }: RecipeCardProps) { const [isOpen, setIsOpen] = useState(false); const [copied, setCopied] = useState(false); @@ -66,9 +99,32 @@ ${recipe.instructions.map((step, i) => `${i + 1}. ${step}`).join("\n")} } }; + // Minecraft book style - parchment with lined paper effect + const bookStyle = isOpen + ? { + background: ` + repeating-linear-gradient( + transparent, + transparent 31px, + rgba(139, 105, 20, 0.15) 31px, + rgba(139, 105, 20, 0.15) 32px + ), + linear-gradient(to right, #8b5a2b 0px, #8b5a2b 8px, transparent 8px), + linear-gradient(to bottom, #e8dcc4, #d4c4a8) + `, + boxShadow: "inset 4px 0 8px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.3)", + color: "#3d2b1f", + textShadow: "none", + borderColor: "#5c3d2e", + } + : undefined; + return (
    { if (isOpen) { playPageBack(); @@ -78,66 +134,86 @@ ${recipe.instructions.map((step, i) => `${i + 1}. ${step}`).join("\n")} setIsOpen(!isOpen); }} > - {/* Always visible */} -
    -
    - {isOpen ? "▼" : "▶"} -

    {recipe.name}

    -
    - + {isOpen ? "▼" : "▶"} + +
    +
    +

    + {recipe.name} +

    + +
    +
    - {/* Only visible when expanded */} + {/* Expanded content - extra left padding for book binding */} {isOpen && ( - <> -

    {recipe.description}

    +
    +

    {recipe.description}

    {/* Time Info */} -
    - - Prep: {recipe.prepTime} min - - - Cook: {recipe.cookTime} min - - - Total: {recipe.prepTime + recipe.cookTime} min - +
    + Prep: {recipe.prepTime} min + Cook: {recipe.cookTime} min + Total: {recipe.prepTime + recipe.cookTime} min
    - {/* Macros */} -
    + {/* Macros - slightly different tint */} +
    {[ { label: "cal", value: recipe.macros.calories }, { label: "g protein", value: recipe.macros.protein }, { label: "g carbs", value: recipe.macros.carbs }, { label: "g fat", value: recipe.macros.fat }, ].map((macro) => ( - + {macro.value} {macro.label} - + ))}
    + + {/* Ingredients */} -
    -

    - Ingredients -

    -
      +
      +

      - Ingredients -

      +
        {recipe.ingredients.map((ingredient, index) => ( -
      • {ingredient}
      • +
      • + + {ingredient} +
      • ))}
      + + {/* Instructions */} `${i + 1}. ${step}`).join("\n")} playClick(); setShowCostBreakdown(!showCostBreakdown); }} - className="minecraft-text bg-black/30 px-4 py-2 border-2 border-black/50 text-sm hover:bg-black/50 transition-colors hover:cursor-pointer" + className="minecraft-text px-4 py-2 border-2 border-amber-800/50 text-sm transition-all duration-150 hover:brightness-105 hover:scale-[1.02] hover:cursor-pointer" + style={{ backgroundColor: "#d4c4a8" }} > {showCostBreakdown ? "Hide Cost Breakdown" : "Cost Breakdown"} @@ -161,19 +238,28 @@ ${recipe.instructions.map((step, i) => `${i + 1}. ${step}`).join("\n")} {/* Cost Breakdown Content */} {showCostBreakdown && ( -
      - - 🛒 Grocery Cost: ~${recipe.estimatedCost.toFixed(2)} +
      + + 🛒 Grocery: ~${recipe.estimatedCost.toFixed(2)} - - 🍔 Takeout Equivalent: ~${recipe.takeoutEquivalent.toFixed(2)} + + 🍔 Takeout: ~${recipe.takeoutEquivalent.toFixed(2)} - + ✅ You Save: ${(recipe.takeoutEquivalent - recipe.estimatedCost).toFixed(2)}
      )} - +
      )}
    );