Compare commits
No commits in common. "1841aa9cba009c6c22b49b3ac7476cb0110248b0" and "a9e4d5fb50681eea6728e3e808097587e56e62b3" have entirely different histories.
1841aa9cba
...
a9e4d5fb50
@ -42,7 +42,7 @@ async function submitRecipe() {
|
|||||||
|
|
||||||
<div class="flex flex-row align-middle items-center">
|
<div class="flex flex-row align-middle items-center">
|
||||||
<p class="mt-4 text-[22pt] font-bold 'mt-4'">Ingredients</p>
|
<p class="mt-4 text-[22pt] font-bold 'mt-4'">Ingredients</p>
|
||||||
<button disabled class="disabled:text-white/20 transition-colors ml-auto mt-5 text-white bg-white/10 rounded-lg px-3 py-1 " id="add-ingredient-btn" >Add</button>
|
<button disabled class="disabled:text-white/20 ml-auto mt-5 text-white bg-white/10 rounded-lg px-3 py-1 " id="add-ingredient-btn" >Add</button>
|
||||||
</div>
|
</div>
|
||||||
<table class={`table-fixed text-left bg-[#2a2b2c] rounded-lg w-full`}>
|
<table class={`table-fixed text-left bg-[#2a2b2c] rounded-lg w-full`}>
|
||||||
<thead>
|
<thead>
|
||||||
@ -85,7 +85,7 @@ async function submitRecipe() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button disabled class="disabled:text-white/20 ml-auto mb-2 transition-colors text-white bg-white/10 rounded-lg px-3 py-1 " id="add-step-btn" >Add</button>
|
<button disabled class="disabled:text-white/20 ml-auto mb-2 text-white bg-white/10 rounded-lg px-3 py-1 " id="add-step-btn" >Add</button>
|
||||||
|
|
||||||
<ul id="step-list"></ul>
|
<ul id="step-list"></ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +33,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
})
|
})
|
||||||
// onclick for add button
|
// onclick for add button
|
||||||
document.querySelector('#add-ingredient-btn')?.addEventListener('click', addIngredient);
|
document.querySelector('#add-ingredient-btn')?.addEventListener('click', addIngredient);
|
||||||
|
|
||||||
// Enter key navigation for ingredient fields
|
// Enter key navigation for ingredient fields
|
||||||
ingredientFields[0].addEventListener('keydown', e => {
|
ingredientFields[0].addEventListener('keydown', e => {
|
||||||
if (e.key === 'Enter') {
|
if (e.key === 'Enter') {
|
||||||
@ -95,7 +95,6 @@ function addStep() {
|
|||||||
renderSteps()
|
renderSteps()
|
||||||
stepInput.value = ''
|
stepInput.value = ''
|
||||||
stepAddButton.disabled = true
|
stepAddButton.disabled = true
|
||||||
stepInput.focus()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderSteps() {
|
function renderSteps() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user