anaygupta commited on
Commit
af43eb2
·
verified ·
1 Parent(s): f5955cd

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +18 -33
index.html CHANGED
@@ -25,8 +25,6 @@
25
  --amber-text:#a86c0b;
26
  --blue:#eef3ff;
27
  --blue-text:#4057c7;
28
- --rose:#fcedef;
29
- --rose-text:#bd4b60;
30
  --radius: 24px;
31
  }
32
 
@@ -539,13 +537,6 @@
539
  padding: 7px 10px;
540
  }
541
 
542
- .footer-note{
543
- margin-top: 16px;
544
- color: var(--muted2);
545
- font-size: 12px;
546
- line-height: 1.6;
547
- }
548
-
549
  .loading{
550
  display:none;
551
  align-items:center;
@@ -642,11 +633,18 @@
642
  <h3 class="side-title">Try a recipe</h3>
643
  <p class="side-text">Pick a sample to test the adapter.</p>
644
  <div class="quick-tries">
645
- <button class="chip" onclick="fillExample('chocolate cake')">Chocolate cake</button>
646
- <button class="chip" onclick="fillExample('butter chicken')">Butter chicken</button>
647
- <button class="chip" onclick="fillExample('blt sandwich')">BLT sandwich</button>
648
  </div>
649
  </div>
 
 
 
 
 
 
 
650
  </aside>
651
  </section>
652
 
@@ -654,7 +652,7 @@
654
  <div class="section-head">
655
  <div>
656
  <h3>Adapt a recipe</h3>
657
- <p>Paste anything from a recipe post or notes app, then choose how you want it adapted.</p>
658
  </div>
659
  <div class="segmented" role="tablist" aria-label="Diet mode">
660
  <button class="diet-btn active-vegan" data-diet="vegan" onclick="setDiet(this)">Vegan</button>
@@ -665,7 +663,7 @@
665
 
666
  <div class="editor">
667
  <div>
668
- <textarea id="recipeInput" placeholder="Paste your recipe here. For example: 2 cups flour, 2 eggs, 1/2 cup butter, 1 cup milk, vanilla extract..."></textarea>
669
 
670
  <div class="input-actions">
671
  <div class="helper" aria-live="polite">
@@ -688,13 +686,9 @@
688
  </div>
689
 
690
  <div class="side-block">
691
- <h3 class="side-title">What appears after submit</h3>
692
  <p class="side-text">
693
- You’ll see a quick summary at the top, followed by ingredient cards that show the original item,
694
- the suggested substitute, and the instructions for using it.
695
- </p>
696
- <p class="side-text" style="margin-top:12px;">
697
- The layout is designed so it still feels good on mobile, which matters if someone opens it from a shared link.
698
  </p>
699
  </div>
700
  </div>
@@ -719,13 +713,12 @@
719
  <div class="results-head">
720
  <div>
721
  <h3 id="resultTitle">Adapted recipe</h3>
722
- <p id="resultSubtitle" style="margin:6px 0 0;color:var(--muted);font-size:14px;">Review each ingredient and expand any card for details.</p>
723
  </div>
724
  <div class="badge" id="resultBadge"></div>
725
  </div>
726
 
727
  <div class="list" id="ingList"></div>
728
-
729
  </section>
730
  </div>
731
 
@@ -736,20 +729,13 @@ function setDiet(btn) {
736
  currentDiet = btn.dataset.diet;
737
  document.querySelectorAll(".diet-btn").forEach(b => b.className = "diet-btn");
738
  btn.className = "diet-btn active-" + currentDiet;
739
-
740
- const labels = {
741
- vegan: "Adapt recipe",
742
- keto: "Adapt recipe",
743
- both: "Adapt recipe"
744
- };
745
- document.getElementById("submitBtn").textContent = labels[currentDiet];
746
  }
747
 
748
  function fillExample(name) {
749
  const examples = {
750
- "chocolate cake": "2 cups all-purpose flour, 1 cup sugar, 2 eggs, 1/2 cup butter, 1 cup whole milk, 1/2 cup cocoa powder, 1 tsp baking powder, 1 tsp vanilla extract",
751
- "butter chicken": "500g chicken thighs, 1 cup heavy cream, 2 tbsp butter, 1 onion, 3 cloves garlic, 2 tsp garam masala, 1 tsp turmeric, 1 can tomato puree, salt",
752
- "blt sandwich": "4 slices bacon, 2 slices bread, lettuce, tomato, mayonnaise, salt, black pepper"
753
  };
754
  document.getElementById("recipeInput").value = examples[name] || "";
755
  document.getElementById("recipeInput").focus();
@@ -864,7 +850,6 @@ function renderResults(data) {
864
  list.innerHTML = "";
865
 
866
  data.ingredients.forEach((r, i) => {
867
- const isSwap = !r.compliant;
868
  const dotClass = r.compliant ? "dot dot-ok" : (r.confidence && r.confidence < 0.6 ? "dot dot-warn" : "dot dot-swap");
869
  const statusText = r.compliant ? "compatible" : "substitution suggested";
870
 
 
25
  --amber-text:#a86c0b;
26
  --blue:#eef3ff;
27
  --blue-text:#4057c7;
 
 
28
  --radius: 24px;
29
  }
30
 
 
537
  padding: 7px 10px;
538
  }
539
 
 
 
 
 
 
 
 
540
  .loading{
541
  display:none;
542
  align-items:center;
 
633
  <h3 class="side-title">Try a recipe</h3>
634
  <p class="side-text">Pick a sample to test the adapter.</p>
635
  <div class="quick-tries">
636
+ <button class="chip" onclick="fillExample('fettuccine alfredo')">Fettucine Alfredo</button>
637
+ <button class="chip" onclick="fillExample('pancakes')">Pancakes</button>
638
+ <button class="chip" onclick="fillExample('butter chicken')">Butter Chicken</button>
639
  </div>
640
  </div>
641
+
642
+ <div class="side-block">
643
+ <h3 class="side-title">How it works</h3>
644
+ <p class="side-text">
645
+ Paste a recipe, choose a diet, and review the ingredient cards.
646
+ </p>
647
+ </div>
648
  </aside>
649
  </section>
650
 
 
652
  <div class="section-head">
653
  <div>
654
  <h3>Adapt a recipe</h3>
655
+ <p>Paste a recipe, choose a diet, and review the ingredient cards.</p>
656
  </div>
657
  <div class="segmented" role="tablist" aria-label="Diet mode">
658
  <button class="diet-btn active-vegan" data-diet="vegan" onclick="setDiet(this)">Vegan</button>
 
663
 
664
  <div class="editor">
665
  <div>
666
+ <textarea id="recipeInput" placeholder="Paste your recipe here."></textarea>
667
 
668
  <div class="input-actions">
669
  <div class="helper" aria-live="polite">
 
686
  </div>
687
 
688
  <div class="side-block">
689
+ <h3 class="side-title">Results</h3>
690
  <p class="side-text">
691
+ You will see a summary, then ingredient cards with the substitute, notes, and source.
 
 
 
 
692
  </p>
693
  </div>
694
  </div>
 
713
  <div class="results-head">
714
  <div>
715
  <h3 id="resultTitle">Adapted recipe</h3>
716
+ <p id="resultSubtitle" style="margin:6px 0 0;color:var(--muted);font-size:14px;">Open any card to inspect the substitution, notes, and source.</p>
717
  </div>
718
  <div class="badge" id="resultBadge"></div>
719
  </div>
720
 
721
  <div class="list" id="ingList"></div>
 
722
  </section>
723
  </div>
724
 
 
729
  currentDiet = btn.dataset.diet;
730
  document.querySelectorAll(".diet-btn").forEach(b => b.className = "diet-btn");
731
  btn.className = "diet-btn active-" + currentDiet;
 
 
 
 
 
 
 
732
  }
733
 
734
  function fillExample(name) {
735
  const examples = {
736
+ "fettuccine alfredo": "24 ounces fettuccine, 1 cup butter, 1 pint heavy cream, 1 cup grated Pecorino romano, 1 cup grated Parmesan",
737
+ "pancakes": "1 cup all-purpose flour, 1 tbsp white sugar, 1 tsp baking powder, 1 cup milk, 2 tbsp melted butter",
738
+ "butter chicken": "450g Chicken Breast, 2 tbsp Butter, 1 cup Tomato Puree, half cup Heavy Cream, half cup Yogurt"
739
  };
740
  document.getElementById("recipeInput").value = examples[name] || "";
741
  document.getElementById("recipeInput").focus();
 
850
  list.innerHTML = "";
851
 
852
  data.ingredients.forEach((r, i) => {
 
853
  const dotClass = r.compliant ? "dot dot-ok" : (r.confidence && r.confidence < 0.6 ? "dot dot-warn" : "dot dot-swap");
854
  const statusText = r.compliant ? "compatible" : "substitution suggested";
855