-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
67 lines (59 loc) · 2.38 KB
/
index.html
File metadata and controls
67 lines (59 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Recipe Manager</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Recipe Manager</h1>
<p>A simple recipe management system — add, edit, delete, search, and scale servings.</p>
</header>
<main>
<section class="controls">
<input id="searchInput" type="search" placeholder="Search recipes...">
<button id="addRecipeBtn">+ Add Recipe</button>
</section>
<section class="layout">
<aside class="recipe-list" id="recipeList" aria-label="Recipe list">
<!-- list rendered here -->
</aside>
<section class="recipe-view" id="recipeView" aria-live="polite">
<p class="placeholder">Select a recipe to view its details, or add a new recipe.</p>
</section>
</section>
</main>
<!-- Hidden form modal for add/edit -->
<div id="formModal" class="modal hidden">
<div class="modal-content">
<button class="close" id="closeFormBtn">×</button>
<h2 id="formTitle">Add Recipe</h2>
<form id="recipeForm">
<input type="hidden" name="id" id="recipeId">
<label>Title<br><input required name="title" id="title"></label>
<label>Description<br><textarea name="description" id="description"></textarea></label>
<label>Recipe Image<br>
<input type="file" id="recipeImage" accept="image/*">
<input type="hidden" id="imageData" name="imageData">
<img id="recipeImagePreview" class="preview-image" src="" alt="">
</label>
<label>Estimated Time (minutes)<br><input type="number" min="1" name="time" id="time"></label>
<label>Servings (original)<br><input type="number" min="1" required name="servings" id="servings"></label>
<fieldset id="ingredientsFieldset">
<legend>Ingredients</legend>
<div id="ingredientsList"></div>
<button id="addIngredientBtn" type="button">+ Add Ingredient</button>
</fieldset>
<label>Procedure (steps)<br><textarea name="procedure" id="procedure"></textarea></label>
<div class="form-actions">
<button type="submit">Save</button>
<button type="button" id="cancelBtn">Cancel</button>
</div>
</form>
</div>
</div>
<script src="app.js" defer></script>
</body>
</html>