-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsourdough-pizza-recipe.php
351 lines (288 loc) · 13.9 KB
/
sourdough-pizza-recipe.php
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!doctype html>
<!--
TODO:
- Time calculations
- FAQs section
- How to make stiff sourdough starter
- Note on 3% salt value
-->
<head>
<?php
//Add analytics code here
include_once "gtag.txt";
?>
<meta name="author" content="Ramin Hossaini">
<meta name="description" content="A Sourdough Pizza-dough calculator">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" type="image/png" href="favicon.png"/>
<!-- Bootstrap https://getbootstrap.com/docs/5.3/getting-started/introduction/ -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
<!-- Jquery https://jquery.com/ -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Flatpickr https://flatpickr.js.org/ -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
<script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
<!-- dayJS https://day.js.org/en/ -->
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
<script>dayjs().format()</script>
<title>Ramin's Pizza-dough Calculator</title>
</head>
<body>
<div class="container">
<?php include './include/navbar.php';?>
<h1>Ramin's Sourdough Pizza Recipe</h1>
<div class="row">
<div class="col">
<div class="alert alert-warning" id="BETA-WARNING" role="alert">
This is a recipe I have been experimenting with for while now. It is still in its early stages and might not be perfect. Treat it as such.
</div>
</div>
</div> <!-- row -->
<div class="row">
<!-- Portions -->
<div class="col-auto">
<div class="input-group mb-3">
<span class="input-group-text">Portions</span>
<input type="text" id="inputPortions" class="form-control" aria-label="" value="2">
<span class="input-group-text">number of balls</span>
</div>
</div>
<!-- Portion size -->
<div class="col-auto">
<div class="input-group mb-3">
<span class="input-group-text">Portion Size</span>
<input type="text" id="inputPortionSize" class="form-control" aria-label="" value="250">
<span class="input-group-text">g</span>
</div>
</div>
</div>
<div class="row">
<!-- Hydration -->
<div class="col-auto">
<div class="input-group mb-3">
<span class="input-group-text">Hydration</span>
<input type="text" id="inputHydration" class="form-control" aria-label="" value="68">
<span class="input-group-text">%</span>
</div>
</div>
<!-- Sourdough Starter % -->
<div class="col-auto">
<div class="input-group mb-3">
<span class="input-group-text">Sourdough Starter %</span>
<input type="text" id="inputSourdoughPercentage" class="form-control" aria-label="" value="5">
<span class="input-group-text">%</span>
</div>
</div>
</div>
<!-- Any warning messages come here -->
<div class="row">
<div class="col">
<div class="alert alert-warning" id="hydration-warning" role="alert">
Please note that I haven't experimented with hydration lower than 65% for this recipe, so I wouldn't personally deviate too much.
</div>
</div>
</div> <!-- row -->
<div class="row">
<h2 class="">Final Result:</h2>
<div class="row mb-2">
<!-- Total Dough Weight -->
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="inputTotalDoughWeight" class="form-control" value="" aria-describedby="" disabled readonly>
<label for="inputTotalDoughWeight" class="col-form-label">Total Dough Weight (g)</label>
</form>
</div>
<!-- Total Flour Weight -->
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="totalFlour" class="form-control" value="" aria-describedby="" disabled readonly>
<label for="totalFlour">Total Flour Weight (g)</label>
</form>
</div>
<!-- Total Water -->
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="totalWater" class="form-control" value="" aria-describedby="" disabled readonly>
<label for="totalWater">Total Water (g)</label>
</form>
</div>
</div> <!-- row -->
<div class="row">
<!-- Total Sourdough Starter -->
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="totalSourdoughStarter" class="form-control" value="" aria-describedby="" disabled readonly>
<label for="totalSourdoughStarter">Total Starter (g)</label>
</form>
</div>
<!-- Total Salt -->
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="totalSalt" class="form-control" value="" aria-describedby="" disabled readonly>
<label for="totalSalt">Total Salt (g)</label>
</form>
</div>
</div> <!-- row -->
<div class="row debug">
<div class="col">
<div class="alert alert-warning" id="calculationsCheck" role="alert">
hello
</div>
</div>
</div> <!-- row -->
<div class="row mb-2">
<h2 class="gy-5">Autolyse:</h2>
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="inputFlour" class="form-control" value="100" aria-describedby="" disabled readonly>
<label for="inputFlour">Flour (g)</label>
</form>
</div>
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="inputWater" class="form-control" value="100" aria-describedby="" disabled readonly>
<label for="inputWater">Water (g)</label>
</form>
</div>
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="inputSourdoughStarter" class="form-control" value="6" aria-describedby="" disabled readonly>
<label for="inputSourdoughStarter">Sourdough Starter (g)</label>
</form>
</div>
</div> <!-- row -->
<div class="row">
<div class="col-auto">
<ul class="list-group">
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="autolyse-step1">
<label class="form-check-label stretched-link" for="autolyse-step1">Add sourdough starter to water and turn on stand mixer</label>
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="autolyse-step2">
<label class="form-check-label stretched-link" for="autolyse-step2">Add flour little by little until all incorporated (about 10-15 minutes at low speed)</label>
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="autolyse-step3">
<label class="form-check-label stretched-link" for="autolyse-step3">Let sit, covered, for 20-30 minutes.</label>
</li>
</ul>
</div>
</div>
<div class="row">
<h2 class="gy-5">Bulk Ferment:</h2>
<!-- Total Salt -->
<div class="col-auto">
<form class="form-floating font-monospace">
<input type="text" id="inputSalt" class="form-control" value="" aria-describedby="" disabled readonly>
<label for="inputSalt">Total Salt (g)</label>
</form>
</div>
<div class="row gy-1">
<div class="col">
<ul class="list-group">
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="bulk-ferment-step1">
<label class="form-check-label stretched-link" for="bulk-ferment-step1">Start the mixer again, and add the salt little by little until fully incorporated.</label>
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="bulk-ferment-step2">
<label class="form-check-label stretched-link" for="bulk-ferment-step2">Let sit at room temperature for 2-3 hours if warm, 5-6 hours if cooler</label>
</li>
</ul>
</div>
</div>
</div>
<div class="row">
<h2 class="gy-5">Cold Proof:</h2>
<div class="col">
<ul class="list-group">
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="cold-proof-step1">
<label class="form-check-label stretched-link" for="cold-proof-step1">Must pass window-pane test. Form into balls and transfer to refigerator overnight. Avoid using flour.</label>
</li>
</ul>
</div>
</div>
<div class="row mb-5">
<h2 class="gy-5">On Day of Eating:</h2>
<div class="row gy-1">
<div class="col">
<ul class="list-group">
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="bake-day-step1">
<label class="form-check-label stretched-link" for="bake-day-step1">6 hours before eating, take out of the refrigerator to reach room temperature. May need more time if room temp is cold.</label>
</li>
<li class="list-group-item">
<input class="form-check-input me-1" type="checkbox" value="" id="bake-day-step3">
<label class="form-check-label stretched-link" for="bake-day-step3">Place in proofing tray for 3 hours, and it will be ready to stretch and bake</label>
</li>
</ul>
</div>
</div>
</div>
<?php include './include/footer.php'; ?>
</div> <!-- container -->
<script>
var debug = false;
function refresh_data()
{
var portionSize = parseInt($("#inputPortionSize").val());
var portions = parseInt($("#inputPortions").val());
var hydration = parseInt($("#inputHydration").val());
var sourdoughPercentage = parseFloat($("#inputSourdoughPercentage").val());
var totalDoughWeight = Math.round( portions * portionSize); //Dough weight is PORTIONS * PORTION-SIZE - this is the targer
var flourWeight = Math.round( totalDoughWeight / ((hydration/100) + (3/100) + (sourdoughPercentage/100) +1) ); //Flour weight is TOTAL-DOUGH-WEIGHT / ((HYDRATION / 100) + 1)
var waterWeight = Math.round((hydration / 100) * flourWeight); //Water is HYDRATION /100 * flourWeight
var sourdoughStarterWeight = Math.round((sourdoughPercentage/100) * flourWeight);
var saltWeight = Math.round( 0.03 * flourWeight); //Salt is 3% of Flour weight
$("#inputTotalDoughWeight").val(totalDoughWeight);
$("#totalFlour").val(flourWeight);
$("#totalWater").val(waterWeight);
$("#totalSourdoughStarter").val(sourdoughStarterWeight);
$("#inputFlour").val(flourWeight);
$("#inputWater").val(waterWeight);
$("#totalSalt").val(saltWeight);
$("#inputSalt").val(saltWeight);
$("#inputSourdoughStarter").val(sourdoughStarterWeight);
//hide warnings by default
$("#hydration-warning").hide();
$("#calculationsCheck").hide();
//Show/Hide the Hydration Warning
if (hydration < 60 || hydration > 75) {
$("#hydration-warning").show();
}
if (debug == true) {
$("#calculationsCheck").show();
//do some calulcations and checks
//add all weights together
var calc1 = flourWeight + waterWeight + sourdoughStarterWeight + saltWeight;
var calc2 = totalDoughWeight;
if (calc1 / calc2 > 0.99) {
$("#calculationsCheck").text("Value totals are correct");
}
else
{
$("#calculationsCheck").text("Value totals are not correct: Looking for "+calc2+" but got "+calc1);
}
$("#calculationsCheck").append("<p>Salt % is: " + Math.round(saltWeight / flourWeight * 100) + "</p>");
$("#calculationsCheck").append("<p>Water % is: " + Math.round(waterWeight / flourWeight * 100) + "</p>");
$("#calculationsCheck").append("<p>Sourdough Starter % is: " + Math.round(sourdoughStarterWeight / flourWeight * 100) + "</p>");
}
}
//Refresh when key is pressed
$( "input" ).keyup(function() {
refresh_data();
});
$( "input" ).change(function() {
refresh_data();
});
//Initial refresh of numbers when page loads
$( document ).ready(function() {
refresh_data();
});
</script>
</body>
</html>